Skip to content

Commit

Permalink
[SETUPAPI] SETUP_CreateDevicesList must return ERROR_INVALID_DATA whe…
Browse files Browse the repository at this point in the history
…n the Enumerator is invalid

This fixes the devclass apitest.
  • Loading branch information
EricKohl committed Nov 1, 2024
1 parent 91bc5b5 commit d55ca68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions dll/win32/setupapi/devclass.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit d55ca68

Please sign in to comment.