Commit e2f1f39b authored by Juan Lang's avatar Juan Lang Committed by Alexandre Julliard

setupapi: Include enumerator string as part of device instance ID.

parent e51f8490
......@@ -2176,16 +2176,17 @@ static void SETUPDI_EnumerateMatchingDeviceInstances(struct DeviceInfoSet *set,
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);
......
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