Zebediah Figura : setupapi: Process interface sections in SetupDiInstallDriverFiles().

Alexandre Julliard julliard at winehq.org
Thu May 23 16:04:39 CDT 2019


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Wed May 22 22:55:55 2019 -0500

setupapi: Process interface sections in SetupDiInstallDriverFiles().

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

---

 dlls/setupapi/devinst.c | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/dlls/setupapi/devinst.c b/dlls/setupapi/devinst.c
index 9903c48..cb7ede6 100644
--- a/dlls/setupapi/devinst.c
+++ b/dlls/setupapi/devinst.c
@@ -101,6 +101,8 @@ static const WCHAR Phantom[] = {'P','h','a','n','t','o','m',0};
 static const WCHAR SymbolicLink[] = {'S','y','m','b','o','l','i','c','L','i','n','k',0};
 static const WCHAR Control[] = {'C','o','n','t','r','o','l',0};
 static const WCHAR Linked[] = {'L','i','n','k','e','d',0};
+static const WCHAR dotInterfaces[] = {'.','I','n','t','e','r','f','a','c','e','s',0};
+static const WCHAR AddInterface[] = {'A','d','d','I','n','t','e','r','f','a','c','e',0};
 static const WCHAR backslashW[] = {'\\',0};
 static const WCHAR emptyW[] = {0};
 
@@ -4559,7 +4561,7 @@ BOOL WINAPI SetupDiSelectBestCompatDrv(HDEVINFO devinfo, SP_DEVINFO_DATA *device
  */
 BOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO devinfo, SP_DEVINFO_DATA *device_data)
 {
-    WCHAR section[LINE_LEN], section_ext[LINE_LEN];
+    WCHAR section[LINE_LEN], section_ext[LINE_LEN], iface_section[LINE_LEN];
     struct device *device;
     struct driver *driver;
     void *callback_ctx;
@@ -4586,8 +4588,20 @@ BOOL WINAPI SetupDiInstallDriverFiles(HDEVINFO devinfo, SP_DEVINFO_DATA *device_
     SetupDiGetActualSectionToInstallW(hinf, section, section_ext, ARRAY_SIZE(section_ext), NULL, NULL);
 
     callback_ctx = SetupInitDefaultQueueCallback(NULL);
+
     SetupInstallFromInfSectionW(NULL, hinf, section_ext, SPINST_FILES, NULL, NULL,
             SP_COPY_NEWER_ONLY, SetupDefaultQueueCallbackW, callback_ctx, NULL, NULL);
+
+    lstrcatW(section_ext, dotInterfaces);
+    if (SetupFindFirstLineW(hinf, section_ext, AddInterface, &ctx))
+    {
+        do {
+            SetupGetStringFieldW(&ctx, 3, iface_section, ARRAY_SIZE(iface_section), NULL);
+            SetupInstallFromInfSectionW(NULL, hinf, iface_section, SPINST_FILES, NULL, NULL,
+                    SP_COPY_NEWER_ONLY, SetupDefaultQueueCallbackW, callback_ctx, NULL, NULL);
+        } while (SetupFindNextMatchLineW(&ctx, AddInterface, &ctx));
+    }
+
     SetupTermDefaultQueueCallback(callback_ctx);
 
     SetupCloseInfFile(hinf);




More information about the wine-cvs mailing list