From: Hervé Poussineau Date: Fri, 14 Oct 2005 18:09:17 +0000 (+0000) Subject: Process AddReg directive in main section to install X-Git-Tag: backups/ros-branch-0_2_9@19949~1401 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=8325af0b6a877585c5074a948eab202707d365bf;hp=48b9916f228a043f24d5d32f96a7eb0a28f41834 Process AddReg directive in main section to install Simplify a call to SetupInstallFromInfSectionW Fix a warning (thanks w3seek) svn path=/trunk/; revision=18446 --- diff --git a/reactos/lib/setupapi/devinst.c b/reactos/lib/setupapi/devinst.c index 9b59c64c6b0..732adf34bb8 100644 --- a/reactos/lib/setupapi/devinst.c +++ b/reactos/lib/setupapi/devinst.c @@ -2936,7 +2936,7 @@ BOOL WINAPI SetupDiCallClassInstaller( { LIST_ENTRY ClassCoInstallersListHead; LIST_ENTRY DeviceCoInstallersListHead; - HMODULE ClassInstallerLibrary; + HMODULE ClassInstallerLibrary = NULL; CLASS_INSTALL_PROC ClassInstaller = NULL; COINSTALLER_CONTEXT_DATA Context; PLIST_ENTRY ListEntry; @@ -4828,7 +4828,6 @@ SetupDiInstallDevice( HKEY hClassKey = INVALID_HANDLE_VALUE; LONG rc; HWND hWnd; - PVOID callback_context; BOOL ret = FALSE; /* Return value */ TRACE("%p %p\n", DeviceInfoSet, DeviceInfoData); @@ -4916,6 +4915,17 @@ SetupDiInstallDevice( if (hKey == INVALID_HANDLE_VALUE) goto cleanup; + /* Install main section */ + /* Files have already been copied in SetupDiInstallDriverFiles. + * Process only registry entries. */ + *pSectionName = '\0'; + Result = SetupInstallFromInfSectionW(hWnd, hInf, SectionName, + SPINST_REGISTRY, hKey, NULL, 0, + SetupDefaultQueueCallbackW, NULL, + NULL, NULL); + if (!Result) + goto cleanup; + /* Write information to driver key */ *pSectionName = UNICODE_NULL; TRACE("Write information to driver key\n"); @@ -5048,12 +5058,10 @@ nextfile: /* Install .HW section */ wcscpy(pSectionName, L".HW"); - callback_context = SetupInitDefaultQueueCallback(hWnd); Result = SetupInstallFromInfSectionW(hWnd, hInf, SectionName, SPINST_REGISTRY, hKey, NULL, 0, - SetupDefaultQueueCallbackW, callback_context, + SetupDefaultQueueCallbackW, NULL, NULL, NULL); - SetupTermDefaultQueueCallback(callback_context); if (!Result) goto cleanup;