mirror of
https://github.com/reactos/reactos.git
synced 2024-11-04 22:00:55 +00:00
[SETUPAPI] SetupDiCreateDeviceInfoW: Fix flags conversion for CM_Create_DevInst_ExW
This commit is contained in:
parent
dde7e6e254
commit
851c5e0c3a
1 changed files with 6 additions and 3 deletions
|
@ -1583,6 +1583,7 @@ BOOL WINAPI SetupDiCreateDeviceInfoW(
|
|||
DEVINST RootDevInst;
|
||||
DEVINST DevInst;
|
||||
WCHAR GenInstanceId[MAX_DEVICE_ID_LEN];
|
||||
DWORD dwFlags;
|
||||
|
||||
TRACE("%s(%p %s %s %s %p %x %p)\n", __FUNCTION__, DeviceInfoSet, debugstr_w(DeviceName),
|
||||
debugstr_guid(ClassGuid), debugstr_w(DeviceDescription),
|
||||
|
@ -1632,13 +1633,15 @@ BOOL WINAPI SetupDiCreateDeviceInfoW(
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
dwFlags = CM_CREATE_DEVINST_PHANTOM;
|
||||
if (CreationFlags & DICD_GENERATE_ID)
|
||||
dwFlags |= CM_CREATE_DEVINST_GENERATE_ID;
|
||||
|
||||
/* Create the new device instance */
|
||||
cr = CM_Create_DevInst_ExW(&DevInst,
|
||||
(DEVINSTID)DeviceName,
|
||||
RootDevInst,
|
||||
CM_CREATE_DEVINST_PHANTOM |
|
||||
(CreationFlags & DICD_GENERATE_ID) ?
|
||||
CM_CREATE_DEVINST_GENERATE_ID : 0,
|
||||
dwFlags,
|
||||
set->hMachine);
|
||||
if (cr != CR_SUCCESS)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue