https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7b29f4d975a8bf5b196d9ca1903ca05829aa32bc

commit 7b29f4d975a8bf5b196d9ca1903ca05829aa32bc
Author:     Eric Kohl <[email protected]>
AuthorDate: Thu Jun 13 14:16:25 2019 +0200
Commit:     Eric Kohl <[email protected]>
CommitDate: Thu Jun 13 14:16:25 2019 +0200

    [NETCFGX] InstallNetDevice: Run the default device installer before making 
class-specific changes.
---
 dll/win32/netcfgx/installer.c | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/dll/win32/netcfgx/installer.c b/dll/win32/netcfgx/installer.c
index 995b85d6182..1607bb247bb 100644
--- a/dll/win32/netcfgx/installer.c
+++ b/dll/win32/netcfgx/installer.c
@@ -110,6 +110,14 @@ InstallNetDevice(
     DWORD dwShowIcon, dwLength, dwValue;
     WCHAR szBuffer[300];
 
+    /* Install the adapter */
+    if (!SetupDiInstallDevice(DeviceInfoSet, DeviceInfoData))
+    {
+        rc = GetLastError();
+        ERR("SetupDiInstallDevice() failed (Error %lu)\n", rc);
+        goto cleanup;
+    }
+
     /* Get Instance ID */
     if (SetupDiGetDeviceInstanceIdW(DeviceInfoSet, DeviceInfoData, NULL, 0, 
&dwLength))
     {
@@ -373,6 +381,7 @@ cleanup:
         RegCloseKey(hLinkageKey);
     if (hConnectionKey != NULL)
         RegCloseKey(hConnectionKey);
+
     return rc;
 }
 
@@ -558,8 +567,6 @@ cleanup:
     HeapFree(GetProcessHeap(), 0, BusType);
     HeapFree(GetProcessHeap(), 0, UuidString);
 
-    if (rc == ERROR_SUCCESS)
-        rc = ERROR_DI_DO_DEFAULT;
     TRACE("Returning 0x%lx\n", rc);
     return rc;
 }

Reply via email to