setupapi: Include enumerator string as part of device instance ID.
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 531597d..9f27333 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -2176,16 +2176,17 @@
if ((flags & DIGCF_ALLCLASSES) ||
IsEqualGUID(class, &deviceClass))
{
- static const WCHAR fmt[] = {'%','s','\\','%','s',0};
+ static const WCHAR fmt[] =
+ {'%','s','\\','%','s','\\','%','s',0};
LPWSTR instanceId;
instanceId = HeapAlloc(GetProcessHeap(), 0,
- (lstrlenW(deviceName) +
- lstrlenW(deviceInstance) + 2) * sizeof(WCHAR));
+ (lstrlenW(enumerator) + lstrlenW(deviceName) +
+ lstrlenW(deviceInstance) + 3) * sizeof(WCHAR));
if (instanceId)
{
- sprintfW(instanceId, fmt, deviceName,
- deviceInstance);
+ sprintfW(instanceId, fmt, enumerator,
+ deviceName, deviceInstance);
SETUPDI_AddDeviceToSet(set, &deviceClass,
0 /* FIXME: DevInst */, instanceId,
FALSE, NULL);