Zebediah Figura : setupapi: Set the DeviceDesc value in SetupDiInstallDevice().

Alexandre Julliard julliard at winehq.org
Fri Nov 8 17:25:25 CST 2019


Module: wine
Branch: master
Commit: 404cee2aa6ed08ae8b9a205396bee1fc2e3fd6d6
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=404cee2aa6ed08ae8b9a205396bee1fc2e3fd6d6

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Nov  7 23:37:54 2019 -0600

setupapi: Set the DeviceDesc value in SetupDiInstallDevice().

At least one PnP enumeration utility expects this.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 6de26b943f..61ddade405 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);
 




More information about the wine-cvs mailing list