forked from reactos/reactos
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SETUPAPI] SETUP_CreateDevicesList must return ERROR_INVALID_DATA whe…
…n the Enumerator is invalid This fixes the devclass apitest.
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
* SetupAPI device class-related functions | ||
* | ||
* Copyright 2000 Andreas Mohr for CodeWeavers | ||
* 2005-2006 Hervé Poussineau ([email protected]) | ||
* 2005-2006 Hervé Poussineau ([email protected]) | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
|
@@ -159,7 +159,7 @@ SETUP_CreateDevicesList( | |
TRACE("CM_Get_Device_ID_List_ExW() failed with status 0x%x\n", cr); | ||
if (Buffer) | ||
HeapFree(GetProcessHeap(), 0, Buffer); | ||
return GetErrorCodeFromCrCode(cr); | ||
return (cr == CR_REGISTRY_ERROR) ? ERROR_INVALID_DATA : GetErrorCodeFromCrCode(cr); | ||
} | ||
} | ||
while (cr != CR_SUCCESS); | ||
|