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

This commit is contained in:
Juan Lang 2007-09-20 09:14:27 -07:00 committed by Alexandre Julliard
parent 8985a62a34
commit 00ef2e3269
1 changed files with 6 additions and 0 deletions

View File

@ -183,11 +183,17 @@ static BOOL SETUPDI_AddDeviceToSet(struct DeviceInfoSet *set,
sizeof(SP_DEVINFO_DATA));
if (set->devices)
{
WCHAR classGuidStr[39];
*dev = &set->devices[set->cDevices++];
(*dev)->cbSize = sizeof(SP_DEVINFO_DATA);
memcpy(&(*dev)->ClassGuid, guid, sizeof(GUID));
(*dev)->DevInst = devInst;
(*dev)->Reserved = (ULONG_PTR)devInfo;
SETUPDI_GuidToString(guid, classGuidStr);
SetupDiSetDeviceRegistryPropertyW((HDEVINFO)set,
*dev, SPDRP_CLASSGUID, (const BYTE *)classGuidStr,
lstrlenW(classGuidStr) * sizeof(WCHAR));
ret = TRUE;
}
else