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
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
June 2006
----- 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
19 participants
595 discussions
Start a n
N
ew thread
[amunger] 22181: Sync newdev to trunk again. Revisions: 22146, 22175
by amunger@svn.reactos.org
Author: amunger Date: Fri Jun 2 18:44:45 2006 New Revision: 22181 URL:
http://svn.reactos.ru/svn/reactos?rev=22181&view=rev
Log: Sync newdev to trunk again. Revisions: 22146, 22175 Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.c branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev_private.h branches/ros-branch-0_3_0/reactos/dll/win32/newdev/wizard.c Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.c (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev.c Fri Jun 2 18:44:45 2006 @@ -27,6 +27,12 @@ /* Global variables */ HINSTANCE hDllInstance; +static BOOL +SearchDriver( + IN PDEVINSTDATA DevInstData, + IN LPCTSTR Directory OPTIONAL, + IN LPCTSTR InfFile OPTIONAL); + /* * @implemented */ @@ -241,7 +247,7 @@ } /* Directory and InfFile MUST NOT be specified simultaneously */ -BOOL +static BOOL SearchDriver( IN PDEVINSTDATA DevInstData, IN LPCTSTR Directory OPTIONAL, @@ -269,7 +275,10 @@ _tcsncpy(DevInstallParams.DriverPath, Directory, MAX_PATH); } else + { + DevInstallParams.Flags &= ~DI_ENUMSINGLEINF; *DevInstallParams.DriverPath = _T('\0'); + } ret = SetupDiSetDeviceInstallParams( DevInstData->hDevInfo, @@ -334,7 +343,7 @@ return _T(""); } -BOOL +static BOOL SearchDriverRecursive( IN PDEVINSTDATA DevInstData, IN LPCTSTR Path) @@ -405,6 +414,118 @@ } BOOL +ScanFoldersForDriver( + IN PDEVINSTDATA DevInstData) +{ + BOOL result; + + /* Search in default location */ + result = SearchDriver(DevInstData, NULL, NULL); + + if (DevInstData->CustomSearchPath) + { + /* Search only in specified paths */ + /* We need to check all specified directories to be + * sure to find the best driver for the device. + */ + LPCTSTR Path; + for (Path = DevInstData->CustomSearchPath; *Path != '\0'; Path += _tcslen(Path) + 1) + { + TRACE("Search driver in %S\n", Path); + if (_tcslen(Path) == 2 && Path[1] == ':') + { + if (SearchDriverRecursive(DevInstData, Path)) + result = TRUE; + } + else + { + if (SearchDriver(DevInstData, Path, NULL)) + result = TRUE; + } + } + } + + return result; +} + +BOOL +PrepareFoldersToScan( + IN PDEVINSTDATA DevInstData, + IN BOOL IncludeRemovableDevices, + IN BOOL IncludeCustomPath, + IN HWND hwndCombo OPTIONAL) +{ + TCHAR drive[] = {'?',':',0}; + DWORD dwDrives = 0; + DWORD i; + UINT nType; + DWORD CustomTextLength = 0; + DWORD LengthNeeded = 0; + LPTSTR Buffer; + + TRACE("Include removable devices: %s\n", IncludeRemovableDevices ? "yes" : "no"); + TRACE("Include custom path : %s\n", IncludeCustomPath ? "yes" : "no"); + + /* Calculate length needed to store the search paths */ + if (IncludeRemovableDevices) + { + dwDrives = GetLogicalDrives(); + for (drive[0] = 'A', i = 1; drive[0] <= 'Z'; drive[0]++, i <<= 1) + { + if (dwDrives & i) + { + nType = GetDriveType(drive); + if (nType == DRIVE_REMOVABLE || nType == DRIVE_CDROM) + { + LengthNeeded += 3; + } + } + } + } + if (IncludeCustomPath) + { + CustomTextLength = 1 + ComboBox_GetTextLength(hwndCombo); + LengthNeeded += CustomTextLength; + } + + /* Allocate space for search paths */ + HeapFree(GetProcessHeap(), 0, DevInstData->CustomSearchPath); + DevInstData->CustomSearchPath = Buffer = HeapAlloc( + GetProcessHeap(), + 0, + (LengthNeeded + 1) * sizeof(TCHAR)); + if (!Buffer) + { + TRACE("HeapAlloc() failed\n"); + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + return FALSE; + } + + /* Fill search paths */ + if (IncludeRemovableDevices) + { + for (drive[0] = 'A', i = 1; drive[0] <= 'Z'; drive[0]++, i <<= 1) + { + if (dwDrives & i) + { + nType = GetDriveType(drive); + if (nType == DRIVE_REMOVABLE || nType == DRIVE_CDROM) + { + Buffer += 1 + _stprintf(Buffer, drive); + } + } + } + } + if (IncludeCustomPath) + { + Buffer += 1 + ComboBox_GetText(hwndCombo, Buffer, CustomTextLength); + } + *Buffer = _T('\0'); + + return TRUE; +} + +BOOL InstallCurrentDriver( IN PDEVINSTDATA DevInstData) { @@ -623,8 +744,13 @@ TRACE("Installing %S (%S)\n", DevInstData->buffer, InstanceId); - /* Search driver in default location */ - if (SearchDriver(DevInstData, NULL, NULL)) + /* Search driver in default location and removable devices */ + if (!PrepareFoldersToScan(DevInstData, FALSE, FALSE, NULL)) + { + TRACE("PrepareFoldersToScan() failed with error 0x%lx\n", GetLastError()); + goto cleanup; + } + if (ScanFoldersForDriver(DevInstData)) { /* Driver found ; install it */ retval = InstallCurrentDriver(DevInstData); Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev_private.h URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev_private.h (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/newdev_private.h Fri Jun 2 18:44:45 2006 @@ -36,16 +36,17 @@ #define WM_INSTALL_FINISHED (WM_USER + 11) /* newdev.c */ -BOOL -SearchDriver( - IN PDEVINSTDATA DevInstData, - IN LPCTSTR Directory OPTIONAL, - IN LPCTSTR InfFile OPTIONAL); BOOL -SearchDriverRecursive( +ScanFoldersForDriver( + IN PDEVINSTDATA DevInstData); + +BOOL +PrepareFoldersToScan( IN PDEVINSTDATA DevInstData, - IN LPCTSTR Path); + IN BOOL IncludeRemovableDevices, + IN BOOL IncludeCustomPath, + IN HWND hwndCombo OPTIONAL); BOOL InstallCurrentDriver( Modified: branches/ros-branch-0_3_0/reactos/dll/win32/newdev/wizard.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/newdev/wizard.c (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/newdev/wizard.c Fri Jun 2 18:44:45 2006 @@ -176,91 +176,6 @@ return Ret; } -static BOOL -PrepareFoldersToScan( - IN PDEVINSTDATA DevInstData, - IN HWND hwndDlg) -{ - TCHAR drive[] = {'?',':',0}; - DWORD dwDrives = 0; - DWORD i; - UINT nType; - DWORD CustomTextLength = 0; - DWORD LengthNeeded = 0; - LPTSTR Buffer; - - TRACE("Include removable devices: %s\n", IsDlgButtonChecked(hwndDlg, IDC_CHECK_MEDIA) ? "yes" : "no"); - TRACE("Include custom path : %s\n", IsDlgButtonChecked(hwndDlg, IDC_CHECK_PATH) ? "yes" : "no"); - - /* Calculate length needed to store the search paths */ - if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_MEDIA)) - { - dwDrives = GetLogicalDrives(); - for (drive[0] = 'A', i = 1; drive[0] <= 'Z'; drive[0]++, i <<= 1) - { - if (dwDrives & i) - { - nType = GetDriveType(drive); - if (nType == DRIVE_REMOVABLE || nType == DRIVE_CDROM) - { - LengthNeeded += 3; - } - } - } - } - if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_PATH)) - { - CustomTextLength = 1 + SendDlgItemMessage( - hwndDlg, - IDC_COMBO_PATH, - WM_GETTEXTLENGTH, - (WPARAM)0, - (LPARAM)0); - LengthNeeded += CustomTextLength; - } - - /* Allocate space for search paths */ - HeapFree(GetProcessHeap(), 0, DevInstData->CustomSearchPath); - DevInstData->CustomSearchPath = Buffer = HeapAlloc( - GetProcessHeap(), - 0, - (LengthNeeded + 1) * sizeof(TCHAR)); - if (!Buffer) - { - TRACE("HeapAlloc() failed\n"); - SetLastError(ERROR_NOT_ENOUGH_MEMORY); - return FALSE; - } - - /* Fill search paths */ - if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_MEDIA)) - { - for (drive[0] = 'A', i = 1; drive[0] <= 'Z'; drive[0]++, i <<= 1) - { - if (dwDrives & i) - { - nType = GetDriveType(drive); - if (nType == DRIVE_REMOVABLE || nType == DRIVE_CDROM) - { - Buffer += 1 + _stprintf(Buffer, drive); - } - } - } - } - if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_PATH)) - { - Buffer += 1 + SendDlgItemMessage( - hwndDlg, - IDC_COMBO_PATH, - WM_GETTEXT, - (WPARAM)CustomTextLength, - (LPARAM)Buffer); - } - *Buffer = _T('\0'); - - return TRUE; -} - static DWORD WINAPI FindDriverProc( IN LPVOID lpParam) @@ -271,39 +186,7 @@ DevInstData = (PDEVINSTDATA)lpParam; - /* Yes, we can safely ignore the problem (if any) */ - SetupDiDestroyDriverInfoList( - DevInstData->hDevInfo, - &DevInstData->devInfoData, - SPDIT_COMPATDRIVER); - - if (!DevInstData->CustomSearchPath) - { - /* Search in default location */ - result = SearchDriver(DevInstData, NULL, NULL); - } - else - { - /* Search only in specified paths */ - /* We need to check all specified directories to be - * sure to find the best driver for the device. - */ - LPCTSTR Path; - for (Path = DevInstData->CustomSearchPath; *Path != '\0'; Path += _tcslen(Path) + 1) - { - TRACE("Search driver in %S\n", Path); - if (_tcslen(Path) == 2 && Path[1] == ':') - { - if (SearchDriverRecursive(DevInstData, Path)) - result = TRUE; - } - else - { - if (SearchDriver(DevInstData, Path, NULL)) - result = TRUE; - } - } - } + result = ScanFoldersForDriver(DevInstData); if (result) { @@ -600,7 +483,12 @@ case PSN_WIZNEXT: /* Handle a Next button click, if necessary */ if (SendDlgItemMessage(hwndDlg, IDC_RADIO_AUTO, BM_GETCHECK, (WPARAM)0, (LPARAM)0) == BST_CHECKED) - PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_SEARCHDRV); + { + if (PrepareFoldersToScan(DevInstData, TRUE, FALSE, NULL)) + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_SEARCHDRV); + else + PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLFAILED); + } return TRUE; default: @@ -748,10 +636,18 @@ SaveCustomPath(GetDlgItem(hwndDlg, IDC_COMBO_PATH)); HeapFree(GetProcessHeap(), 0, DevInstData->CustomSearchPath); DevInstData->CustomSearchPath = NULL; - if (PrepareFoldersToScan(DevInstData, hwndDlg)) + if (PrepareFoldersToScan( + DevInstData, + IsDlgButtonChecked(hwndDlg, IDC_CHECK_MEDIA), + IsDlgButtonChecked(hwndDlg, IDC_CHECK_PATH), + GetDlgItem(hwndDlg, IDC_COMBO_PATH))) + { PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_SEARCHDRV); + } else + { PropSheet_SetCurSelByID(GetParent(hwndDlg), IDD_INSTALLFAILED); + } } else /* FIXME */; @@ -832,6 +728,11 @@ { case PSN_SETACTIVE: PropSheet_SetWizButtons(GetParent(hwndDlg), !PSWIZB_NEXT | !PSWIZB_BACK); + /* Yes, we can safely ignore the problem (if any) */ + SetupDiDestroyDriverInfoList( + DevInstData->hDevInfo, + &DevInstData->devInfoData, + SPDIT_COMPATDRIVER); hThread = CreateThread(NULL, 0, FindDriverProc, DevInstData, 0, &dwThreadId); break;
18 years, 5 months
1
0
0
0
[amunger] 22180: Sync setupapi from trunk again. Revisions: 22150, 22172, 22174
by amunger@svn.reactos.org
Author: amunger Date: Fri Jun 2 18:40:32 2006 New Revision: 22180 URL:
http://svn.reactos.ru/svn/reactos?rev=22180&view=rev
Log: Sync setupapi from trunk again. Revisions: 22150, 22172, 22174 Added: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/devclass.c - copied unchanged from r22172, trunk/reactos/dll/win32/setupapi/devclass.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/driver.c - copied unchanged from r22172, trunk/reactos/dll/win32/setupapi/driver.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/interface.c - copied unchanged from r22172, trunk/reactos/dll/win32/setupapi/interface.c Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/cfgmgr.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/devinst.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/misc.c branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi.rbuild branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi.spec branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi_private.h branches/ros-branch-0_3_0/reactos/include/reactos/wine/cfgmgr32.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/cfgmgr.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/misc.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi.rbuild URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi.spec URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/dll/win32/setupapi/setupapi_private.h URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
Modified: branches/ros-branch-0_3_0/reactos/include/reactos/wine/cfgmgr32.h URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/include…
18 years, 5 months
1
0
0
0
[janderwald] 22179: fix apps depending on INVALID_HANDLE_VALUE bug report & patch by w3seek
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Jun 2 18:37:25 2006 New Revision: 22179 URL:
http://svn.reactos.ru/svn/reactos?rev=22179&view=rev
Log: fix apps depending on INVALID_HANDLE_VALUE bug report & patch by w3seek Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c trunk/reactos/dll/cpl/desk/classinst.c trunk/reactos/dll/win32/netcfgx/netcfgx.c trunk/reactos/ntoskrnl/io/pnpmgr.c Modified: trunk/reactos/base/services/umpnpmgr/umpnpmgr.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/base/services/umpnpmgr/umpn…
============================================================================== --- trunk/reactos/base/services/umpnpmgr/umpnpmgr.c (original) +++ trunk/reactos/base/services/umpnpmgr/umpnpmgr.c Fri Jun 2 18:37:25 2006 @@ -1169,7 +1169,7 @@ static BOOL SetupIsActive(VOID) { - HKEY hKey = INVALID_HANDLE_VALUE; + HKEY hKey = NULL; DWORD regType, active, size; LONG rc; BOOL ret = FALSE; @@ -1188,7 +1188,7 @@ ret = (active != 0); cleanup: - if (hKey != INVALID_HANDLE_VALUE) + if (hKey != NULL) RegCloseKey(hKey); DPRINT("System setup in progress? %S\n", ret ? L"YES" : L"NO"); Modified: trunk/reactos/dll/cpl/desk/classinst.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/desk/classinst.c?re…
============================================================================== --- trunk/reactos/dll/cpl/desk/classinst.c (original) +++ trunk/reactos/dll/cpl/desk/classinst.c Fri Jun 2 18:37:25 2006 @@ -24,11 +24,11 @@ TCHAR SectionName[MAX_PATH]; TCHAR ServiceName[MAX_SERVICE_NAME_LEN]; SP_DRVINFO_DETAIL_DATA DriverInfoDetailData; - HKEY hDriverKey = INVALID_HANDLE_VALUE; - HKEY hSettingsKey = INVALID_HANDLE_VALUE; - HKEY hServicesKey = INVALID_HANDLE_VALUE; - HKEY hServiceKey = INVALID_HANDLE_VALUE; - HKEY hDeviceSubKey = INVALID_HANDLE_VALUE; + HKEY hDriverKey = INVALID_HANDLE_VALUE; /* SetupDiOpenDevRegKey returns INVALID_HANDLE_VALUE in case of error! */ + HKEY hSettingsKey = NULL; + HKEY hServicesKey = NULL; + HKEY hServiceKey = NULL; + HKEY hDeviceSubKey = NULL; DWORD disposition; BOOL result; LONG rc; @@ -214,14 +214,17 @@ if (hInf != INVALID_HANDLE_VALUE) SetupCloseInfFile(hInf); if (hDriverKey != INVALID_HANDLE_VALUE) + { + /* SetupDiOpenDevRegKey returns INVALID_HANDLE_VALUE in case of error! */ RegCloseKey(hDriverKey); - if (hSettingsKey != INVALID_HANDLE_VALUE) + } + if (hSettingsKey != NULL) RegCloseKey(hSettingsKey); - if (hServicesKey != INVALID_HANDLE_VALUE) + if (hServicesKey != NULL) RegCloseKey(hServicesKey); - if (hServiceKey != INVALID_HANDLE_VALUE) + if (hServiceKey != NULL) RegCloseKey(hServiceKey); - if (hDeviceSubKey != INVALID_HANDLE_VALUE) + if (hDeviceSubKey != NULL) RegCloseKey(hDeviceSubKey); return rc; Modified: trunk/reactos/dll/win32/netcfgx/netcfgx.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/netcfgx/netcfgx.c…
============================================================================== --- trunk/reactos/dll/win32/netcfgx/netcfgx.c (original) +++ trunk/reactos/dll/win32/netcfgx/netcfgx.c Fri Jun 2 18:37:25 2006 @@ -184,10 +184,10 @@ LPWSTR ExportName = NULL; LONG rc; DWORD dwShowIcon, dwLength; - HKEY hKey = INVALID_HANDLE_VALUE; - HKEY hLinkageKey = INVALID_HANDLE_VALUE; - HKEY hNetworkKey = INVALID_HANDLE_VALUE; - HKEY hConnectionKey = INVALID_HANDLE_VALUE; + HKEY hKey = NULL; + HKEY hLinkageKey = NULL; + HKEY hNetworkKey = NULL; + HKEY hConnectionKey = NULL; if (InstallFunction != DIF_INSTALLDEVICE) return ERROR_DI_DO_DEFAULT; @@ -279,7 +279,7 @@ goto cleanup; } RegCloseKey(hKey); - hKey = INVALID_HANDLE_VALUE; + hKey = NULL; rc = RegCreateKeyExW(hNetworkKey, L"Parameters\\Tcpip", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hKey, NULL); if (rc != ERROR_SUCCESS) { @@ -287,7 +287,7 @@ goto cleanup; } RegCloseKey(hNetworkKey); - hNetworkKey = INVALID_HANDLE_VALUE; + hNetworkKey = NULL; rc = RegSetValueExW(hKey, L"DefaultGateway", 0, REG_SZ, (const BYTE*)L"0.0.0.0", (wcslen(L"0.0.0.0") + 1) * sizeof(WCHAR)); if (rc != ERROR_SUCCESS) { @@ -307,7 +307,7 @@ goto cleanup; } RegCloseKey(hKey); - hKey = INVALID_HANDLE_VALUE; + hKey = NULL; /* Write 'Linkage' key in hardware key */ #if _WIN32_WINNT >= 0x502 @@ -319,6 +319,7 @@ hKey = SetupDiCreateDevRegKeyW(DeviceInfoSet, DeviceInfoData, DICS_FLAG_GLOBAL, 0, DIREG_DRV, NULL, NULL); if (hKey == INVALID_HANDLE_VALUE) { + hKey = NULL; rc = GetLastError(); DPRINT("SetupDiCreateDevRegKeyW() failed with error 0x%lx\n", rc); goto cleanup; @@ -354,7 +355,7 @@ goto cleanup; } RegCloseKey(hKey); - hKey = INVALID_HANDLE_VALUE; + hKey = NULL; /* Write connection information in network subkey */ rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Network\\{4D36E972-E325-11CE-BFC1-08002BE10318}", 0, NULL, REG_OPTION_NON_VOLATILE, 0, NULL, &hNetworkKey, NULL); @@ -371,7 +372,7 @@ } rc = RegCreateKeyExW(hKey, L"Connection", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hConnectionKey, NULL); RegCloseKey(hKey); - hKey = INVALID_HANDLE_VALUE; + hKey = NULL; if (rc != ERROR_SUCCESS) { DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); @@ -446,13 +447,13 @@ HeapFree(GetProcessHeap(), 0, UuidString); HeapFree(GetProcessHeap(), 0, DeviceName); HeapFree(GetProcessHeap(), 0, ExportName); - if (hKey != INVALID_HANDLE_VALUE) + if (hKey != NULL) RegCloseKey(hKey); - if (hLinkageKey != INVALID_HANDLE_VALUE) + if (hLinkageKey != NULL) RegCloseKey(hLinkageKey); - if (hNetworkKey != INVALID_HANDLE_VALUE) + if (hNetworkKey != NULL) RegCloseKey(hNetworkKey); - if (hConnectionKey != INVALID_HANDLE_VALUE) + if (hConnectionKey != NULL) RegCloseKey(hConnectionKey); if (rc == ERROR_SUCCESS) Modified: trunk/reactos/ntoskrnl/io/pnpmgr.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/io/pnpmgr.c?rev=22…
============================================================================== --- trunk/reactos/ntoskrnl/io/pnpmgr.c (original) +++ trunk/reactos/ntoskrnl/io/pnpmgr.c Fri Jun 2 18:37:25 2006 @@ -1317,7 +1317,7 @@ UNICODE_STRING KeyValue; UNICODE_STRING ValueName; OBJECT_ATTRIBUTES ObjectAttributes; - HANDLE hKey = INVALID_HANDLE_VALUE; + HANDLE hKey = NULL; ULONG crc32; NTSTATUS Status; @@ -1395,7 +1395,7 @@ } ExFreePool(ParentIdPrefixInformation); ExFreePool(KeyNameBuffer); - if (hKey != INVALID_HANDLE_VALUE) + if (hKey != NULL) ZwClose(hKey); return Status; }
18 years, 5 months
1
0
0
0
[janderwald] 22178: forgot header in last commit bug report(1455) & patch by w3seek
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Jun 2 18:08:22 2006 New Revision: 22178 URL:
http://svn.reactos.ru/svn/reactos?rev=22178&view=rev
Log: forgot header in last commit bug report(1455) & patch by w3seek Modified: trunk/reactos/include/reactos/probe.h Modified: trunk/reactos/include/reactos/probe.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/reactos/probe.h?rev…
============================================================================== --- trunk/reactos/include/reactos/probe.h (original) +++ trunk/reactos/include/reactos/probe.h Fri Jun 2 18:08:22 2006 @@ -73,6 +73,15 @@ #define ProbeForReadLargeInteger(Ptr) ProbeForReadGenericType(Ptr, LARGE_INTEGER, __emptyLargeInteger) #define ProbeForReadUlargeInteger(Ptr) ProbeForReadGenericType(Ptr, ULARGE_INTEGER, __emptyULargeInteger) #define ProbeForReadUnicodeString(Ptr) ProbeForReadGenericType(Ptr, UNICODE_STRING, __emptyUnicodeString) + +#define ProbeAndZeroHandle(Ptr) \ + do { \ + if ((ULONG_PTR)(Ptr) + sizeof(HANDLE) - 1 < (ULONG_PTR)(Ptr) || \ + (ULONG_PTR)(Ptr) + sizeof(HANDLE) - 1 >= (ULONG_PTR)MmUserProbeAddress) { \ + RtlRaiseStatus (STATUS_ACCESS_VIOLATION); \ + } \ + *(volatile HANDLE *)(Ptr) = NULL; \ + } while (0) /* * Inlined Probing Macros
18 years, 5 months
1
0
0
0
[janderwald] 22177: always zero handle on return ros now passes 87/89 advapi32_winetest registry tests bug report & patch by w3seek
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Jun 2 18:05:38 2006 New Revision: 22177 URL:
http://svn.reactos.ru/svn/reactos?rev=22177&view=rev
Log: always zero handle on return ros now passes 87/89 advapi32_winetest registry tests bug report & patch by w3seek Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/ntoskrnl/cm/ntfunc.c?rev=22…
============================================================================== --- trunk/reactos/ntoskrnl/cm/ntfunc.c (original) +++ trunk/reactos/ntoskrnl/cm/ntfunc.c Fri Jun 2 18:05:38 2006 @@ -208,7 +208,7 @@ { _SEH_TRY { - ProbeForWriteHandle(KeyHandle); + ProbeAndZeroHandle(KeyHandle); if (Disposition != NULL) { ProbeForWriteUlong(Disposition); @@ -1283,7 +1283,7 @@ { _SEH_TRY { - ProbeForWriteHandle(KeyHandle); + ProbeAndZeroHandle(KeyHandle); } _SEH_HANDLE {
18 years, 5 months
1
0
0
0
[amunger] 22176: Merge miscellaneous bugfixes from trunk. Revisions: 21904, 21916, 21984, 22126
by amunger@svn.reactos.org
Author: amunger Date: Fri Jun 2 17:49:04 2006 New Revision: 22176 URL:
http://svn.reactos.ru/svn/reactos?rev=22176&view=rev
Log: Merge miscellaneous bugfixes from trunk. Revisions: 21904, 21916, 21984, 22126 Modified: branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/message.c branches/ros-branch-0_3_0/reactos/ntoskrnl/mm/elf.inc.h branches/ros-branch-0_3_0/reactos/ntoskrnl/mm/process.c branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/include/dc.h branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/main/dllmain.c branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/ntuser/input.c branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/objects/dc.c Modified: branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/message.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/dll/win…
============================================================================== --- branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/message.c (original) +++ branches/ros-branch-0_3_0/reactos/dll/win32/user32/windows/message.c Fri Jun 2 17:49:04 2006 @@ -471,12 +471,12 @@ return FALSE; } xs->cs = *(CREATESTRUCTW *)AnsiMsg->lParam; - if (HIWORD(xs->cs.lpszName)) + if (!IS_INTRESOURCE(xs->cs.lpszName)) { RtlCreateUnicodeStringFromAsciiz(&UnicodeBuffer, (LPSTR)xs->cs.lpszName); xs->lpszName = xs->cs.lpszName = UnicodeBuffer.Buffer; } - if (HIWORD(xs->cs.lpszClass)) + if (!IS_ATOM(xs->cs.lpszClass)) { RtlCreateUnicodeStringFromAsciiz(&UnicodeBuffer, (LPSTR)xs->cs.lpszClass); xs->lpszClass = xs->cs.lpszClass = UnicodeBuffer.Buffer; @@ -498,7 +498,7 @@ *cs = *(MDICREATESTRUCTW *)AnsiMsg->lParam; - if (HIWORD(cs->szClass)) + if (!IS_ATOM(cs->szClass)) { RtlCreateUnicodeStringFromAsciiz(&UnicodeBuffer, (LPSTR)cs->szClass); cs->szClass = UnicodeBuffer.Buffer; @@ -607,12 +607,9 @@ { UNICODE_STRING UnicodeString; MDICREATESTRUCTW *cs = (MDICREATESTRUCTW *)UnicodeMsg->lParam; - if (HIWORD(cs->szTitle)) - { - RtlInitUnicodeString(&UnicodeString, (PCWSTR)cs->szTitle); - RtlFreeUnicodeString(&UnicodeString); - } - if (HIWORD(cs->szClass)) + RtlInitUnicodeString(&UnicodeString, (PCWSTR)cs->szTitle); + RtlFreeUnicodeString(&UnicodeString); + if (!IS_ATOM(cs->szClass)) { RtlInitUnicodeString(&UnicodeString, (PCWSTR)cs->szClass); RtlFreeUnicodeString(&UnicodeString); @@ -762,7 +759,51 @@ } break; } - } + + case WM_MDICREATE: + { + ANSI_STRING AnsiBuffer; + UNICODE_STRING UnicodeString; + MDICREATESTRUCTA *cs = + (MDICREATESTRUCTA *)HeapAlloc(GetProcessHeap(), 0, sizeof(*cs)); + + if (!cs) + { + return FALSE; + } + + *cs = *(MDICREATESTRUCTA *)UnicodeMsg->lParam; + + if (!IS_ATOM(cs->szClass)) + { + RtlInitUnicodeString(&UnicodeString, (LPCWSTR)cs->szClass); + if (! NT_SUCCESS(RtlUnicodeStringToAnsiString(&AnsiBuffer, + &UnicodeString, + TRUE))) + { + return FALSE; + } + cs->szClass = AnsiBuffer.Buffer; + } + + RtlInitUnicodeString(&UnicodeString, (LPCWSTR)cs->szTitle); + if (! NT_SUCCESS(RtlUnicodeStringToAnsiString(&AnsiBuffer, + &UnicodeString, + TRUE))) + { + if (!IS_ATOM(cs->szClass)) + { + RtlInitAnsiString(&AnsiBuffer, cs->szClass); + RtlFreeAnsiString(&AnsiBuffer); + } + return FALSE; + } + cs->szTitle = AnsiBuffer.Buffer; + + AnsiMsg->lParam = (LPARAM)cs; + break; + } + } return TRUE; } @@ -835,6 +876,21 @@ RtlInitAnsiString(&AString, (PSTR) AnsiMsg->lParam); RtlFreeAnsiString(&AString); } + break; + } + + case WM_MDICREATE: + { + ANSI_STRING AnsiString; + MDICREATESTRUCTA *cs = (MDICREATESTRUCTA *)AnsiMsg->lParam; + RtlInitAnsiString(&AnsiString, (PCSTR)cs->szTitle); + RtlFreeAnsiString(&AnsiString); + if (!IS_ATOM(cs->szClass)) + { + RtlInitAnsiString(&AnsiString, (PCSTR)cs->szClass); + RtlFreeAnsiString(&AnsiString); + } + HeapFree(GetProcessHeap(), 0, cs); break; } Modified: branches/ros-branch-0_3_0/reactos/ntoskrnl/mm/elf.inc.h URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/ntoskrn…
============================================================================== --- branches/ros-branch-0_3_0/reactos/ntoskrnl/mm/elf.inc.h (original) +++ branches/ros-branch-0_3_0/reactos/ntoskrnl/mm/elf.inc.h Fri Jun 2 17:49:04 2006 @@ -294,10 +294,7 @@ if(Number == 0) return FALSE; - while((Number % 2) == 0) - Number /= 2; - - return Number == 1; + return (Number & (Number - 1)) == 0; } static __inline Elf_Addr ElfFmtpModPow2 Modified: branches/ros-branch-0_3_0/reactos/ntoskrnl/mm/process.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/ntoskrn…
============================================================================== --- branches/ros-branch-0_3_0/reactos/ntoskrnl/mm/process.c (original) +++ branches/ros-branch-0_3_0/reactos/ntoskrnl/mm/process.c Fri Jun 2 17:49:04 2006 @@ -297,12 +297,6 @@ /* Image Data */ if ((NtHeaders = RtlImageNtHeader(Peb->ImageBaseAddress))) { - /* Get the Image Config Data too */ - ImageConfigData = RtlImageDirectoryEntryToData(Peb->ImageBaseAddress, - TRUE, - IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG, - &ViewSize); - /* Write subsystem data */ Peb->ImageSubSystem = NtHeaders->OptionalHeader.Subsystem; Peb->ImageSubSystemMajorVersion = NtHeaders->OptionalHeader.MajorSubsystemVersion; @@ -315,22 +309,10 @@ Peb->OSMinorVersion = (NtHeaders->OptionalHeader.Win32VersionValue >> 8) & 0xFF; Peb->OSBuildNumber = (NtHeaders->OptionalHeader.Win32VersionValue >> 16) & 0x3FFF; - /* Lie about the version if requested */ - if (ImageConfigData && ImageConfigData->CSDVersion) - { - Peb->OSCSDVersion = ImageConfigData->CSDVersion; - } - /* Set the Platform ID */ Peb->OSPlatformId = (NtHeaders->OptionalHeader.Win32VersionValue >> 30) ^ 2; } - /* Check for affinity override */ - if (ImageConfigData && ImageConfigData->ProcessAffinityMask) - { - ProcessAffinityMask = ImageConfigData->ProcessAffinityMask; - } - /* Check if the image is not safe for SMP */ if (NtHeaders->FileHeader.Characteristics & IMAGE_FILE_UP_SYSTEM_ONLY) { @@ -342,6 +324,37 @@ /* Use affinity from Image Header */ Peb->ImageProcessAffinityMask = ProcessAffinityMask; } + + _SEH_TRY + { + /* Get the Image Config Data too */ + ImageConfigData = RtlImageDirectoryEntryToData(Peb->ImageBaseAddress, + TRUE, + IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG, + &ViewSize); + + ProbeForRead(ImageConfigData, + sizeof(IMAGE_LOAD_CONFIG_DIRECTORY), + sizeof(ULONG)); + + /* Process the image config data overrides if specfied. */ + if (ImageConfigData != NULL) + { + if (ImageConfigData->CSDVersion) + { + Peb->OSCSDVersion = ImageConfigData->CSDVersion; + } + if (ImageConfigData->ProcessAffinityMask) + { + ProcessAffinityMask = ImageConfigData->ProcessAffinityMask; + } + } + } + _SEH_HANDLE + { + Status = _SEH_GetExceptionCode(); + } + _SEH_END; } /* Misc data */ @@ -352,7 +365,7 @@ KeDetachProcess(); DPRINT("MmCreatePeb: Peb created at %p\n", Peb); - return STATUS_SUCCESS; + return Status; } PTEB Modified: branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/subsyst…
============================================================================== --- branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/include/dc.h (original) +++ branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/include/dc.h Fri Jun 2 17:49:04 2006 @@ -170,6 +170,7 @@ #define DC_UnlockDc(pDC) \ GDIOBJ_UnlockObjByPtr (GdiHandleTable, pDC) +NTSTATUS FASTCALL InitDcImpl(VOID); HDC FASTCALL RetrieveDisplayHDC(VOID); HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver); VOID FASTCALL DC_InitDC(HDC DCToInit); Modified: branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/main/dllmain.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/subsyst…
============================================================================== --- branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/main/dllmain.c (original) +++ branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/main/dllmain.c Fri Jun 2 17:49:04 2006 @@ -502,6 +502,13 @@ return STATUS_UNSUCCESSFUL; } + Status = InitDcImpl(); + if (!NT_SUCCESS(Status)) + { + DPRINT1("Failed to initialize Device context implementation!\n"); + return STATUS_UNSUCCESSFUL; + } + /* Initialize FreeType library */ if (! InitFontSupport()) { Modified: branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/ntuser/input.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/subsyst…
============================================================================== --- branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/ntuser/input.c (original) +++ branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/ntuser/input.c Fri Jun 2 17:49:04 2006 @@ -176,6 +176,9 @@ FILE_SYNCHRONOUS_IO_ALERT); } while (!NT_SUCCESS(Status)); + KeSetPriorityThread(&PsGetCurrentThread()->Tcb, + LOW_REALTIME_PRIORITY + 3); + for(;;) { /* @@ -454,6 +457,9 @@ DPRINT1("Win32K: Failed making keyboard thread a win32 thread.\n"); return; //(Status); } + + KeSetPriorityThread(&PsGetCurrentThread()->Tcb, + LOW_REALTIME_PRIORITY + 3); IntKeyboardGetIndicatorTrans(KeyboardDeviceHandle, &IndicatorTrans); Modified: branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.ru/svn/reactos/branches/ros-branch-0_3_0/reactos/subsyst…
============================================================================== --- branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/objects/dc.c (original) +++ branches/ros-branch-0_3_0/reactos/subsystems/win32/win32k/objects/dc.c Fri Jun 2 17:49:04 2006 @@ -33,6 +33,17 @@ #endif static GDIDEVICE PrimarySurface; +static KEVENT VideoDriverNeedsPreparation; +static KEVENT VideoDriverPrepared; + + +NTSTATUS FASTCALL +InitDcImpl(VOID) +{ + KeInitializeEvent(&VideoDriverNeedsPreparation, SynchronizationEvent, TRUE); + KeInitializeEvent(&VideoDriverPrepared, NotificationEvent, FALSE); + return STATUS_SUCCESS; +} /* FIXME: DCs should probably be thread safe */ @@ -481,6 +492,17 @@ BOOL GotDriver; BOOL DoDefault; ULONG DisplayNumber; + LARGE_INTEGER Zero; + BOOLEAN ret = FALSE; + + Zero.QuadPart = 0; + if (STATUS_SUCCESS != KeWaitForSingleObject(&VideoDriverNeedsPreparation, Executive, KernelMode, TRUE, &Zero)) + { + /* Concurrent access. Wait for VideoDriverPrepared event */ + if (STATUS_SUCCESS == KeWaitForSingleObject(&VideoDriverPrepared, Executive, KernelMode, TRUE, NULL)) + ret = PrimarySurface.PreparedDriver; + goto cleanup; + } for (DisplayNumber = 0; ; DisplayNumber++) { @@ -494,7 +516,7 @@ if (PrimarySurface.VideoFileObject == NULL) { DPRINT1("FindMPDriver failed\n"); - return FALSE; + goto cleanup; } /* Retrieve DDI driver names from registry */ @@ -568,7 +590,7 @@ { ObDereferenceObject(PrimarySurface.VideoFileObject); DPRINT1("BuildDDIFunctions failed\n"); - return FALSE; + goto cleanup; } /* Allocate a phyical device handle from the driver */ @@ -651,10 +673,13 @@ PrimarySurface.PreparedDriver = TRUE; PrimarySurface.DisplayNumber = DisplayNumber; - return TRUE; + ret = TRUE; + goto cleanup; } - return FALSE; +cleanup: + KeSetEvent(&VideoDriverPrepared, 1, FALSE); + return ret; } static BOOL FASTCALL
18 years, 5 months
1
0
0
0
[hpoussin] 22175: By default, don't search a driver on removable media. Do it only when choosing automatic install or selecting "Include removable media" in new hardware wizard
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Jun 2 17:43:02 2006 New Revision: 22175 URL:
http://svn.reactos.ru/svn/reactos?rev=22175&view=rev
Log: By default, don't search a driver on removable media. Do it only when choosing automatic install or selecting "Include removable media" in new hardware wizard Modified: trunk/reactos/dll/win32/newdev/newdev.c Modified: trunk/reactos/dll/win32/newdev/newdev.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/newdev/newdev.c?r…
============================================================================== --- trunk/reactos/dll/win32/newdev/newdev.c (original) +++ trunk/reactos/dll/win32/newdev/newdev.c Fri Jun 2 17:43:02 2006 @@ -745,7 +745,7 @@ TRACE("Installing %S (%S)\n", DevInstData->buffer, InstanceId); /* Search driver in default location and removable devices */ - if (!PrepareFoldersToScan(DevInstData, TRUE, FALSE, NULL)) + if (!PrepareFoldersToScan(DevInstData, FALSE, FALSE, NULL)) { TRACE("PrepareFoldersToScan() failed with error 0x%lx\n", GetLastError()); goto cleanup;
18 years, 5 months
1
0
0
0
[hpoussin] 22174: Implement CM_Add_IDA, CM_Add_IDW, CM_Add_ID_ExA Add stub for CM_Add_ID_ExW
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Jun 2 15:17:37 2006 New Revision: 22174 URL:
http://svn.reactos.ru/svn/reactos?rev=22174&view=rev
Log: Implement CM_Add_IDA, CM_Add_IDW, CM_Add_ID_ExA Add stub for CM_Add_ID_ExW Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c trunk/reactos/dll/win32/setupapi/setupapi.spec trunk/reactos/include/reactos/wine/cfgmgr32.h Modified: trunk/reactos/dll/win32/setupapi/cfgmgr.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/cfgmgr.c…
============================================================================== --- trunk/reactos/dll/win32/setupapi/cfgmgr.c (original) +++ trunk/reactos/dll/win32/setupapi/cfgmgr.c Fri Jun 2 15:17:37 2006 @@ -118,6 +118,61 @@ } return ret; +} + + +/*********************************************************************** + * CM_Add_IDA [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Add_IDA( + DEVINST dnDevInst, PSTR pszID, ULONG ulFlags) +{ + TRACE("%p %s %lx\n", dnDevInst, pszID, ulFlags); + return CM_Add_ID_ExA(dnDevInst, pszID, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Add_IDW [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Add_IDW( + DEVINST dnDevInst, PWSTR pszID, ULONG ulFlags) +{ + TRACE("%p %s %lx\n", dnDevInst, debugstr_w(pszID), ulFlags); + return CM_Add_ID_ExW(dnDevInst, pszID, ulFlags, NULL); +} + + +/*********************************************************************** + * CM_Add_ID_ExA [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Add_ID_ExA( + DEVINST dnDevInst, PSTR pszID, ULONG ulFlags, HMACHINE hMachine) +{ + PWSTR pszIDW; + CONFIGRET ret; + + TRACE("%p %s %lx %p\n", dnDevInst, pszID, ulFlags, hMachine); + + if (CaptureAndConvertAnsiArg(pszID, &pszIDW)) + return CR_INVALID_DATA; + + ret = CM_Add_ID_ExW(dnDevInst, pszIDW, ulFlags, hMachine); + + MyFree(pszIDW); + + return ret; +} + + +/*********************************************************************** + * CM_Add_ID_ExW [SETUPAPI.@] + */ +CONFIGRET WINAPI CM_Add_ID_ExW( + DEVINST dnDevInst, PWSTR pszID, ULONG ulFlags, HMACHINE hMachine) +{ + FIXME("%p %s %lx %p\n", dnDevInst, debugstr_w(pszID), ulFlags, hMachine); + return CR_CALL_NOT_IMPLEMENTED; } Modified: trunk/reactos/dll/win32/setupapi/setupapi.spec URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupapi…
============================================================================== --- trunk/reactos/dll/win32/setupapi/setupapi.spec (original) +++ trunk/reactos/dll/win32/setupapi/setupapi.spec Fri Jun 2 15:17:37 2006 @@ -11,10 +11,10 @@ @ stub CMP_WaitServicesAvailable @ stub CM_Add_Empty_Log_Conf @ stub CM_Add_Empty_Log_Conf_Ex -@ stub CM_Add_IDA -@ stub CM_Add_IDW -@ stub CM_Add_ID_ExA -@ stub CM_Add_ID_ExW +@ stdcall CM_Add_IDA(ptr str long) +@ stdcall CM_Add_IDW(ptr wstr long) +@ stdcall CM_Add_ID_ExA(ptr str long ptr) +@ stdcall CM_Add_ID_ExW(ptr wstr long ptr) @ stub CM_Add_Range @ stub CM_Add_Res_Des @ stub CM_Add_Res_Des_Ex Modified: trunk/reactos/include/reactos/wine/cfgmgr32.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/include/reactos/wine/cfgmgr…
============================================================================== --- trunk/reactos/include/reactos/wine/cfgmgr32.h (original) +++ trunk/reactos/include/reactos/wine/cfgmgr32.h Fri Jun 2 15:17:37 2006 @@ -67,6 +67,11 @@ #define RegDisposition_OpenAlways 0x00000000 #define RegDisposition_OpenExisting 0x00000001 #define RegDisposition_Bits 0x00000001 + +/* ulFlags for CM_Add_ID[_Ex] */ +#define CM_ADD_ID_HARDWARE 0x00000000 +#define CM_ADD_ID_COMPATIBLE 0x00000001 +#define CM_ADD_ID_BITS 0x00000001 /* ulFlags for CM_Open_Class_Key[_Ex] */ #define CM_OPEN_CLASS_KEY_INSTALLER 0x00000000 @@ -185,6 +190,12 @@ CONFIGRET WINAPI CMP_Init_Detection( DWORD ); CONFIGRET WINAPI CMP_Report_LogOn( DWORD, DWORD ); +CONFIGRET WINAPI CM_Add_IDA( DEVINST, PSTR, ULONG ); +CONFIGRET WINAPI CM_Add_IDW( DEVINST, PWSTR, ULONG ); +#define CM_Add_ID WINELIB_NAME_AW(CM_Add_ID) +CONFIGRET WINAPI CM_Add_ID_ExA( DEVINST, PSTR, ULONG, HMACHINE ); +CONFIGRET WINAPI CM_Add_ID_ExW( DEVINST, PWSTR, ULONG, HMACHINE ); +#define CM_Add_ID_Ex WINELIB_NAME_AW(CM_Add_ID_Ex) CONFIGRET WINAPI CM_Connect_MachineA( PCSTR, PHMACHINE ); CONFIGRET WINAPI CM_Connect_MachineW( PCWSTR, PHMACHINE ); #define CM_Connect_Machine WINELIB_NAME_AW(CM_Connect_Machine)
18 years, 5 months
1
0
0
0
[janderwald] 22173: disable timer when user wants to set an alternative date - enables setting time and fixes bug 1398 bug report by Coviti
by janderwald@svn.reactos.org
Author: janderwald Date: Fri Jun 2 14:13:17 2006 New Revision: 22173 URL:
http://svn.reactos.ru/svn/reactos?rev=22173&view=rev
Log: disable timer when user wants to set an alternative date - enables setting time and fixes bug 1398 bug report by Coviti Modified: trunk/reactos/dll/cpl/timedate/timedate.c Modified: trunk/reactos/dll/cpl/timedate/timedate.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.c…
============================================================================== --- trunk/reactos/dll/cpl/timedate/timedate.c (original) +++ trunk/reactos/dll/cpl/timedate/timedate.c Fri Jun 2 14:13:17 2006 @@ -405,6 +405,7 @@ { case DTN_DATETIMECHANGE: /* Enable the 'Apply' button */ + KillTimer(hwndDlg, ID_TIMER); PropSheet_Changed(GetParent(hwndDlg), hwndDlg); break; } @@ -434,6 +435,7 @@ case PSN_APPLY: SetLocalSystemTime(hwndDlg); + SetTimer(hwndDlg, ID_TIMER, 1000, NULL); return TRUE; } }
18 years, 5 months
1
0
0
0
[hpoussin] 22172: Extract some code from devinst.c to new files: devclass.c (device class functions), driver.c (Driver install/enumeration functions), interface.c (Interface install/enumeration functions) devinst.c is now 123 Kb instead of 285 Kb. No code change.
by hpoussin@svn.reactos.org
Author: hpoussin Date: Fri Jun 2 13:06:05 2006 New Revision: 22172 URL:
http://svn.reactos.ru/svn/reactos?rev=22172&view=rev
Log: Extract some code from devinst.c to new files: devclass.c (device class functions), driver.c (Driver install/enumeration functions), interface.c (Interface install/enumeration functions) devinst.c is now 123 Kb instead of 285 Kb. No code change. Added: trunk/reactos/dll/win32/setupapi/devclass.c (with props) trunk/reactos/dll/win32/setupapi/driver.c (with props) trunk/reactos/dll/win32/setupapi/interface.c (with props) Modified: trunk/reactos/dll/win32/setupapi/devinst.c trunk/reactos/dll/win32/setupapi/misc.c trunk/reactos/dll/win32/setupapi/setupapi.rbuild trunk/reactos/dll/win32/setupapi/setupapi_private.h [This mail would be too long, it was shortened to contain the URLs only.] Added: trunk/reactos/dll/win32/setupapi/devclass.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/devclass…
Modified: trunk/reactos/dll/win32/setupapi/devinst.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/devinst.…
Added: trunk/reactos/dll/win32/setupapi/driver.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/driver.c…
Added: trunk/reactos/dll/win32/setupapi/interface.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/interfac…
Modified: trunk/reactos/dll/win32/setupapi/misc.c URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/misc.c?r…
Modified: trunk/reactos/dll/win32/setupapi/setupapi.rbuild URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupapi…
Modified: trunk/reactos/dll/win32/setupapi/setupapi_private.h URL:
http://svn.reactos.ru/svn/reactos/trunk/reactos/dll/win32/setupapi/setupapi…
18 years, 5 months
1
0
0
0
← Newer
1
...
53
54
55
56
57
58
59
60
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
Results per page:
10
25
50
100
200