Signed-off-by: Zebediah Figura z.figura12@gmail.com --- Spotted by Jactry Zeng.
configure.ac | 1 + 1 file changed, 1 insertion(+)
diff --git a/configure.ac b/configure.ac index c99db6984b5..e5003f769c4 100644 --- a/configure.ac +++ b/configure.ac @@ -4100,6 +4100,7 @@ else fonts \ loader/l_intl.nls \ loader/wine.inf \ +loader/winebus.inf \ loader/winehid.inf \ programs/msidb/msidb \ programs/msiexec/msiexec \
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/setupapi/misc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c index 3fadb6827b2..3b5d62b682c 100644 --- a/dlls/setupapi/misc.c +++ b/dlls/setupapi/misc.c @@ -1073,6 +1073,7 @@ done: if (buffer_size >= size) { lstrcpyW( dest, target ); + if (filepart) *filepart = wcsrchr( dest, '\' ) + 1; } else { @@ -1081,7 +1082,6 @@ done: } }
- if (filepart) *filepart = wcsrchr( target, '\' ) + 1; if (required_size) *required_size = size; if (ret) SetLastError(ERROR_SUCCESS);
This matches Windows XP behaviour. In Vista and later this appears to be done by UpdateDriverForPlugAndPlayDevices().
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/setupapi/devinst.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index f0d75f90b81..6de26b943f2 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -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; }
At least one PnP enumeration utility expects this.
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/setupapi/devinst.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c index 6de26b943f2..61ddade4055 100644 --- a/dlls/setupapi/devinst.c +++ b/dlls/setupapi/devinst.c @@ -4720,7 +4720,7 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) static const WCHAR addserviceW[] = {'A','d','d','S','e','r','v','i','c','e',0}; static const WCHAR rootW[] = {'r','o','o','t','\',0}; WCHAR section[LINE_LEN], section_ext[LINE_LEN], subsection[LINE_LEN], inf_path[MAX_PATH], *extptr, *filepart; - WCHAR svc_name[LINE_LEN]; + WCHAR svc_name[LINE_LEN], field[LINE_LEN]; UINT install_flags = SPINST_ALL; HKEY driver_key, device_key; SC_HANDLE manager, service; @@ -4747,6 +4747,10 @@ BOOL WINAPI SetupDiInstallDevice(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data) return FALSE;
SetupFindFirstLineW(hinf, driver->mfg_key, driver->description, &ctx); + + SetupGetStringFieldW(&ctx, 0, field, ARRAY_SIZE(field), NULL); + RegSetValueExW(device->key, L"DeviceDesc", 0, REG_SZ, (BYTE *)field, wcslen(field) * sizeof(WCHAR)); + SetupGetStringFieldW(&ctx, 1, section, ARRAY_SIZE(section), NULL); SetupDiGetActualSectionToInstallW(hinf, section, section_ext, ARRAY_SIZE(section_ext), NULL, &extptr);