C
cc213t
Guest
As ERROR_INVALID_DATA is not one of the possible errors mentioned in the documentation for UpdateDriverForPlugAndPlayDevices(), could someone from Microsoft familiar with the internals describe what might cause that error for this particular function?
Situation: On a customer's system running Windows 10 Pro 64-bit version 1607, I have seen UpdateDriverForPlugAndPlayDevices() occasionally fail (return FALSE) with GetLastError() returning 13 (ERROR_INVALID_DATA), despite the function parameters and the supplied .inf file being correct. The same call with the same parameters and driver files will usually succeed on a subsequent attempt. The driver is for a proprietary PCIE board. When I see the failure, the customer has a working system with a previous version of the driver already associated with the given hardware ID and running OK, and we are patching the system to update it to a newer (or older, but known) version (hence with flag INSTALLFLAG_FORCE). We have updated drivers using the same procedure for years and have only seen this ERROR_INVALID_DATA issue on Windows 10. The call is as follows:
TCHAR *hwid = TEXT("PCI\\VEN_116E&DEV_0600");
BOOL reboot = FALSE;
if (!UpdateDriverForPlugAndPlayDevices(NULL, hwid, inf, INSTALLFLAG_FORCE, &reboot)) {
DWORD errcode = GetLastError();
...
}
Continue reading...
Situation: On a customer's system running Windows 10 Pro 64-bit version 1607, I have seen UpdateDriverForPlugAndPlayDevices() occasionally fail (return FALSE) with GetLastError() returning 13 (ERROR_INVALID_DATA), despite the function parameters and the supplied .inf file being correct. The same call with the same parameters and driver files will usually succeed on a subsequent attempt. The driver is for a proprietary PCIE board. When I see the failure, the customer has a working system with a previous version of the driver already associated with the given hardware ID and running OK, and we are patching the system to update it to a newer (or older, but known) version (hence with flag INSTALLFLAG_FORCE). We have updated drivers using the same procedure for years and have only seen this ERROR_INVALID_DATA issue on Windows 10. The call is as follows:
TCHAR *hwid = TEXT("PCI\\VEN_116E&DEV_0600");
BOOL reboot = FALSE;
if (!UpdateDriverForPlugAndPlayDevices(NULL, hwid, inf, INSTALLFLAG_FORCE, &reboot)) {
DWORD errcode = GetLastError();
...
}
Continue reading...