Nikolay Sivov bunglehead@gmail.com wrote:
@@ -2340,7 +2340,7 @@ HDEVINFO WINAPI SetupDiGetClassDevsExW(const GUID *class, PCWSTR enumstr, HWND p if (!(flags & DIGCF_ALLCLASSES) && !class) { SetLastError(ERROR_INVALID_PARAMETER);
return NULL;
return INVALID_HANDLE_VALUE; } if (flags & unsupportedFlags) WARN("unsupported flags %08x\n", flags & unsupportedFlags);
How about a test for this and next one?
Both fixes are in obvious category.
SetupDiGetClassDevsA/ExA already return INVALID_HANDLE_VALUE on failure, SetupDiGetClassDevsExW case is just a typo I believe.
Next patch just adds a check for what SetupDiCreateDeviceInfoListExW already returns on failure.