ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
October 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
26 participants
737 discussions
Start a n
N
ew thread
[hbirr] 18739: Set the correct length in MmQuerySectionView.
by hbirr@svn.reactos.com
Set the correct length in MmQuerySectionView. Modified: trunk/reactos/ntoskrnl/mm/section.c _____ Modified: trunk/reactos/ntoskrnl/mm/section.c --- trunk/reactos/ntoskrnl/mm/section.c 2005-10-24 15:35:04 UTC (rev 18738) +++ trunk/reactos/ntoskrnl/mm/section.c 2005-10-24 15:56:03 UTC (rev 18739) @@ -1354,7 +1354,7 @@ MmReleasePageMemoryConsumer(MC_USER, Page); } - DPRINT("PhysicalAddress %I64x, Address %x\n", Page, Address); + DPRINT("PhysicalAddress %x, Address %x\n", Page << PAGE_SHIFT, Address); } NTSTATUS @@ -1975,8 +1975,7 @@ } Info->BaseAddress = RegionBaseAddress; Info->AllocationProtect = MemoryArea->Attributes; - Info->RegionSize = PAGE_ROUND_UP((ULONG_PTR)MemoryArea->EndingAddress - - (ULONG_PTR)MemoryArea->StartingAddress); + Info->RegionSize = Region->Length; Info->State = MEM_COMMIT; Info->Protect = Region->Protect;
19 years, 2 months
1
0
0
0
[weiden] 18738: don't define DirectDrawClipper_Vtable statically
by weiden@svn.reactos.com
don't define DirectDrawClipper_Vtable statically Modified: trunk/reactos/lib/ddraw/main/clipper.c _____ Modified: trunk/reactos/lib/ddraw/main/clipper.c --- trunk/reactos/lib/ddraw/main/clipper.c 2005-10-24 15:26:54 UTC (rev 18737) +++ trunk/reactos/lib/ddraw/main/clipper.c 2005-10-24 15:35:04 UTC (rev 18738) @@ -64,7 +64,7 @@ DX_STUB; } -static IDirectDrawClipperVtbl DirectDrawClipper_Vtable = +IDirectDrawClipperVtbl DirectDrawClipper_Vtable = { Main_DirectDrawClipper_QueryInterface, Main_DirectDrawClipper_AddRef,
19 years, 2 months
1
0
0
0
[hbirr] 18737: Revert r18735 and add the missing definition to svcctl.idl.
by hbirr@svn.reactos.com
Revert r18735 and add the missing definition to svcctl.idl. Modified: trunk/reactos/include/idl/svcctl.idl Modified: trunk/reactos/lib/advapi32/service/scm.c _____ Modified: trunk/reactos/include/idl/svcctl.idl --- trunk/reactos/include/idl/svcctl.idl 2005-10-24 14:00:14 UTC (rev 18736) +++ trunk/reactos/include/idl/svcctl.idl 2005-10-24 15:26:54 UTC (rev 18737) @@ -74,8 +74,22 @@ /* Function 9 */ DWORD ScmrNotifyBootConfigStatus([in] handle_t BindingHandle, [in] BOOL BootAcceptable); + /* Function 11 */ + DWORD ScmrChangeServiceConfigW([in] handle_t BiningHandle, + [in] SC_HANDLE hSCManager, + [in] DWORD dwServiceType, + [in] DWORD dwStartType, + [in] DWORD dwErrorControl, + [in, string, ref] LPCWSTR lpBinaryPathName, + [in, string, unique] LPCWSTR lpLoadOrderGroup, + [in, out, unique] LPDWORD lpdwTagId, + [in, size_is(dwDependenciesLength), unique] LPCWSTR lpDependencies, + [in] DWORD dwDependenciesLength, + [in, string, unique] LPCWSTR lpServiceStartName, + [in, size_is(dwPasswordLength), unique] LPCWSTR lpPassword, + [in] DWORD dwPasswordLength, + [in, string, unique] LPCWSTR lpDisplayName); - /* Function 12 */ DWORD ScmrCreateServiceW([in] handle_t BindingHandle, [in] SC_HANDLE hSCManager, _____ Modified: trunk/reactos/lib/advapi32/service/scm.c --- trunk/reactos/lib/advapi32/service/scm.c 2005-10-24 14:00:14 UTC (rev 18736) +++ trunk/reactos/lib/advapi32/service/scm.c 2005-10-24 15:26:54 UTC (rev 18737) @@ -121,7 +121,6 @@ LPCWSTR lpPassword, LPCWSTR lpDisplayName) { -#if 0 /* Temporarily deactivated to fix the build (ScmrChangeServiceConfigW is missing */ DWORD dwError; DWORD dwDependenciesLength = 0; DWORD dwLength; @@ -169,11 +168,6 @@ } return TRUE; -#else - DPRINT1("ChangeServiceConfigW temporarily disabled\n"); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -#endif }
19 years, 2 months
1
0
0
0
[cwittich] 18736: added PCI interrupt link device
by cwittich@svn.reactos.com
added PCI interrupt link device Modified: trunk/reactos/media/inf/machine.inf _____ Modified: trunk/reactos/media/inf/machine.inf --- trunk/reactos/media/inf/machine.inf 2005-10-24 12:55:54 UTC (rev 18735) +++ trunk/reactos/media/inf/machine.inf 2005-10-24 14:00:14 UTC (rev 18736) @@ -35,6 +35,7 @@ %*PNP0A05.DeviceDesc% = NO_DRV,*PNP0A05 %*PNP0B00.DeviceDesc% = NO_DRV,*PNP0B00 %*PNP0C02.DeviceDesc% = NO_DRV,*PNP0C02 +%*PNP0C0F.DeviceDesc% = NO_DRV,*PNP0C0F %ACPI\FixedButton.DeviceDesc% = NO_DRV,ACPI\FixedButton %PCI\CC_0600.DeviceDesc% = NO_DRV,PCI\CC_0600 %PCI\CC_0601.DeviceDesc% = PCI_Inst,PCI\CC_0604
19 years, 2 months
1
0
0
0
[gvg] 18735: Temporary workaround to fix build
by gvg@svn.reactos.com
Temporary workaround to fix build Modified: trunk/reactos/lib/advapi32/service/scm.c _____ Modified: trunk/reactos/lib/advapi32/service/scm.c --- trunk/reactos/lib/advapi32/service/scm.c 2005-10-24 12:49:05 UTC (rev 18734) +++ trunk/reactos/lib/advapi32/service/scm.c 2005-10-24 12:55:54 UTC (rev 18735) @@ -121,6 +121,7 @@ LPCWSTR lpPassword, LPCWSTR lpDisplayName) { +#if 0 /* Temporarily deactivated to fix the build (ScmrChangeServiceConfigW is missing */ DWORD dwError; DWORD dwDependenciesLength = 0; DWORD dwLength; @@ -168,6 +169,11 @@ } return TRUE; +#else + DPRINT1("ChangeServiceConfigW temporarily disabled\n"); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +#endif }
19 years, 2 months
1
0
0
0
[hpoussin] 18734: Install .CoInstallers section from .inf file
by hpoussin@svn.reactos.com
Install .CoInstallers section from .inf file Call class coinstallers and device coinstallers when installing a device Modified: trunk/reactos/lib/setupapi/devinst.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-10-24 11:40:14 UTC (rev 18733) +++ trunk/reactos/lib/setupapi/devinst.c 2005-10-24 12:49:05 UTC (rev 18734) @@ -2997,14 +2997,6 @@ goto cleanup; } - /* W->A conversion for function name */ - FunctionNameA = UnicodeToMultiByte(Comma + 1, CP_ACP); - if (!FunctionNameA) - { - rc = GetLastError(); - goto cleanup; - } - /* Load library */ *Comma = '\0'; hModule = LoadLibraryW(InstallerName); @@ -3015,6 +3007,18 @@ goto cleanup; } + /* Skip comma spaces */ + while (*Comma == ',' || isspaceW(*Comma)) + Comma++; + + /* W->A conversion for function name */ + FunctionNameA = UnicodeToMultiByte(Comma, CP_ACP); + if (!FunctionNameA) + { + rc = GetLastError(); + goto cleanup; + } + /* Search function */ *FunctionPointer = GetProcAddress(hModule, FunctionNameA); if (!*FunctionPointer) @@ -3141,7 +3145,39 @@ if (CanHandle & DEVICE_COINSTALLER) { - FIXME("Doesn't use Device co-installers at the moment\n"); + hKey = SetupDiOpenDevRegKey(DeviceInfoSet, DeviceInfoData, DICS_FLAG_GLOBAL, 0, DIREG_DRV, KEY_QUERY_VALUE); + if (hKey != INVALID_HANDLE_VALUE) + { + rc = RegQueryValueExW(hKey, L"CoInstallers32", NULL, &dwRegType, NULL, &dwLength); + if (rc == ERROR_SUCCESS && dwRegType == REG_MULTI_SZ) + { + LPWSTR KeyBuffer = HeapAlloc(GetProcessHeap(), 0, dwLength); + if (KeyBuffer != NULL) + { + rc = RegQueryValueExW(hKey, L"CoInstallers32", NULL, NULL, (LPBYTE)KeyBuffer, &dwLength); + if (rc == ERROR_SUCCESS) + { + LPWSTR ptr; + for (ptr = KeyBuffer; *ptr; ptr += strlenW(ptr) + 1) + { + /* Add coinstaller to DeviceCoInstallersListHead list */ + struct CoInstallerElement *coinstaller; + TRACE("Got device coinstaller '%s'\n", debugstr_w(ptr)); + coinstaller = HeapAlloc(GetProcessHeap(), 0, sizeof(struct CoInstallerElement)); + if (!coinstaller) + continue; + memset(coinstaller, 0, sizeof(struct CoInstallerElement)); + if (GetFunctionPointer(ptr, &coinstaller->Module, (PVOID*)&coinstaller->Function) == ERROR_SUCCESS) + InsertTailList(&DeviceCoInstallersListHead, &coinstaller->ListEntry); + else + HeapFree(GetProcessHeap(), 0, coinstaller); + } + } + HeapFree(GetProcessHeap(), 0, KeyBuffer); + } + } + RegCloseKey(hKey); + } } if (CanHandle & CLASS_COINSTALLER) { @@ -3157,7 +3193,7 @@ if (UuidToStringW((UUID*)&DeviceInfoData->ClassGuid, &lpGuidString) == RPC_S_OK) { rc = RegQueryValueExW(hKey, lpGuidString, NULL, &dwRegType, NULL, &dwLength); - if (rc == ERROR_SUCCESS && dwRegType == REG_SZ) + if (rc == ERROR_SUCCESS && dwRegType == REG_MULTI_SZ) { LPWSTR KeyBuffer = HeapAlloc(GetProcessHeap(), 0, dwLength); if (KeyBuffer != NULL) @@ -3165,11 +3201,20 @@ rc = RegQueryValueExW(hKey, lpGuidString, NULL, NULL, (LPBYTE)KeyBuffer, &dwLength); if (rc == ERROR_SUCCESS) { - LPCWSTR ptr; + LPWSTR ptr; for (ptr = KeyBuffer; *ptr; ptr += strlenW(ptr) + 1) { /* Add coinstaller to ClassCoInstallersListHead list */ - FIXME("Class coinstaller is '%S'. UNIMPLEMENTED!\n", ptr); + struct CoInstallerElement *coinstaller; + TRACE("Got class coinstaller '%s'\n", debugstr_w(ptr)); + coinstaller = HeapAlloc(GetProcessHeap(), 0, sizeof(struct CoInstallerElement)); + if (!coinstaller) + continue; + memset(coinstaller, 0, sizeof(struct CoInstallerElement)); + if (GetFunctionPointer(ptr, &coinstaller->Module, (PVOID*)&coinstaller->Function) == ERROR_SUCCESS) + InsertTailList(&ClassCoInstallersListHead, &coinstaller->ListEntry); + else + HeapFree(GetProcessHeap(), 0, coinstaller); } } HeapFree(GetProcessHeap(), 0, KeyBuffer); @@ -3195,6 +3240,7 @@ if (rc == ERROR_SUCCESS) { /* Get ClassInstaller function pointer */ + TRACE("Got class installer '%s'\n", debugstr_w(KeyBuffer)); if (GetFunctionPointer(KeyBuffer, &ClassInstallerLibrary, (PVOID*)&ClassInstaller) != ERROR_SUCCESS) { InstallParams.FlagsEx |= DI_FLAGSEX_CI_FAILED; @@ -5337,13 +5383,13 @@ InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS_W); ret = SetupDiGetDeviceInstallParamsW(DeviceInfoSet, DeviceInfoData, &InstallParams); if (!ret) - goto cleanup; + goto done; SelectedDriver = (struct DriverInfoElement *)InstallParams.Reserved; if (!SelectedDriver) { SetLastError(ERROR_NO_DRIVER_SELECTED); - goto cleanup; + goto done; } ret = SetupDiGetActualSectionToInstallW( @@ -5351,34 +5397,22 @@ SelectedDriver->Details.SectionName, SectionName, MAX_PATH, &SectionNameLength, NULL); if (!ret) - goto cleanup; + goto done; - if (InstallParams.InstallMsgHandler) + if (!InstallParams.InstallMsgHandler) { - ret = SetupInstallFromInfSectionW(InstallParams.hwndParent, - SelectedDriver->InfFileDetails->hInf, SectionName, - SPINST_FILES, NULL, NULL, SP_COPY_NEWER, - InstallParams.InstallMsgHandler, InstallParams.InstallMsgHandlerContext, - DeviceInfoSet, DeviceInfoData); + InstallParams.InstallMsgHandler = SetupDefaultQueueCallbackW; + InstallParams.InstallMsgHandlerContext = SetupInitDefaultQueueCallback(InstallParams.hwndParent); + SetupDiSetDeviceInstallParamsW(DeviceInfoSet, DeviceInfoData, &InstallParams); } - else - { - PVOID callback_context = SetupInitDefaultQueueCallback(InstallParams.hwndParent); - ret = SetupInstallFromInfSectionW(InstallParams.hwndParent, - SelectedDriver->InfFileDetails->hInf, SectionName, - SPINST_FILES, NULL, NULL, SP_COPY_NEWER, - SetupDefaultQueueCallbackW, callback_context, - DeviceInfoSet, DeviceInfoData); - SetupTermDefaultQueueCallback(callback_context); - } -cleanup: - if (ret) - { - InstallParams.Flags |= DI_NOFILECOPY; - ret = SetupDiSetDeviceInstallParamsW(DeviceInfoSet, DeviceInfoData, &InstallParams); - } + ret = SetupInstallFromInfSectionW(InstallParams.hwndParent, + SelectedDriver->InfFileDetails->hInf, SectionName, + SPINST_FILES, NULL, NULL, SP_COPY_NEWER, + InstallParams.InstallMsgHandler, InstallParams.InstallMsgHandlerContext, + DeviceInfoSet, DeviceInfoData); } +done: TRACE("Returning %d\n", ret); return ret; } @@ -5391,12 +5425,91 @@ IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData) { + BOOL ret = FALSE; /* Return value */ + TRACE("%p %p\n", DeviceInfoSet, DeviceInfoData); - FIXME("SetupDiRegisterCoDeviceInstallers not implemented. Doing nothing\n"); - //SetLastError(ERROR_GEN_FAILURE); - //return FALSE; - return TRUE; + if (!DeviceInfoSet) + SetLastError(ERROR_INVALID_PARAMETER); + else if (DeviceInfoSet == (HDEVINFO)INVALID_HANDLE_VALUE) + SetLastError(ERROR_INVALID_HANDLE); + else if (((struct DeviceInfoSet *)DeviceInfoSet)->magic != SETUP_DEV_INFO_SET_MAGIC) + SetLastError(ERROR_INVALID_HANDLE); + else if (!DeviceInfoData) + SetLastError(ERROR_INVALID_PARAMETER); + else if (DeviceInfoData->cbSize != sizeof(SP_DEVINFO_DATA)) + SetLastError(ERROR_INVALID_USER_BUFFER); + else + { + SP_DEVINSTALL_PARAMS_W InstallParams; + struct DriverInfoElement *SelectedDriver; + BOOL Result; + DWORD DoAction; + WCHAR SectionName[MAX_PATH]; + DWORD SectionNameLength = 0; + HKEY hKey = INVALID_HANDLE_VALUE;; + + InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS_W); + Result = SetupDiGetDeviceInstallParamsW(DeviceInfoSet, DeviceInfoData, &InstallParams); + if (!Result) + goto cleanup; + + SelectedDriver = (struct DriverInfoElement *)InstallParams.Reserved; + if (SelectedDriver == NULL) + { + SetLastError(ERROR_NO_DRIVER_SELECTED); + goto cleanup; + } + + /* Get .CoInstallers section name */ + Result = SetupDiGetActualSectionToInstallW( + SelectedDriver->InfFileDetails->hInf, + SelectedDriver->Details.SectionName, + SectionName, MAX_PATH, &SectionNameLength, NULL); + if (!Result || SectionNameLength > MAX_PATH - wcslen(L".CoInstallers") - 1) + goto cleanup; + wcscat(SectionName, L".CoInstallers"); + + /* Open/Create driver key information */ +#if _WIN32_WINNT >= 0x502 + hKey = SetupDiOpenDevRegKey(DeviceInfoSet, DeviceInfoData, DICS_FLAG_GLOBAL, 0, DIREG_DRV, KEY_READ | KEY_WRITE); +#else + hKey = SetupDiOpenDevRegKey(DeviceInfoSet, DeviceInfoData, DICS_FLAG_GLOBAL, 0, DIREG_DRV, KEY_ALL_ACCESS); +#endif + if (hKey == INVALID_HANDLE_VALUE && GetLastError() == ERROR_FILE_NOT_FOUND) + hKey = SetupDiCreateDevRegKeyW(DeviceInfoSet, DeviceInfoData, DICS_FLAG_GLOBAL, 0, DIREG_DRV, NULL, NULL); + if (hKey == INVALID_HANDLE_VALUE) + goto cleanup; + + /* Install .CoInstallers section */ + DoAction = SPINST_REGISTRY; + if (!(InstallParams.Flags & DI_NOFILECOPY)) + { + DoAction |= SPINST_FILES; + if (!InstallParams.InstallMsgHandler) + { + InstallParams.InstallMsgHandler = SetupDefaultQueueCallbackW; + InstallParams.InstallMsgHandlerContext = SetupInitDefaultQueueCallback(InstallParams.hwndParent); + SetupDiSetDeviceInstallParamsW(DeviceInfoSet, DeviceInfoData, &InstallParams); + } + } + Result = SetupInstallFromInfSectionW(InstallParams.hwndParent, + SelectedDriver->InfFileDetails->hInf, SectionName, + DoAction, hKey, NULL, SP_COPY_NEWER, + InstallParams.InstallMsgHandler, InstallParams.InstallMsgHandlerContext, + DeviceInfoSet, DeviceInfoData); + if (!Result) + goto cleanup; + + ret = TRUE; + +cleanup: + if (hKey != INVALID_HANDLE_VALUE) + RegCloseKey(hKey); + } + + TRACE("Returning %d\n", ret); + return ret; } /*********************************************************************** @@ -5525,9 +5638,15 @@ /* Install main section */ DoAction = SPINST_REGISTRY; if (!(InstallParams.Flags & DI_NOFILECOPY)) + { DoAction |= SPINST_FILES; - /* Files have already been copied in SetupDiInstallDriverFiles. - * Process only registry entries. */ + if (!InstallParams.InstallMsgHandler) + { + InstallParams.InstallMsgHandler = SetupDefaultQueueCallbackW; + InstallParams.InstallMsgHandlerContext = SetupInitDefaultQueueCallback(InstallParams.hwndParent); + SetupDiSetDeviceInstallParamsW(DeviceInfoSet, DeviceInfoData, &InstallParams); + } + } *pSectionName = '\0'; Result = SetupInstallFromInfSectionW(InstallParams.hwndParent, SelectedDriver->InfFileDetails->hInf, SectionName, @@ -5538,10 +5657,11 @@ goto cleanup; if (!(InstallParams.Flags & DI_NOFILECOPY) && !(InstallParams.Flags & DI_NOVCP)) { - Result = SetupCommitFileQueueW(InstallParams.hwndParent, - InstallParams.FileQueue, - InstallParams.InstallMsgHandler, - InstallParams.InstallMsgHandlerContext); + if (Result && InstallParams.InstallMsgHandler == SetupDefaultQueueCallbackW) + { + /* Delete resources allocated by SetupInitDefaultQueueCallback */ + SetupTermDefaultQueueCallback(InstallParams.InstallMsgHandlerContext); + } } InstallParams.Flags |= DI_NOFILECOPY; SetupDiSetDeviceInstallParamsW(DeviceInfoSet, DeviceInfoData, &InstallParams);
19 years, 2 months
1
0
0
0
[hpoussin] 18733: Set NULL driver for LPT ports
by hpoussin@svn.reactos.com
Set NULL driver for LPT ports Add more PnP IDs in machine.inf Modified: trunk/reactos/media/inf/machine.inf Modified: trunk/reactos/media/inf/ports.inf _____ Modified: trunk/reactos/media/inf/machine.inf --- trunk/reactos/media/inf/machine.inf 2005-10-24 09:39:53 UTC (rev 18732) +++ trunk/reactos/media/inf/machine.inf 2005-10-24 11:40:14 UTC (rev 18733) @@ -25,28 +25,29 @@ %GenericMfg% = GenericMfg %IntelMfg% = IntelMfg +[GenericMfg] +%*PNP0001.DeviceDesc% = NO_DRV,*PNP0001 +%*PNP0100.DeviceDesc% = NO_DRV,*PNP0100 +%*PNP0200.DeviceDesc% = NO_DRV,*PNP0200 +%*PNP0800.DeviceDesc% = NO_DRV,*PNP0800 +%*PNP0A00.DeviceDesc% = PCI_ISA_Inst,*PNP0A00 +%*PNP0A03.DeviceDesc% = PCI_Inst,*PNP0A03 +%*PNP0A05.DeviceDesc% = NO_DRV,*PNP0A05 +%*PNP0B00.DeviceDesc% = NO_DRV,*PNP0B00 +%*PNP0C02.DeviceDesc% = NO_DRV,*PNP0C02 +%ACPI\FixedButton.DeviceDesc% = NO_DRV,ACPI\FixedButton +%PCI\CC_0600.DeviceDesc% = NO_DRV,PCI\CC_0600 +%PCI\CC_0601.DeviceDesc% = PCI_Inst,PCI\CC_0604 +%PCI\CC_0604.DeviceDesc% = PCI_ISA_Inst,PCI\CC_0604 + [IntelMfg] -; DO NOT INSTALL ISAPNP -> FREEZES SYSTEM -;%PCI\VEN_8086&DEV_7110.DeviceDesc% = Intel_PCI_ISA_Inst, PCI\VEN_8086&DEV_7110 -%PCI\VEN_8086&DEV_7110.DeviceDesc% = NO_DRV, PCI\VEN_8086&DEV_7110 -%PCI\VEN_8086&DEV_7113.DeviceDesc% = NO_DRV, PCI\VEN_8086&DEV_7113 -%PCI\VEN_8086&DEV_7180.DeviceDesc% = NO_DRV, PCI\VEN_8086&DEV_7180 -%PCI\VEN_8086&DEV_7190.DeviceDesc% = NO_DRV, PCI\VEN_8086&DEV_7190 -%PCI\VEN_8086&DEV_7192.DeviceDesc% = NO_DRV, PCI\VEN_8086&DEV_7192 +%PCI\VEN_8086&DEV_7110.DeviceDesc% = PCI_ISA_Inst,PCI\VEN_8086&DEV_7110 +%PCI\VEN_8086&DEV_7110.DeviceDesc% = NO_DRV,PCI\VEN_8086&DEV_7110 +%PCI\VEN_8086&DEV_7113.DeviceDesc% = NO_DRV,PCI\VEN_8086&DEV_7113 +%PCI\VEN_8086&DEV_7180.DeviceDesc% = NO_DRV,PCI\VEN_8086&DEV_7180 +%PCI\VEN_8086&DEV_7190.DeviceDesc% = NO_DRV,PCI\VEN_8086&DEV_7190 +%PCI\VEN_8086&DEV_7192.DeviceDesc% = NO_DRV,PCI\VEN_8086&DEV_7192 -[GenericMfg] -%*PNP0001.DeviceDesc% = NO_DRV, *PNP0001 -%*PNP0100.DeviceDesc% = NO_DRV, *PNP0100 -%*PNP0200.DeviceDesc% = NO_DRV, *PNP0200 -%*PNP0800.DeviceDesc% = NO_DRV, *PNP0800 -%*PNP0A03.DeviceDesc% = PCI_Inst, *PNP0A03 -%*PNP0A05.DeviceDesc% = NO_DRV, *PNP0A05 -%*PNP0B00.DeviceDesc% = NO_DRV, *PNP0B00 -%*PNP0C02.DeviceDesc% = NO_DRV, *PNP0C02 -%*PNP0C0F.DeviceDesc% = NO_DRV, *PNP0C0F -%ACPI\FixedButton.DeviceDesc% = NO_DRV, ACPI\FixedButton -%PCI\CC_0604.DeviceDesc% = PCI_Inst,PCI\CC_0604 - ;---------------------------- NO DRIVER REQ ----------------------------- [NO_DRV] @@ -54,16 +55,18 @@ [NO_DRV.Services] AddService = , 0x00000002 -;----------------------------- INTEL DRIVER ----------------------------- +;-------------------------- PCI-ISA BUS DRIVER -------------------------- -[Intel_PCI_ISA_Inst] -CopyFiles = Intel_PCI_ISA_CopyFiles.NT +[PCI_ISA_Inst.NT] +CopyFiles = PCI_ISA_CopyFiles.NT -[Intel_PCI_ISA_CopyFiles.NT] +[PCI_ISA_CopyFiles.NT] isapnp.sys -[Intel_PCI_ISA_Inst.NT.Services] -AddService = isapnp, 0x00000002, isapnp_Service_Inst +[PCI_ISA_Inst.NT.Services] +;DO NOT INSTALL ISAPNP -> FREEZES SYSTEM +;AddService = isapnp, 0x00000002, isapnp_Service_Inst +AddService = , 0x00000002 [isapnp_Service_Inst] ServiceType = 1 @@ -107,11 +110,13 @@ *PNP0C02.DeviceDesc = "Motherboard resources" *PNP0C0F.DeviceDesc = "PCI interrupt link device" ACPI\FixedButton.DeviceDesc ="ACPI Fixed Feature Button" +PCI\CC_0600.DeviceDesc = "Standard CPU to PCI bridge" +PCI\CC_0601.DeviceDesc = "Standard PCI to ISA bridge" PCI\CC_0604.DeviceDesc = "Standard PCI to PCI bridge" IntelMfg = "Intel" +PCI\VEN_8086&DEV_7110.DeviceDesc = "Intel 82371AB/EB PCI to ISA Bridge" +PCI\VEN_8086&DEV_7113.DeviceDesc = "Intel 82371AB/EB Power Management Controller" PCI\VEN_8086&DEV_7180.DeviceDesc = "Intel 82443LX/EX Pentium(R) II CPU to PCI-Bridge" PCI\VEN_8086&DEV_7190.DeviceDesc = "Intel 82443BX/ZX/DX Pentium(R) II CPU to PCI-Bridge" PCI\VEN_8086&DEV_7192.DeviceDesc = "Intel 82443BX/ZX/DX Pentium(R) II CPU to PCI-Bridge" -PCI\VEN_8086&DEV_7113.DeviceDesc = "Intel 82371AB/EB Power Management Controller" -PCI\VEN_8086&DEV_7110.DeviceDesc = "Intel 82371AB/EB PCI to ISA Bridge" \ No newline at end of file _____ Modified: trunk/reactos/media/inf/ports.inf --- trunk/reactos/media/inf/ports.inf 2005-10-24 09:39:53 UTC (rev 18732) +++ trunk/reactos/media/inf/ports.inf 2005-10-24 11:40:14 UTC (rev 18733) @@ -34,9 +34,9 @@ ;---------------------------- LPT PORT DRIVER --------------------------- [LptPort_Inst.NT] -CopyFiles = LptPort_CopyFiles.NT -[LptPort_CopyFiles.NT] +[LptPort_Inst.NT.Services] +AddService = , 0x00000002 ;---------------------------- COM PORT DRIVER ---------------------------
19 years, 2 months
1
0
0
0
[hpoussin] 18732: Add functions to reference/dereference InfFileDetails structure added in r18731 (suggestion by w3seek)
by hpoussin@svn.reactos.com
Add functions to reference/dereference InfFileDetails structure added in r18731 (suggestion by w3seek) Modified: trunk/reactos/lib/setupapi/devinst.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-10-24 09:16:34 UTC (rev 18731) +++ trunk/reactos/lib/setupapi/devinst.c 2005-10-24 09:39:53 UTC (rev 18732) @@ -1943,13 +1943,23 @@ return ret; } -static BOOL DestroyDriverInfoElement(struct DriverInfoElement* driverInfo) +static VOID ReferenceInfFile(struct InfFileDetails* infFile) { - if (InterlockedDecrement(&driverInfo->InfFileDetails->References) == 0) + InterlockedIncrement(&infFile->References); +} + +static VOID DereferenceInfFile(struct InfFileDetails* infFile) +{ + if (InterlockedDecrement(&infFile->References) == 0) { - SetupCloseInfFile(driverInfo->InfFileDetails->hInf); - HeapFree(GetProcessHeap(), 0, driverInfo->InfFileDetails); + SetupCloseInfFile(infFile->hInf); + HeapFree(GetProcessHeap(), 0, infFile); } +} + +static BOOL DestroyDriverInfoElement(struct DriverInfoElement* driverInfo) +{ + DereferenceInfFile(driverInfo->InfFileDetails); HeapFree(GetProcessHeap(), 0, driverInfo->MatchingId); HeapFree(GetProcessHeap(), 0, driverInfo); return TRUE; @@ -3972,7 +3982,7 @@ driverInfo->Info.ProviderName[0] = '\0'; driverInfo->Info.DriverDate = DriverDate; driverInfo->Info.DriverVersion = DriverVersion; - InterlockedIncrement(&InfFileDetails->References); + ReferenceInfFile(InfFileDetails); driverInfo->InfFileDetails = InfFileDetails; /* Insert current driver in driver list, according to its rank */ @@ -4271,6 +4281,7 @@ memset(currentInfFileDetails, 0, sizeof(struct InfFileDetails)); currentInfFileDetails->hInf = SetupOpenInfFileW(filename, NULL, INF_STYLE_WIN4, NULL); + ReferenceInfFile(currentInfFileDetails); if (currentInfFileDetails->hInf == INVALID_HANDLE_VALUE) { HeapFree(GetProcessHeap(), 0, currentInfFileDetails); @@ -4456,12 +4467,8 @@ HeapFree(GetProcessHeap(), 0, ProviderName); ProviderName = NULL; - if (currentInfFileDetails->References == 0) - { - SetupCloseInfFile(currentInfFileDetails->hInf); - HeapFree(GetProcessHeap(), 0, currentInfFileDetails); - currentInfFileDetails = NULL; - } + DereferenceInfFile(currentInfFileDetails); + currentInfFileDetails = NULL; } ret = TRUE; } @@ -4487,11 +4494,8 @@ HeapFree(GetProcessHeap(), 0, ManufacturerName); HeapFree(GetProcessHeap(), 0, HardwareIDs); HeapFree(GetProcessHeap(), 0, CompatibleIDs); - if (currentInfFileDetails && currentInfFileDetails->References == 0) - { - SetupCloseInfFile(currentInfFileDetails->hInf); - HeapFree(GetProcessHeap(), 0, currentInfFileDetails); - } + if (currentInfFileDetails) + DereferenceInfFile(currentInfFileDetails); HeapFree(GetProcessHeap(), 0, Buffer); TRACE("Returning %d\n", ret);
19 years, 2 months
1
0
0
0
[hpoussin] 18731: Don't leak memory when destroying device info set and driver lists
by hpoussin@svn.reactos.com
Don't leak memory when destroying device info set and driver lists Try to keep .inf files handles instead of opening/parsing them at each device installation step Modified: trunk/reactos/lib/setupapi/devinst.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-10-24 05:05:07 UTC (rev 18730) +++ trunk/reactos/lib/setupapi/devinst.c 2005-10-24 09:16:34 UTC (rev 18731) @@ -116,6 +116,14 @@ WCHAR SymbolicLink[0]; /* \\?\ACPI#PNP0501#4&2658d0a0&0#{GUID} */ }; +/* We don't want to open the .inf file to read only one information in it, so keep a handle to it once it + * has been already loaded once. Keep also a reference counter */ +struct InfFileDetails +{ + HINF hInf; + ULONG References; +}; + struct DriverInfoElement /* Element of DeviceInfoSet.DriverListHead and DeviceInfoElement.DriverListHead */ { LIST_ENTRY ListEntry; @@ -125,6 +133,7 @@ SP_DRVINFO_DETAIL_DATA_W Details; GUID ClassGuid; LPWSTR MatchingId; + struct InfFileDetails *InfFileDetails; }; struct DeviceInfoElement /* Element of DeviceInfoSet.ListHead */ @@ -1934,6 +1943,57 @@ return ret; } +static BOOL DestroyDriverInfoElement(struct DriverInfoElement* driverInfo) +{ + if (InterlockedDecrement(&driverInfo->InfFileDetails->References) == 0) + { + SetupCloseInfFile(driverInfo->InfFileDetails->hInf); + HeapFree(GetProcessHeap(), 0, driverInfo->InfFileDetails); + } + HeapFree(GetProcessHeap(), 0, driverInfo->MatchingId); + HeapFree(GetProcessHeap(), 0, driverInfo); + return TRUE; +} + +static BOOL DestroyDeviceInfoElement(struct DeviceInfoElement* deviceInfo) +{ + PLIST_ENTRY ListEntry; + struct DriverInfoElement *driverInfo; + + while (!IsListEmpty(&deviceInfo->DriverListHead)) + { + ListEntry = RemoveHeadList(&deviceInfo->DriverListHead); + driverInfo = (struct DriverInfoElement *)ListEntry; + if (!DestroyDriverInfoElement(driverInfo)) + return FALSE; + } + while (!IsListEmpty(&deviceInfo->InterfaceListHead)) + { + ListEntry = RemoveHeadList(&deviceInfo->InterfaceListHead); + HeapFree(GetProcessHeap(), 0, ListEntry); + } + HeapFree(GetProcessHeap(), 0, deviceInfo); + return TRUE; +} + +static BOOL DestroyDeviceInfoSet(struct DeviceInfoSet* list) +{ + PLIST_ENTRY ListEntry; + struct DeviceInfoElement *deviceInfo; + + while (!IsListEmpty(&list->ListHead)) + { + ListEntry = RemoveHeadList(&list->ListHead); + deviceInfo = (struct DeviceInfoElement *)ListEntry; + if (!DestroyDeviceInfoElement(deviceInfo)) + return FALSE; + } + if (list->HKLM != HKEY_LOCAL_MACHINE) + RegCloseKey(list->HKLM); + HeapFree(GetProcessHeap(), 0, list); + return TRUE; +} + /*********************************************************************** * SetupDiDestroyDeviceInfoList (SETUPAPI.@) */ @@ -1947,25 +2007,7 @@ struct DeviceInfoSet *list = (struct DeviceInfoSet *)devinfo; if (list->magic == SETUP_DEV_INFO_SET_MAGIC) - { - PLIST_ENTRY ListEntry, InterfaceEntry; - struct DeviceInfoElement *deviceInfo; - while (!IsListEmpty(&list->ListHead)) - { - ListEntry = RemoveHeadList(&list->ListHead); - deviceInfo = (struct DeviceInfoElement *)ListEntry; - while (!IsListEmpty(&deviceInfo->InterfaceListHead)) - { - InterfaceEntry = RemoveHeadList(&deviceInfo->InterfaceListHead); - HeapFree(GetProcessHeap(), 0, InterfaceEntry); - } - HeapFree(GetProcessHeap(), 0, ListEntry); - } - if (list->HKLM != HKEY_LOCAL_MACHINE) - RegCloseKey(list->HKLM); - HeapFree(GetProcessHeap(), 0, list); - ret = TRUE; - } + ret = DestroyDeviceInfoSet(list); else SetLastError(ERROR_INVALID_HANDLE); } @@ -3824,6 +3866,7 @@ IN DWORD DriverType, /* SPDIT_CLASSDRIVER or SPDIT_COMPATDRIVER */ IN LPGUID ClassGuid, IN INFCONTEXT ContextDevice, + IN struct InfFileDetails *InfFileDetails, IN LPCWSTR InfFile, IN LPCWSTR ProviderName, IN LPCWSTR ManufacturerName, @@ -3929,6 +3972,8 @@ driverInfo->Info.ProviderName[0] = '\0'; driverInfo->Info.DriverDate = DriverDate; driverInfo->Info.DriverVersion = DriverVersion; + InterlockedIncrement(&InfFileDetails->References); + driverInfo->InfFileDetails = InfFileDetails; /* Insert current driver in driver list, according to its rank */ PreviousEntry = DriverListHead->Flink; @@ -4094,7 +4139,7 @@ struct DeviceInfoSet *list; SP_DEVINSTALL_PARAMS_W InstallParams; PVOID Buffer = NULL; - HINF hInf = INVALID_HANDLE_VALUE; + struct InfFileDetails *currentInfFileDetails = NULL; LPWSTR ProviderName = NULL; LPWSTR ManufacturerName = NULL; WCHAR ManufacturerSection[LINE_LEN + 1]; @@ -4220,19 +4265,29 @@ GUID ClassGuid; TRACE("Opening file %S\n", filename); - hInf = SetupOpenInfFileW(filename, NULL, INF_STYLE_WIN4, NULL); - if (hInf == INVALID_HANDLE_VALUE) + currentInfFileDetails = HeapAlloc(GetProcessHeap(), 0, sizeof(struct InfFileDetails)); + if (!currentInfFileDetails) continue; + memset(currentInfFileDetails, 0, sizeof(struct InfFileDetails)); + currentInfFileDetails->hInf = SetupOpenInfFileW(filename, NULL, INF_STYLE_WIN4, NULL); + if (currentInfFileDetails->hInf == INVALID_HANDLE_VALUE) + { + HeapFree(GetProcessHeap(), 0, currentInfFileDetails); + currentInfFileDetails = NULL; + continue; + } + if (!GetVersionInformationFromInfFile( - hInf, + currentInfFileDetails->hInf, &ClassGuid, &ProviderName, &DriverDate, &DriverVersion)) { - SetupCloseInfFile(hInf); - hInf = INVALID_HANDLE_VALUE; + SetupCloseInfFile(currentInfFileDetails->hInf); + HeapFree(GetProcessHeap(), 0, currentInfFileDetails->hInf); + currentInfFileDetails = NULL; continue; } @@ -4246,7 +4301,7 @@ } /* Get the manufacturers list */ - Result = SetupFindFirstLineW(hInf, L"Manufacturer", NULL, &ContextManufacturer); + Result = SetupFindFirstLineW(currentInfFileDetails->hInf, L"Manufacturer", NULL, &ContextManufacturer); while (Result) { Result = SetupGetStringFieldW( @@ -4280,11 +4335,11 @@ ManufacturerSection[RequiredSize] = 0; /* Final NULL char */ /* Add (possible) extension to manufacturer section name */ Result = SetupDiGetActualSectionToInstallW( - hInf, ManufacturerSection, ManufacturerSection, LINE_LEN, NULL, NULL); + currentInfFileDetails->hInf, ManufacturerSection, ManufacturerSection, LINE_LEN, NULL, NULL); if (Result) { TRACE("Enumerating devices in manufacturer %S\n", ManufacturerSection); - Result = SetupFindFirstLineW(hInf, ManufacturerSection, NULL, &ContextDevice); + Result = SetupFindFirstLineW(currentInfFileDetails->hInf, ManufacturerSection, NULL, &ContextDevice); } } while (Result) @@ -4297,6 +4352,7 @@ DriverType, &ClassGuid, ContextDevice, + currentInfFileDetails, filename, ProviderName, ManufacturerName, @@ -4352,6 +4408,7 @@ DriverType, &ClassGuid, ContextDevice, + currentInfFileDetails, filename, ProviderName, ManufacturerName, @@ -4372,6 +4429,7 @@ DriverType, &ClassGuid, ContextDevice, + currentInfFileDetails, filename, ProviderName, ManufacturerName, @@ -4398,8 +4456,12 @@ HeapFree(GetProcessHeap(), 0, ProviderName); ProviderName = NULL; - SetupCloseInfFile(hInf); - hInf = INVALID_HANDLE_VALUE; + if (currentInfFileDetails->References == 0) + { + SetupCloseInfFile(currentInfFileDetails->hInf); + HeapFree(GetProcessHeap(), 0, currentInfFileDetails); + currentInfFileDetails = NULL; + } } ret = TRUE; } @@ -4425,8 +4487,11 @@ HeapFree(GetProcessHeap(), 0, ManufacturerName); HeapFree(GetProcessHeap(), 0, HardwareIDs); HeapFree(GetProcessHeap(), 0, CompatibleIDs); - if (hInf != INVALID_HANDLE_VALUE) - SetupCloseInfFile(hInf); + if (currentInfFileDetails && currentInfFileDetails->References == 0) + { + SetupCloseInfFile(currentInfFileDetails->hInf); + HeapFree(GetProcessHeap(), 0, currentInfFileDetails); + } HeapFree(GetProcessHeap(), 0, Buffer); TRACE("Returning %d\n", ret); @@ -4505,8 +4570,7 @@ { ListEntry = RemoveHeadList(&list->DriverListHead); driverInfo = (struct DriverInfoElement *)ListEntry; - HeapFree(GetProcessHeap(), 0, driverInfo->MatchingId); - HeapFree(GetProcessHeap(), 0, driverInfo); + DestroyDriverInfoElement(driverInfo); } InstallParams.Reserved = 0; InstallParams.Flags &= ~(DI_DIDCLASS | DI_MULTMFGS); @@ -4531,8 +4595,7 @@ InstallParamsSet.Reserved = 0; SetupDiSetDeviceInstallParamsW(DeviceInfoSet, NULL, &InstallParamsSet); } - HeapFree(GetProcessHeap(), 0, driverInfo->MatchingId); - HeapFree(GetProcessHeap(), 0, driverInfo); + DestroyDriverInfoElement(driverInfo); } InstallParams.Reserved = 0; InstallParams.Flags &= ~DI_DIDCOMPAT; @@ -5263,7 +5326,6 @@ else { SP_DEVINSTALL_PARAMS_W InstallParams; - HINF hInf = INVALID_HANDLE_VALUE; struct DriverInfoElement *SelectedDriver; WCHAR SectionName[MAX_PATH]; DWORD SectionNameLength = 0; @@ -5280,18 +5342,17 @@ goto cleanup; } - hInf = SetupOpenInfFileW(SelectedDriver->Details.InfFileName, NULL, INF_STYLE_WIN4, NULL); - if (hInf == INVALID_HANDLE_VALUE) - goto cleanup; - - ret = SetupDiGetActualSectionToInstallW(hInf, SelectedDriver->Details.SectionName, + ret = SetupDiGetActualSectionToInstallW( + SelectedDriver->InfFileDetails->hInf, + SelectedDriver->Details.SectionName, SectionName, MAX_PATH, &SectionNameLength, NULL); if (!ret) goto cleanup; if (InstallParams.InstallMsgHandler) { - ret = SetupInstallFromInfSectionW(InstallParams.hwndParent, hInf, SectionName, + ret = SetupInstallFromInfSectionW(InstallParams.hwndParent, + SelectedDriver->InfFileDetails->hInf, SectionName, SPINST_FILES, NULL, NULL, SP_COPY_NEWER, InstallParams.InstallMsgHandler, InstallParams.InstallMsgHandlerContext, DeviceInfoSet, DeviceInfoData); @@ -5299,15 +5360,14 @@ else { PVOID callback_context = SetupInitDefaultQueueCallback(InstallParams.hwndParent); - ret = SetupInstallFromInfSectionW(InstallParams.hwndParent, hInf, SectionName, + ret = SetupInstallFromInfSectionW(InstallParams.hwndParent, + SelectedDriver->InfFileDetails->hInf, SectionName, SPINST_FILES, NULL, NULL, SP_COPY_NEWER, SetupDefaultQueueCallbackW, callback_context, DeviceInfoSet, DeviceInfoData); SetupTermDefaultQueueCallback(callback_context); } cleanup: - if (hInf != INVALID_HANDLE_VALUE) - SetupCloseInfFile(hInf); if (ret) { InstallParams.Flags |= DI_NOFILECOPY; @@ -5371,10 +5431,9 @@ INT Flags; ULONG DoAction; DWORD RequiredSize; - HINF hInf = INVALID_HANDLE_VALUE; LPCWSTR AssociatedService = NULL; LPWSTR pSectionName = NULL; - LPWSTR ClassName = NULL; + WCHAR ClassName[MAX_CLASS_NAME_LEN]; GUID ClassGuid; LPWSTR lpGuidString = NULL, lpFullGuidString = NULL; BOOL RebootRequired = FALSE; @@ -5422,32 +5481,17 @@ FileTimeToSystemTime(&SelectedDriver->Info.DriverDate, &DriverDate); - hInf = SetupOpenInfFileW(SelectedDriver->Details.InfFileName, NULL, INF_STYLE_WIN4, NULL); - if (hInf == INVALID_HANDLE_VALUE) - goto cleanup; - - Result = SetupDiGetActualSectionToInstallW(hInf, SelectedDriver->Details.SectionName, + Result = SetupDiGetActualSectionToInstallW( + SelectedDriver->InfFileDetails->hInf, + SelectedDriver->Details.SectionName, SectionName, MAX_PATH, &SectionNameLength, NULL); if (!Result || SectionNameLength > MAX_PATH - 9) goto cleanup; pSectionName = &SectionName[wcslen(SectionName)]; /* Get information from [Version] section */ - ClassName = NULL; - RequiredSize = 0; - if (!SetupDiGetINFClassW(SelectedDriver->Details.InfFileName, &ClassGuid, ClassName, RequiredSize, &RequiredSize)) - { - if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) - goto cleanup; - ClassName = HeapAlloc(GetProcessHeap(), 0, RequiredSize * sizeof(WCHAR)); - if (!ClassName) - { - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - goto cleanup; - } - if (!SetupDiGetINFClassW(SelectedDriver->Details.InfFileName, &ClassGuid, ClassName, RequiredSize, &RequiredSize)) - goto cleanup; - } + if (!SetupDiGetINFClassW(SelectedDriver->Details.InfFileName, &ClassGuid, ClassName, MAX_CLASS_NAME_LEN, &RequiredSize)) + goto cleanup; /* Format ClassGuid to a string */ if (UuidToStringW((UUID*)&ClassGuid, &lpGuidString) != RPC_S_OK) goto cleanup; @@ -5481,7 +5525,8 @@ /* Files have already been copied in SetupDiInstallDriverFiles. * Process only registry entries. */ *pSectionName = '\0'; - Result = SetupInstallFromInfSectionW(InstallParams.hwndParent, hInf, SectionName, + Result = SetupInstallFromInfSectionW(InstallParams.hwndParent, + SelectedDriver->InfFileDetails->hInf, SectionName, DoAction, hKey, NULL, SP_COPY_NEWER, InstallParams.InstallMsgHandler, InstallParams.InstallMsgHandlerContext, DeviceInfoSet, DeviceInfoData); @@ -5541,7 +5586,7 @@ /* Install .Services section */ wcscpy(pSectionName, L".Services"); - Result = SetupFindFirstLineW(hInf, SectionName, NULL, &ContextService); + Result = SetupFindFirstLineW(SelectedDriver->InfFileDetails->hInf, SectionName, NULL, &ContextService); while (Result) { LPWSTR ServiceName = NULL; @@ -5600,12 +5645,14 @@ &ContextService, 3, /* Field index */ ServiceSection, RequiredSize, - &RequiredSize); + &RequiredSize); if (!Result) - goto nextfile; + goto nextfile; } SetLastError(ERROR_SUCCESS); - Result = SetupInstallServicesFromInfSectionExW(hInf, ServiceSection, Flags, DeviceInfoSet, DeviceInfoData, ServiceName, NULL); + Result = SetupInstallServicesFromInfSectionExW( + SelectedDriver->InfFileDetails->hInf, + ServiceSection, Flags, DeviceInfoSet, DeviceInfoData, ServiceName, NULL); if (Result && (Flags & SPSVCINST_ASSOCSERVICE)) { AssociatedService = ServiceName; @@ -5631,7 +5678,8 @@ /* Install .HW section */ wcscpy(pSectionName, L".HW"); - Result = SetupInstallFromInfSectionW(InstallParams.hwndParent, hInf, SectionName, + Result = SetupInstallFromInfSectionW(InstallParams.hwndParent, + SelectedDriver->InfFileDetails->hInf, SectionName, SPINST_REGISTRY, hKey, NULL, 0, InstallParams.InstallMsgHandler, InstallParams.InstallMsgHandlerContext, DeviceInfoSet, DeviceInfoData); @@ -5681,10 +5729,7 @@ if (lpGuidString) RpcStringFreeW(&lpGuidString); HeapFree(GetProcessHeap(), 0, (LPWSTR)AssociatedService); - HeapFree(GetProcessHeap(), 0, ClassName); HeapFree(GetProcessHeap(), 0, lpFullGuidString); - if (hInf != INVALID_HANDLE_VALUE) - SetupCloseInfFile(hInf); TRACE("Returning %d\n", ret); return ret;
19 years, 2 months
1
0
0
0
[greatlrd] 18730: update the intddraw.h so it use some struct that was missing.
by greatlrd@svn.reactos.com
update the intddraw.h so it use some struct that was missing. Modified: trunk/reactos/subsys/win32k/include/intddraw.h _____ Modified: trunk/reactos/subsys/win32k/include/intddraw.h --- trunk/reactos/subsys/win32k/include/intddraw.h 2005-10-23 23:40:19 UTC (rev 18729) +++ trunk/reactos/subsys/win32k/include/intddraw.h 2005-10-24 05:05:07 UTC (rev 18730) @@ -44,20 +44,21 @@ DD_COLORCONTROLCALLBACKS Color; // D3DHAL_CALLBACKS - //D3DHAL_CALLBACKS D3dHal; - //D3DHAL_CALLBACKS3 D3dHal3; - //D3DHAL_D3DEXTENDEDCAPS D3dHal3Ext; + // D3DHAL_CALLBACKS D3dHal; + // D3DHAL_CALLBACKS3 D3dHal3; + // D3DHAL_D3DEXTENDEDCAPS D3dHal3Ext; // Heap Callback - //DD_GETHEAPALIGNMENTDATA HeapData; + DD_GETHEAPALIGNMENTDATA HeapData; // Kernel Callback - //DD_KERNELCALLBACKS Kernel; - //DDKERNELCAPS KernelCaps; + DD_KERNELCALLBACKS Kernel; + DDKERNELCAPS KernelCaps; // Miscellaneous Callback DD_MISCELLANEOUSCALLBACKS Misc; + // NT-based Callback PDD_FLIPTOGDISURFACE DdFlipToGDISurface;
19 years, 2 months
1
0
0
0
← Newer
1
...
16
17
18
19
20
21
22
...
74
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
Results per page:
10
25
50
100
200