Commit 00ef2e32 authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

setupapi: Save class GUID to registry when creating a device.

parent 8985a62a
...@@ -183,11 +183,17 @@ static BOOL SETUPDI_AddDeviceToSet(struct DeviceInfoSet *set, ...@@ -183,11 +183,17 @@ static BOOL SETUPDI_AddDeviceToSet(struct DeviceInfoSet *set,
sizeof(SP_DEVINFO_DATA)); sizeof(SP_DEVINFO_DATA));
if (set->devices) if (set->devices)
{ {
WCHAR classGuidStr[39];
*dev = &set->devices[set->cDevices++]; *dev = &set->devices[set->cDevices++];
(*dev)->cbSize = sizeof(SP_DEVINFO_DATA); (*dev)->cbSize = sizeof(SP_DEVINFO_DATA);
memcpy(&(*dev)->ClassGuid, guid, sizeof(GUID)); memcpy(&(*dev)->ClassGuid, guid, sizeof(GUID));
(*dev)->DevInst = devInst; (*dev)->DevInst = devInst;
(*dev)->Reserved = (ULONG_PTR)devInfo; (*dev)->Reserved = (ULONG_PTR)devInfo;
SETUPDI_GuidToString(guid, classGuidStr);
SetupDiSetDeviceRegistryPropertyW((HDEVINFO)set,
*dev, SPDRP_CLASSGUID, (const BYTE *)classGuidStr,
lstrlenW(classGuidStr) * sizeof(WCHAR));
ret = TRUE; ret = TRUE;
} }
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment