Commit 7d152715 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

setupapi: Set the device class in SetupDiBuildDriverInfoList().

This matches Windows XP behaviour. In Vista and later this appears to be done by UpdateDriverForPlugAndPlayDevices(). Signed-off-by: 's avatarZebediah Figura <z.figura12@gmail.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent 161a0c25
......@@ -4545,6 +4545,20 @@ BOOL WINAPI SetupDiBuildDriverInfoList(HDEVINFO devinfo, SP_DEVINFO_DATA *device
}
}
if (device->driver_count)
{
WCHAR classname[MAX_CLASS_NAME_LEN], guidstr[39];
GUID class;
if (SetupDiGetINFClassW(device->drivers[0].inf_path, &class, classname, ARRAY_SIZE(classname), NULL))
{
device_data->ClassGuid = device->class = class;
SETUPDI_GuidToString(&class, guidstr);
RegSetValueExW(device->key, L"ClassGUID", 0, REG_SZ, (BYTE *)guidstr, sizeof(guidstr));
RegSetValueExW(device->key, L"Class", 0, REG_SZ, (BYTE *)classname, wcslen(classname) * sizeof(WCHAR));
}
}
return TRUE;
}
......
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