From 00ef2e3269a51e5817121ee47b3e18d9e58e77d5 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Thu, 20 Sep 2007 09:14:27 -0700 Subject: [PATCH] setupapi: Save class GUID to registry when creating a device. --- dlls/setupapi/devinst.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 0a3e599992b..3c8715c2447 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -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 -- 2.11.4.GIT