[PATCH 6/6] setupapi: Implement device-specific co-installers in SetupDiCallClassInstaller().

Zebediah Figura z.figura12 at gmail.com
Wed May 22 00:10:10 CDT 2019


Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
---
 dlls/setupapi/devinst.c | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 4d44e0086c..71311238c3 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -3622,6 +3622,7 @@ BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION function, HDEVINFO devinfo, SP
             '\\','C','u','r','r','e','n','t','C','o','n','t','r','o','l','S','e','t',
             '\\','C','o','n','t','r','o','l',
             '\\','C','o','D','e','v','i','c','e','I','n','s','t','a','l','l','e','r','s',0};
+    static const WCHAR coinstallers32W[] = {'C','o','I','n','s','t','a','l','l','e','r','s','3','2',0};
     static const WCHAR installer32W[] = {'I','n','s','t','a','l','l','e','r','3','2',0};
     DWORD (CALLBACK *classinst_proc)(DI_FUNCTION, HDEVINFO, SP_DEVINFO_DATA *);
     DWORD ret = ERROR_DI_DO_DEFAULT;
@@ -3655,6 +3656,18 @@ BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION function, HDEVINFO devinfo, SP
     if (!coret)
         return FALSE;
 
+    if (!open_driver_key(device, KEY_READ, &coinst_key))
+    {
+        if (!RegGetValueW(coinst_key, NULL, coinstallers32W, RRF_RT_REG_MULTI_SZ, NULL, NULL, &size))
+        {
+            path = heap_alloc(size);
+            if (!RegGetValueW(coinst_key, NULL, coinstallers32W, RRF_RT_REG_MULTI_SZ, NULL, path, &size))
+                coret = call_coinstallers(path, function, devinfo, device_data);
+            heap_free(path);
+        }
+        RegCloseKey(coinst_key);
+    }
+
     if ((class_key = SetupDiOpenClassRegKey(&device->class, KEY_READ)) != INVALID_HANDLE_VALUE)
     {
         if (!RegGetValueW(class_key, NULL, installer32W, RRF_RT_REG_SZ, NULL, NULL, &size))
-- 
2.21.0




More information about the wine-devel mailing list