- Ignore ERROR_INVALID_PARAMETER from pfnWdfPostDeviceInstall() as these

errors appear to be benign.
This commit is contained in:
basil00
2012-10-24 22:46:13 +08:00
parent 898ea780e2
commit 3a59af9f25
+7
View File
@@ -517,6 +517,13 @@ static BOOLEAN DivertDriverInstall(VOID)
// Post-install:
err = pfnWdfPostDeviceInstall(divert_inf, NULL);
if (err == ERROR_INVALID_PARAMETER)
{
// We ignore ERROR_INVALID_PARAMETER. WdfPostDeviceInstall sometimes
// returns this error for no obvious reason, and when ignored the
// driver seems to still work perfectly.
err = ERROR_SUCCESS;
}
if (err != ERROR_SUCCESS)
{
SetLastError(err);