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
2025
January
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
August 2007
----- 2025 -----
January 2025
----- 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
21 participants
666 discussions
Start a n
N
ew thread
[janderwald] 28437: - implement reading startup / recovery options
by janderwald@svn.reactos.org
Author: janderwald Date: Tue Aug 21 01:41:05 2007 New Revision: 28437 URL:
http://svn.reactos.org/svn/reactos?rev=28437&view=rev
Log: - implement reading startup / recovery options Modified: trunk/reactos/dll/cpl/sysdm/lang/cs-CZ.rc trunk/reactos/dll/cpl/sysdm/lang/da-DK.rc trunk/reactos/dll/cpl/sysdm/lang/de-DE.rc trunk/reactos/dll/cpl/sysdm/lang/en-US.rc trunk/reactos/dll/cpl/sysdm/lang/es-ES.rc trunk/reactos/dll/cpl/sysdm/lang/fr-FR.rc trunk/reactos/dll/cpl/sysdm/lang/hu-HU.rc trunk/reactos/dll/cpl/sysdm/lang/id-ID.rc trunk/reactos/dll/cpl/sysdm/lang/it-IT.rc trunk/reactos/dll/cpl/sysdm/lang/ja-JP.rc trunk/reactos/dll/cpl/sysdm/lang/nl-NL.rc trunk/reactos/dll/cpl/sysdm/lang/pl-PL.rc trunk/reactos/dll/cpl/sysdm/lang/ru-RU.rc trunk/reactos/dll/cpl/sysdm/lang/sv-SE.rc trunk/reactos/dll/cpl/sysdm/lang/uk-UA.rc trunk/reactos/dll/cpl/sysdm/resource.h trunk/reactos/dll/cpl/sysdm/startrec.c Modified: trunk/reactos/dll/cpl/sysdm/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/cs-CZ.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/cs-CZ.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/cs-CZ.rc Tue Aug 21 01:41:05 2007 @@ -121,4 +121,8 @@ IDS_CPLSYSTEMDESCRIPTION "Zobrazuje informace o Vaem poèítaèi, mìní rùzné systémové promìnné a hardwarové vlastnosti." IDS_VARIABLE "Variable" IDS_VALUE "Value" + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" END Modified: trunk/reactos/dll/cpl/sysdm/lang/da-DK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/da-DK.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/da-DK.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/da-DK.rc Tue Aug 21 01:41:05 2007 @@ -119,4 +119,8 @@ IDS_CPLSYSTEMDESCRIPTION "Se mere information omkring din computer, og skift diverse system og hardware indstillinger." IDS_VARIABLE "Variable" IDS_VALUE "Value" + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" END Modified: trunk/reactos/dll/cpl/sysdm/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/de-DE.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/de-DE.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/de-DE.rc Tue Aug 21 01:41:05 2007 @@ -273,4 +273,8 @@ IDS_PETABYTE "PB RAM" IDS_VARIABLE "Variable" IDS_VALUE "Value" -END + IDS_NO_DUMP "(Keine)" + IDS_MINI_DUMP "Kleines Speicherabild(64KB)" + IDS_KERNEL_DUMP "Kernelspeicherabild" + IDS_FULL_DUMP "Vollständiges Speicherabild" +END Modified: trunk/reactos/dll/cpl/sysdm/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/en-US.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/en-US.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/en-US.rc Tue Aug 21 01:41:05 2007 @@ -265,4 +265,8 @@ IDS_PETABYTE "PB of RAM" IDS_VARIABLE "Variable" IDS_VALUE "Value" -END + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" +END Modified: trunk/reactos/dll/cpl/sysdm/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/es-ES.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/es-ES.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/es-ES.rc Tue Aug 21 01:41:05 2007 @@ -125,4 +125,8 @@ IDS_CPLSYSTEMDESCRIPTION "Ver información de su Computadora y cambiar varias opciones del systema." IDS_VARIABLE "Variable" IDS_VALUE "Value" + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" END Modified: trunk/reactos/dll/cpl/sysdm/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/fr-FR.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/fr-FR.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/fr-FR.rc Tue Aug 21 01:41:05 2007 @@ -268,4 +268,8 @@ IDS_PETABYTE "PB de RAM" IDS_VARIABLE "Variable" IDS_VALUE "Valeur" -END + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" +END Modified: trunk/reactos/dll/cpl/sysdm/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/hu-HU.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/hu-HU.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/hu-HU.rc Tue Aug 21 01:41:05 2007 @@ -122,4 +122,8 @@ IDS_CPLSYSTEMDESCRIPTION "A számítógéppel kapcsolatos információk megjelenítése, különbözõ rendszer és hardver beállítások módosítása." IDS_VARIABLE "Variable" IDS_VALUE "Value" + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" END Modified: trunk/reactos/dll/cpl/sysdm/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/id-ID.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/id-ID.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/id-ID.rc Tue Aug 21 01:41:05 2007 @@ -264,4 +264,9 @@ IDS_PETABYTE "PB RAM" IDS_VARIABLE "Variabel" IDS_VALUE "Nilai" -END + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" + +END Modified: trunk/reactos/dll/cpl/sysdm/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/it-IT.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/it-IT.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/it-IT.rc Tue Aug 21 01:41:05 2007 @@ -265,4 +265,9 @@ IDS_PETABYTE "PB di RAM" IDS_VARIABLE "Variabile" IDS_VALUE "Valore" -END + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" + +END Modified: trunk/reactos/dll/cpl/sysdm/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/ja-JP.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/ja-JP.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/ja-JP.rc Tue Aug 21 01:41:05 2007 @@ -121,4 +121,9 @@ IDS_CPLSYSTEMDESCRIPTION "VXeÌî{îñð\\¦µAVXeân[hEFAÌlXÈÝèðÏXµÜ·B" IDS_VARIABLE "Variable" IDS_VALUE "Value" + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" + END Modified: trunk/reactos/dll/cpl/sysdm/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/nl-NL.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/nl-NL.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/nl-NL.rc Tue Aug 21 01:41:05 2007 @@ -121,4 +121,9 @@ IDS_CPLSYSTEMDESCRIPTION "Systeeminformatie weergeven en omgevingsinstellingen wijzigen." IDS_VARIABLE "Variable" IDS_VALUE "Value" + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" + END Modified: trunk/reactos/dll/cpl/sysdm/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/pl-PL.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/pl-PL.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/pl-PL.rc Tue Aug 21 01:41:05 2007 @@ -270,4 +270,9 @@ IDS_PETABYTE "PB RAM" IDS_VARIABLE "Zmienna" IDS_VALUE "Wartoæ" -END + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" + +END Modified: trunk/reactos/dll/cpl/sysdm/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/ru-RU.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/ru-RU.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/ru-RU.rc Tue Aug 21 01:41:05 2007 @@ -265,4 +265,9 @@ IDS_PETABYTE "Ïá ÎÇÓ" IDS_VARIABLE "Ïåðåìåííàÿ" IDS_VALUE "Çíà÷åíèå" -END + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" + +END Modified: trunk/reactos/dll/cpl/sysdm/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/sv-SE.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/sv-SE.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/sv-SE.rc Tue Aug 21 01:41:05 2007 @@ -123,4 +123,9 @@ IDS_CPLSYSTEMDESCRIPTION "Se information om din dator och ändra olika system- och hårdvaruinställningar." IDS_VARIABLE "Variable" IDS_VALUE "Value" + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" + END Modified: trunk/reactos/dll/cpl/sysdm/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/lang/uk-UA.r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/lang/uk-UA.rc (original) +++ trunk/reactos/dll/cpl/sysdm/lang/uk-UA.rc Tue Aug 21 01:41:05 2007 @@ -273,4 +273,9 @@ IDS_PETABYTE "PB of RAM" IDS_VARIABLE "Çì³ííà" IDS_VALUE "Çíà÷åííÿ" -END + IDS_NO_DUMP "(None)" + IDS_MINI_DUMP "Minidump(64KB)" + IDS_KERNEL_DUMP "Kernel dump" + IDS_FULL_DUMP "Complete dump" + +END Modified: trunk/reactos/dll/cpl/sysdm/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/resource.h?r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/resource.h (original) +++ trunk/reactos/dll/cpl/sysdm/resource.h Tue Aug 21 01:41:05 2007 @@ -20,6 +20,11 @@ #define IDS_VARIABLE 66 #define IDS_VALUE 67 +#define IDS_NO_DUMP 68 +#define IDS_MINI_DUMP 69 +#define IDS_KERNEL_DUMP 70 +#define IDS_FULL_DUMP 71 + /* propsheet - general */ #define IDD_PROPPAGEGENERAL 100 Modified: trunk/reactos/dll/cpl/sysdm/startrec.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/startrec.c?r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/startrec.c (original) +++ trunk/reactos/dll/cpl/sysdm/startrec.c Tue Aug 21 01:41:05 2007 @@ -6,13 +6,15 @@ * PURPOSE: Computer settings for startup and recovery * COPYRIGHT: Copyright 2006 Ged Murphy <gedmurphy(a)gmail.com> * Copyright 2006 Christoph von Wittich <Christoph(a)ApiViewer.de> - * + * Copyright 2007 Johannes Anderwald <johannes dot anderwald at student dot tugraz dot at> */ #include "precomp.h" static TCHAR m_szFreeldrIni[MAX_PATH + 15]; static int m_FreeLdrIni = 0; - +static TCHAR m_szDumpFile[MAX_PATH]; +static TCHAR m_szMinidumpDir[MAX_PATH]; +static DWORD m_dwCrashDumpEnabled = 0; void SetTimeout(HWND hwndDlg, int Timeout) { if (Timeout == 0) @@ -399,9 +401,7 @@ DWORD dwBufSize; TCHAR *szSystemDrive; HINF hInf; - - SetDlgItemText(hwndDlg, IDC_STRRECDUMPFILE, _T("%SystemRoot%\\MiniDump")); - + dwBufSize = GetSystemDrive(&szSystemDrive); if (!dwBufSize) return FALSE; @@ -449,6 +449,134 @@ } return FALSE; } + +void SetCrashDlgItems(HWND hwnd) +{ + if (m_dwCrashDumpEnabled == 0) + { + /* no crash information required */ + EnableWindow(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), FALSE); + EnableWindow(GetDlgItem(hwnd, IDC_STRRECOVERWRITE), FALSE); + } + else if (m_dwCrashDumpEnabled == 3) + { + /* minidump type */ + EnableWindow(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), TRUE); + EnableWindow(GetDlgItem(hwnd, IDC_STRRECOVERWRITE), FALSE); + SendMessage(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), WM_SETTEXT, (WPARAM)0, (LPARAM)m_szMinidumpDir); + } + else if (m_dwCrashDumpEnabled == 1 || m_dwCrashDumpEnabled == 2) + { + /* kernel or complete dump */ + EnableWindow(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), TRUE); + EnableWindow(GetDlgItem(hwnd, IDC_STRRECOVERWRITE), TRUE); + SendMessage(GetDlgItem(hwnd, IDC_STRRECDUMPFILE), WM_SETTEXT, (WPARAM)0, (LPARAM)m_szDumpFile); + } + SendDlgItemMessage(hwnd, IDC_STRRECDEBUGCOMBO, CB_SETCURSEL, (WPARAM)m_dwCrashDumpEnabled, (LPARAM)0); +} + +void LoadRecoveryOptions(HWND hwndDlg) +{ + HKEY hKey; + DWORD dwValues; + TCHAR szName[MAX_PATH]; + TCHAR szValue[MAX_PATH]; + DWORD i, dwName, dwValue, dwValueLength, dwType; + + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, + _T("System\\CurrentControlSet\\Control\\CrashControl"), + 0, + KEY_READ, + &hKey) != ERROR_SUCCESS) + { + /* failed to open key */ + return; + } + + if (RegQueryInfoKey(hKey, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + &dwValues, + NULL, + NULL, + NULL, + NULL) != ERROR_SUCCESS) + { + RegCloseKey(hKey); + return; + } + + for (i = 0; i < dwValues; i++) + { + dwName = sizeof(szName) / sizeof(TCHAR); + + RegEnumValue(hKey, i, szName, &dwName, NULL, &dwType, NULL, NULL); + if (dwType == REG_DWORD) + { + dwValueLength = sizeof(dwValue); + dwName = sizeof(szName) / sizeof(TCHAR); + if (RegEnumValue(hKey, i, szName, &dwName, NULL, &dwType, (LPBYTE)&dwValue, &dwValueLength) != ERROR_SUCCESS) + continue; + } + else + { + dwValueLength = sizeof(szValue); + dwName = sizeof(szName) / sizeof(TCHAR); + if (RegEnumValue(hKey, i, szName, &dwName, NULL, &dwType, (LPBYTE)&szValue, &dwValueLength) != ERROR_SUCCESS) + continue; + } + + if (!_tcscmp(szName, _T("LogEvent"))) + { + if (dwValue) + SendDlgItemMessage(hwndDlg, IDC_STRRECWRITEEVENT, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0); + } + else if (!_tcscmp(szName, _T("SendAlert"))) + { + if (dwValue) + SendDlgItemMessage(hwndDlg, IDC_STRRECSENDALERT, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0); + } + else if (!_tcscmp(szName, _T("AutoReboot"))) + { + if (dwValue) + SendDlgItemMessage(hwndDlg, IDC_STRRECRESTART, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0); + } + else if (!_tcscmp(szName, _T("Overwrite"))) + { + if (dwValue) + SendDlgItemMessage(hwndDlg, IDC_STRRECOVERWRITE, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0); + } + else if (!_tcscmp(szName, _T("DumpFile"))) + { + _tcscpy(m_szDumpFile, szValue); + } + else if (!_tcscmp(szName, _T("MinidumpDir"))) + { + _tcscpy(m_szMinidumpDir, szValue); + } + else if (!_tcscmp(szName, _T("CrashDumpEnabled"))) + { + m_dwCrashDumpEnabled = dwValue; + } + } + + if (LoadString(hApplet, IDS_NO_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR)) + SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue); + if (LoadString(hApplet, IDS_FULL_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR)) + SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue); + if (LoadString(hApplet, IDS_KERNEL_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR)) + SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue); + if (LoadString(hApplet, IDS_MINI_DUMP, szValue, sizeof(szValue) / sizeof(TCHAR)) < sizeof(szValue) / sizeof(TCHAR)) + SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM) szValue); + + SetCrashDlgItems(hwndDlg); + RegCloseKey(hKey); +} + /* Property page dialog callback */ @@ -469,6 +597,7 @@ { case WM_INITDIALOG: { + LoadRecoveryOptions(hwndDlg); return LoadOSList(hwndDlg); } break; @@ -558,6 +687,30 @@ else SetTimeout(hwndDlg, 0); } + case IDC_STRRECDEBUGCOMBO: + { + if (HIWORD(wParam) == CBN_SELCHANGE) + { + LRESULT lResult; + + lResult = SendDlgItemMessage(hwndDlg, IDC_STRRECDEBUGCOMBO, CB_GETCURSEL, (WPARAM)0, (LPARAM)0); + if (lResult != CB_ERR && lResult != m_dwCrashDumpEnabled) + { + if (m_dwCrashDumpEnabled == 1 || m_dwCrashDumpEnabled == 2) + { + SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(m_szDumpFile) / sizeof(TCHAR), (LPARAM)m_szDumpFile); + } + else if (m_dwCrashDumpEnabled == 3) + { + SendDlgItemMessage(hwndDlg, IDC_STRRECDUMPFILE, WM_GETTEXT, (WPARAM)sizeof(m_szMinidumpDir) / sizeof(TCHAR), (LPARAM)m_szMinidumpDir); + } + m_dwCrashDumpEnabled = lResult; + SetCrashDlgItems(hwndDlg); + } + } + break; + } + } } break;
17 years, 4 months
1
0
0
0
[greatlrd] 28436: Fix NtUserGetClipboardViewer in w32ksvc a smaller typo
by greatlrd@svn.reactos.org
Author: greatlrd Date: Tue Aug 21 01:02:25 2007 New Revision: 28436 URL:
http://svn.reactos.org/svn/reactos?rev=28436&view=rev
Log: Fix NtUserGetClipboardViewer in w32ksvc a smaller typo Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/w32ksvc.db (original) +++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db Tue Aug 21 01:02:25 2007 @@ -8,48 +8,48 @@ # NtGdiAbortDoc 1 NtGdiAbortPath 1 -# NtGdiAddFontResourceW 6 -# NtGdiAddRemoteFontToDC 4 -# NtGdiAddFontMemResourceEx 5 -# NtGdiRemoveMergeFont 2 -# NtGdiAddRemoteMMInstanceToDC 3 +# NtGdiAddFontResourceW 6 +# NtGdiAddRemoteFontToDC 4 +# NtGdiAddFontMemResourceEx 5 +# NtGdiRemoveMergeFont 2 +# NtGdiAddRemoteMMInstanceToDC 3 NtGdiAlphaBlend 12 NtGdiAngleArc 6 -# NtGdiAnyLinkedFonts 0 -# NtGdiFontIsLinked 1 +# NtGdiAnyLinkedFonts 0 +# NtGdiFontIsLinked 1 NtGdiArcInternal 10 NtGdiBeginPath 1 NtGdiBitBlt 11 NtGdiCancelDC 1 -# NtGdiCheckBitmapBits 8 +# NtGdiCheckBitmapBits 8 NtGdiCloseFigure 1 -# NtGdiClearBitmapAttributes 2 -# NtGdiClearBrushAttributes 2 -# NtGdiColorCorrectPalette 6 +# NtGdiClearBitmapAttributes 2 +# NtGdiClearBrushAttributes 2 +# NtGdiColorCorrectPalette 6 NtGdiCombineRgn 4 NtGdiCombineTransform 3 -# NtGdiComputeXformCoefficients 1 -# NtGdiConsoleTextOut 4 -# NtGdiConvertMetafileRect 2 +# NtGdiComputeXformCoefficients 1 +# NtGdiConsoleTextOut 4 +# NtGdiConvertMetafileRect 2 NtGdiCreateBitmap 5 NtGdiCreateClientObj 1 NtGdiCreateColorSpace 1 -# NtGdiCreateColorTransform 8 +# NtGdiCreateColorTransform 8 NtGdiCreateCompatibleBitmap 3 NtGdiCreateCompatibleDC 1 NtGdiCreateDIBBrush 6 -#NtGdiCreateDIBitmapInternal 11 +#NtGdiCreateDIBitmapInternal 11 NtGdiCreateDIBSection 9 NtGdiCreateEllipticRgn 4 NtGdiCreateHalftonePalette 1 NtGdiCreateHatchBrushInternal 3 -# NtGdiCreateMetafileDC 1 -# NtGdiCreatePaletteInternal 2 +# NtGdiCreateMetafileDC 1 +# NtGdiCreatePaletteInternal 2 NtGdiCreatePatternBrushInternal 3 NtGdiCreatePen 4 NtGdiCreateRectRgn 4 NtGdiCreateRoundRectRgn 6 -#NtGdiCreateServerMetaFile 6 +#NtGdiCreateServerMetaFile 6 NtGdiCreateSolidBrush 2 NtGdiD3dContextCreate 4 NtGdiD3dContextDestroy 1 @@ -107,44 +107,44 @@ NtGdiDdUnlockD3D 2 NtGdiDdUpdateOverlay 3 NtGdiDdWaitForVerticalBlank 2 -# NtGdiDvpCanCreateVideoPort 2 -# NtGdiDvpColorControl 2 -# NtGdiDvpCreateVideoPort 2 -# NtGdiDvpDestroyVideoPort 2 -# NtGdiDvpFlipVideoPort 4 -# NtGdiDvpGetVideoPortBandwidth 2 -# NtGdiDvpGetVideoPortField 2 -# NtGdiDvpGetVideoPortFlipStatus 2 -# NtGdiDvpGetVideoPortInputFormats 2 -# NtGdiDvpGetVideoPortLine 2 -# NtGdiDvpGetVideoPortOutputFormats 2 -# NtGdiDvpGetVideoPortConnectInfo 2 -# NtGdiDvpGetVideoSignalStatus 2 -# NtGdiDvpUpdateVideoPort 4 -# NtGdiDvpWaitForVideoPortSync 2 -# NtGdiDvpAcquireNotification 3 -# NtGdiDvpReleaseNotification 2 -# NtGdiDxgGenericThunk 6 +# NtGdiDvpCanCreateVideoPort 2 +# NtGdiDvpColorControl 2 +# NtGdiDvpCreateVideoPort 2 +# NtGdiDvpDestroyVideoPort 2 +# NtGdiDvpFlipVideoPort 4 +# NtGdiDvpGetVideoPortBandwidth 2 +# NtGdiDvpGetVideoPortField 2 +# NtGdiDvpGetVideoPortFlipStatus 2 +# NtGdiDvpGetVideoPortInputFormats 2 +# NtGdiDvpGetVideoPortLine 2 +# NtGdiDvpGetVideoPortOutputFormats 2 +# NtGdiDvpGetVideoPortConnectInfo 2 +# NtGdiDvpGetVideoSignalStatus 2 +# NtGdiDvpUpdateVideoPort 4 +# NtGdiDvpWaitForVideoPortSync 2 +# NtGdiDvpAcquireNotification 3 +# NtGdiDvpReleaseNotification 2 +# NtGdiDxgGenericThunk 6 NtGdiDeleteClientObj 1 NtGdiDeleteColorSpace 1 -# NtGdiDeleteColorTransform 2 +# NtGdiDeleteColorTransform 2 NtGdiDeleteObjectApp 1 NtGdiDescribePixelFormat 4 -# NtGdiGetPerBandInfo 2 -# NtGdiDoBanding 4 -# NtGdiDoPalette 6 +# NtGdiGetPerBandInfo 2 +# NtGdiDoBanding 4 +# NtGdiDoPalette 6 NtGdiDrawEscape 4 NtGdiEllipse 5 -# NtGdiEnableEudc 1 +# NtGdiEnableEudc 1 NtGdiEndDoc 1 NtGdiEndPage 1 NtGdiEndPath 1 -# NtGdiEnumFontChunk 5 -# NtGdiEnumFontClose 1 -# NtGdiEnumFontOpen 7 +# NtGdiEnumFontChunk 5 +# NtGdiEnumFontClose 1 +# NtGdiEnumFontOpen 7 NtGdiEnumObjects 4 NtGdiEqualRgn 2 -# NtGdiEudcLoadUnloadLink 7 +# NtGdiEudcLoadUnloadLink 7 NtGdiExcludeClipRect 5 NtGdiExtCreatePen 11 NtGdiExtCreateRegion 3 @@ -152,13 +152,13 @@ NtGdiExtFloodFill 5 NtGdiExtGetObjectW 3 NtGdiExtSelectClipRgn 3 -# NtGdiExtTextOutW 9 +# NtGdiExtTextOutW 9 NtGdiFillPath 1 NtGdiFillRgn 3 NtGdiFlattenPath 1 -# NtGdiFlushUserBatch 0 +# NtGdiFlushUserBatch 0 NtGdiFlush 0 -# NtGdiForceUFIMapping 2 +# NtGdiForceUFIMapping 2 NtGdiFrameRgn 5 # NtGdiFullscreenControl 5 NtGdiGetAndSetDCDword 4 @@ -246,10 +246,10 @@ NtGdiPlgBlt 11 NtGdiPolyDraw 4 NtGdiPolyPolyDraw 5 -# NtGdiPolyTextOutW 4 +# NtGdiPolyTextOutW 4 NtGdiPtInRegion 3 NtGdiPtVisible 3 -# NtGdiQueryFonts 3 +# NtGdiQueryFonts 3 # NtGdiQueryFontAssocInfo 1 NtGdiRectangle 5 NtGdiRectInRegion 2 @@ -312,12 +312,12 @@ NtGdiWidenPath 1 NtUserActivateKeyboardLayout 2 NtUserAlterWindowStyle 3 -# NtUserAssociateInputContext 3 +# NtUserAssociateInputContext 3 NtUserAttachThreadInput 3 NtUserBeginPaint 2 NtUserBitBltSysBmp 8 NtUserBlockInput 1 -# NtUserBuildHimcList 4 +# NtUserBuildHimcList 4 NtUserBuildHwndList 7 NtUserBuildNameList 4 NtUserBuildPropList 4 @@ -333,14 +333,14 @@ NtUserCallTwoParam 3 NtUserChangeClipboardChain 2 NtUserChangeDisplaySettings 5 -# NtUserCheckImeHotKey 2 +# NtUserCheckImeHotKey 2 NtUserCheckMenuItem 3 NtUserChildWindowFromPointEx 4 NtUserClipCursor 1 NtUserCloseClipboard 0 NtUserCloseDesktop 1 NtUserCloseWindowStation 1 -# NtUserConsoleControl 3 +# NtUserConsoleControl 3 NtUserConvertMemHandle 2 NtUserCopyAcceleratorTable 3 NtUserCountClipboardFormats 0 @@ -399,7 +399,7 @@ NtUserGetClipboardFormatName 3 NtUserGetClipboardOwner 0 NtUserGetClipboardSequenceNumber 0 -# NtUserGetClipboardViewer 1 Wrong number of param ? +NtUserGetClipboardViewer 0 NtUserGetClipCursor 1 NtUserGetComboBoxInfo 2 NtUserGetControlBrush 3 @@ -682,7 +682,6 @@ NtUserFindExistingCursorIcon 4 NtUserFindWindowEx 4 NtUserGetClassInfo 4 -NtUserGetClipboardViewer 0 NtUserInitTask 11 NtUserSetClassWord 3 NtUserSetCursorIconData 6
17 years, 4 months
1
0
0
0
[cfinck] 28435: Merge 28433 for real now. In my last commit, I wrote 28402:28433, but only merged up to 28432.
by cfinck@svn.reactos.org
Author: cfinck Date: Tue Aug 21 00:30:37 2007 New Revision: 28435 URL:
http://svn.reactos.org/svn/reactos?rev=28435&view=rev
Log: Merge 28433 for real now. In my last commit, I wrote 28402:28433, but only merged up to 28432. Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/precomp.h branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/startrec.c branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/sysdm.rbuild Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/precomp.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
============================================================================== --- branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/precomp.h (original) +++ branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/precomp.h Tue Aug 21 00:30:37 2007 @@ -3,7 +3,6 @@ #include <ntstatus.h> #define WIN32_NO_STATUS -#include <windows.h> #include <windows.h> #include <commctrl.h> #include <powrprof.h> @@ -16,6 +15,7 @@ #include <shlobj.h> #include <cplext.h> #include <regstr.h> +#include <setupapi.h> #include "resource.h" #define NUM_APPLETS (1) @@ -66,5 +66,13 @@ PAGEFILE Pagefile[26]; } VIRTMEM, *PVIRTMEM; +typedef struct _BOOTRECORD +{ + DWORD BootType; + TCHAR szSectionName[128]; + TCHAR szBootPath[MAX_PATH]; + TCHAR szOptions[512]; + +}BOOTRECORD, *PBOOTRECORD; #endif /* __CPL_SYSDM_H */ Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/startrec.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
============================================================================== --- branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/startrec.c (original) +++ branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/startrec.c Tue Aug 21 00:30:37 2007 @@ -10,10 +10,8 @@ */ #include "precomp.h" - static TCHAR m_szFreeldrIni[MAX_PATH + 15]; -static TCHAR szBootLdrSection[12]; -static TCHAR szBootLdrDefault[10]; +static int m_FreeLdrIni = 0; void SetTimeout(HWND hwndDlg, int Timeout) { @@ -27,6 +25,431 @@ } SendDlgItemMessage(hwndDlg, IDC_STRRECLISTUPDWN, UDM_SETPOS, (WPARAM) 0, (LPARAM) MAKELONG((short) Timeout, 0)); } + +DWORD GetSystemDrive(TCHAR ** szSystemDrive) +{ + DWORD dwBufSize; + /* get Path to freeldr.ini or boot.ini */ + *szSystemDrive = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(TCHAR)); + if (szSystemDrive != NULL) + { + dwBufSize = GetEnvironmentVariable(_T("SystemDrive"), *szSystemDrive, MAX_PATH); + if (dwBufSize > MAX_PATH) + { + TCHAR *szTmp; + DWORD dwBufSize2; + + szTmp = HeapReAlloc(GetProcessHeap(), 0, *szSystemDrive, dwBufSize * sizeof(TCHAR)); + if (szTmp == NULL) + goto FailGetSysDrive; + + *szSystemDrive = szTmp; + + dwBufSize2 = GetEnvironmentVariable(_T("SystemDrive"), *szSystemDrive, dwBufSize); + if (dwBufSize2 > dwBufSize || dwBufSize2 == 0) + goto FailGetSysDrive; + } + else if (dwBufSize == 0) + { +FailGetSysDrive: + HeapFree(GetProcessHeap(), 0, szSystemDrive); + *szSystemDrive = NULL; + return FALSE; + } + return dwBufSize; + } + return FALSE; +} + +PBOOTRECORD ReadFreeldrSection(HINF hInf, TCHAR * szSectionName) +{ + PBOOTRECORD pRecord; + INFCONTEXT InfContext; + TCHAR szName[MAX_PATH]; + TCHAR szValue[MAX_PATH]; + DWORD LineLength; + + if (!SetupFindFirstLine(hInf, + szSectionName, + NULL, + &InfContext)) + { + /* failed to find section */ + return NULL; + } + + pRecord = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BOOTRECORD)); + if (pRecord == NULL) + { + return NULL; + } + _tcscpy(pRecord->szSectionName, szSectionName); + + do + { + if (!SetupGetStringField(&InfContext, + 0, + szName, + sizeof(szName) / sizeof(TCHAR), + &LineLength)) + { + break; + } + + if (!SetupGetStringField(&InfContext, + 1, + szValue, + sizeof(szValue) / sizeof(TCHAR), + &LineLength)) + { + break; + } + + + if (!_tcsnicmp(szName, _T("BootType"), 8)) + { + if (!_tcsnicmp(szValue, _T("ReactOS"), 7)) + { + //FIXME store as enum + pRecord->BootType = 1; + } + else + { + pRecord->BootType = 0; + } + } + else if (!_tcsnicmp(szName, _T("SystemPath"), 10)) + { + _tcscpy(pRecord->szBootPath, szValue); + } + else if (!_tcsnicmp(szName, _T("Options"), 7)) + { + //FIXME store flags as values + _tcscpy(pRecord->szOptions, szValue); + } + + }while(SetupFindNextLine(&InfContext, &InfContext)); + + return pRecord; +} + + +int LoadFreeldrSettings(HINF hInf, HWND hwndDlg) +{ + INFCONTEXT InfContext; + PBOOTRECORD pRecord; + TCHAR szDefaultOs[MAX_PATH]; + TCHAR szName[MAX_PATH]; + TCHAR szValue[MAX_PATH]; + DWORD LineLength; + DWORD TimeOut; + LRESULT lResult; + + if (!SetupFindFirstLine(hInf, + _T("FREELOADER"), + _T("DefaultOS"), + &InfContext)) + { + /* failed to find default os */ + return FALSE; + } + + if (!SetupGetStringField(&InfContext, + 1, + szDefaultOs, + sizeof(szDefaultOs) / sizeof(TCHAR), + &LineLength)) + { + /* no key */ + return FALSE; + } + + if (!SetupFindFirstLine(hInf, + _T("FREELOADER"), + _T("TimeOut"), + &InfContext)) + { + /* expected to find timeout value */ + return FALSE; + } + + + if (!SetupGetIntField(&InfContext, + 1, + (PINT)&TimeOut)) + { + /* failed to retrieve timeout */ + return FALSE; + } + + if (!SetupFindFirstLine(hInf, + _T("Operating Systems"), + NULL, + &InfContext)) + { + /* expected list of operating systems */ + return FALSE; + } + + do + { + if (!SetupGetStringField(&InfContext, + 0, + szName, + sizeof(szName) / sizeof(TCHAR), + &LineLength)) + { + /* the ini file is messed up */ + return FALSE; + } + + if (!SetupGetStringField(&InfContext, + 1, + szValue, + sizeof(szValue) / sizeof(TCHAR), + &LineLength)) + { + /* the ini file is messed up */ + return FALSE; + } + + pRecord = ReadFreeldrSection(hInf, szName); + if (pRecord) + { + lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM)szValue); + if (lResult != CB_ERR) + { + SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)pRecord); + if (!_tcscmp(szDefaultOs, szName)) + { + /* we store the friendly name as key */ + _tcscpy(szDefaultOs, szValue); + } + + } + else + { + HeapFree(GetProcessHeap(), 0, pRecord); + } + } + + }while(SetupFindNextLine(&InfContext, &InfContext)); + + /* find default os in list */ + lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_FINDSTRING, (WPARAM)-1, (LPARAM)szDefaultOs); + if (lResult != CB_ERR) + { + /* set cur sel */ + SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETCURSEL, (WPARAM)lResult, (LPARAM)0); + } + + SetTimeout(hwndDlg, TimeOut); + return TRUE; +} + +int LoadBootSettings(HINF hInf, HWND hwndDlg) +{ + INFCONTEXT InfContext; + TCHAR szName[MAX_PATH]; + TCHAR szValue[MAX_PATH]; + DWORD LineLength; + DWORD TimeOut = 0; + TCHAR szDefaultOS[MAX_PATH]; + TCHAR szOptions[MAX_PATH]; + PBOOTRECORD pRecord; + LRESULT lResult; + + if(!SetupFindFirstLine(hInf, + _T("boot loader"), + NULL, + &InfContext)) + { + return FALSE; + } + + do + { + if (!SetupGetStringField(&InfContext, + 0, + szName, + sizeof(szName) / sizeof(TCHAR), + &LineLength)) + { + return FALSE; + } + + if (!SetupGetStringField(&InfContext, + 1, + szValue, + sizeof(szValue) / sizeof(TCHAR), + &LineLength)) + { + return FALSE; + } + + if (!_tcsnicmp(szName, _T("timeout"), 7)) + { + TimeOut = _ttoi(szValue); + } + + if (!_tcsnicmp(szName, _T("default"), 7)) + { + _tcscpy(szDefaultOS, szValue); + } + + }while(SetupFindNextLine(&InfContext, &InfContext)); + + if (!SetupFindFirstLine(hInf, + _T("operating systems"), + NULL, + &InfContext)) + { + /* failed to find operating systems section */ + return FALSE; + } + + do + { + if (!SetupGetStringField(&InfContext, + 0, + szName, + sizeof(szName) / sizeof(TCHAR), + &LineLength)) + { + return FALSE; + } + + if (!SetupGetStringField(&InfContext, + 1, + szValue, + sizeof(szValue) / sizeof(TCHAR), + &LineLength)) + { + return FALSE; + } + + SetupGetStringField(&InfContext, + 2, + szOptions, + sizeof(szOptions) / sizeof(TCHAR), + &LineLength); + + pRecord = (PBOOTRECORD) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BOOTRECORD)); + if (pRecord) + { + pRecord->BootType = 0; + _tcscpy(pRecord->szBootPath, szName); + _tcscpy(pRecord->szSectionName, szValue); + _tcscpy(pRecord->szOptions, szOptions); + + if (!_tcscmp(szName, szDefaultOS)) + { + /* ms boot ini stores the path not the friendly name */ + _tcscpy(szDefaultOS, szValue); + } + + lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM)szValue); + if (lResult != CB_ERR) + { + SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)pRecord); + } + else + { + HeapFree(GetProcessHeap(), 0, pRecord); + } + } + + }while(SetupFindNextLine(&InfContext, &InfContext)); + /* find default os in list */ + lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_FINDSTRING, (WPARAM)0, (LPARAM)szDefaultOS); + if (lResult != CB_ERR) + { + /* set cur sel */ + SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETCURSEL, (WPARAM)lResult, (LPARAM)0); + } + + SetTimeout(hwndDlg, TimeOut); + return TRUE; +} + +void DeleteBootRecords(HWND hwndDlg) +{ + LRESULT lIndex; + LONG index; + PBOOTRECORD pRecord; + + + lIndex = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETCOUNT, (WPARAM)0, (LPARAM)0); + if (lIndex == CB_ERR) + return; + + for (index = 0; index <lIndex; index++) + { + pRecord = (PBOOTRECORD) SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETITEMDATA, (WPARAM)index, (LPARAM)0); + if ((INT)pRecord != CB_ERR) + { + HeapFree(GetProcessHeap(), 0, pRecord); + } + } + SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_RESETCONTENT, (WPARAM)0, (LPARAM)0); +} + +LRESULT LoadOSList(HWND hwndDlg) +{ + DWORD dwBufSize; + TCHAR *szSystemDrive; + HINF hInf; + + SetDlgItemText(hwndDlg, IDC_STRRECDUMPFILE, _T("%SystemRoot%\\MiniDump")); + + dwBufSize = GetSystemDrive(&szSystemDrive); + if (!dwBufSize) + return FALSE; + + + _tcscpy(m_szFreeldrIni, szSystemDrive); + _tcscat(m_szFreeldrIni, _T("\\freeldr.ini")); + if (PathFileExists(m_szFreeldrIni)) + { + /* freeldr.ini exists */ + hInf = SetupOpenInfFile(m_szFreeldrIni, + NULL, + INF_STYLE_OLDNT, + NULL); + + if (hInf != INVALID_HANDLE_VALUE) + { + LoadFreeldrSettings(hInf, hwndDlg); + SetupCloseInfFile(hInf); + m_FreeLdrIni = 1; + return TRUE; + } + return FALSE; + } + /* try load boot.ini settings */ + _tcscpy(m_szFreeldrIni, szSystemDrive); + _tcscat(m_szFreeldrIni, _T("\\boot.ini")); + + if (PathFileExists(m_szFreeldrIni)) + { + /* load boot.ini settings */ + hInf = SetupOpenInfFile(m_szFreeldrIni, + NULL, + INF_STYLE_OLDNT, + NULL); + + if (hInf != INVALID_HANDLE_VALUE) + { + LoadBootSettings(hInf, hwndDlg); + SetupCloseInfFile(hInf); + m_FreeLdrIni = 2; + return TRUE; + } + return FALSE; + } + return FALSE; +} + /* Property page dialog callback */ INT_PTR CALLBACK @@ -35,11 +458,10 @@ WPARAM wParam, LPARAM lParam) { - TCHAR *szSystemDrive; - TCHAR szDefaultOS[MAX_PATH]; - TCHAR szDefaultOSName[MAX_PATH]; + PBOOTRECORD pRecord; + int iTimeout; + LRESULT lResult; TCHAR szTimeout[10]; - int iTimeout; UNREFERENCED_PARAMETER(lParam); @@ -47,76 +469,7 @@ { case WM_INITDIALOG: { - DWORD dwBufSize; - - /* get Path to freeldr.ini or boot.ini */ - szSystemDrive = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(TCHAR)); - if (szSystemDrive != NULL) - { - dwBufSize = GetEnvironmentVariable(_T("SystemDrive"), szSystemDrive, MAX_PATH); - if (dwBufSize > MAX_PATH) - { - TCHAR *szTmp; - DWORD dwBufSize2; - - szTmp = HeapReAlloc(GetProcessHeap(), 0, szSystemDrive, dwBufSize * sizeof(TCHAR)); - if (szTmp == NULL) - goto FailGetSysDrive; - - szSystemDrive = szTmp; - - dwBufSize2 = GetEnvironmentVariable(_T("SystemDrive"), szSystemDrive, dwBufSize); - if (dwBufSize2 > dwBufSize || dwBufSize2 == 0) - goto FailGetSysDrive; - } - else if (dwBufSize == 0) - { -FailGetSysDrive: - HeapFree(GetProcessHeap(), 0, szSystemDrive); - szSystemDrive = NULL; - return FALSE; - } - - if (szSystemDrive != NULL) - { - if (m_szFreeldrIni != NULL) - { - _tcscpy(m_szFreeldrIni, szSystemDrive); - _tcscat(m_szFreeldrIni, _T("\\freeldr.ini")); - if (!PathFileExists(m_szFreeldrIni)) - { - _tcscpy(m_szFreeldrIni, szSystemDrive); - _tcscat(m_szFreeldrIni, _T("\\boot.ini")); - _tcscpy(szBootLdrSection, _T("boot loader")); - _tcscpy(szBootLdrDefault, _T("default")); - } - else - { - _tcscpy(szBootLdrSection, _T("FREELOADER")); - _tcscpy(szBootLdrDefault, _T("DefaultOS")); - } - } - HeapFree(GetProcessHeap(), 0, szSystemDrive); - } - } - - if (m_szFreeldrIni == NULL) - return FALSE; - - SetDlgItemText(hwndDlg, IDC_STRRECDUMPFILE, _T("%SystemRoot%\\MiniDump")); - - /* load settings from freeldr.ini */ - GetPrivateProfileString(szBootLdrSection, szBootLdrDefault, NULL, szDefaultOS, MAX_PATH, m_szFreeldrIni); - GetPrivateProfileString(_T("operating systems"), szDefaultOS, NULL, szDefaultOSName, MAX_PATH, m_szFreeldrIni); - SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM)szDefaultOSName); - SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETCURSEL, (WPARAM)0, (LPARAM)0); - - /* timeout */ - iTimeout = GetPrivateProfileInt(szBootLdrSection, _T("timeout"), 0, m_szFreeldrIni); - SetTimeout(hwndDlg, iTimeout); - if (iTimeout != 0) - SendDlgItemMessage(hwndDlg, IDC_STRECLIST, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0); - + return LoadOSList(hwndDlg); } break; @@ -127,6 +480,9 @@ case IDC_STRRECEDIT: { ShellExecute(0, _T("open"), _T("notepad"), m_szFreeldrIni, NULL, SW_SHOWNORMAL); + // FIXME use CreateProcess and wait untill finished + // DeleteBootRecords(hwndDlg); + // LoadOSList(hwndDlg); break; } case IDOK: @@ -137,14 +493,63 @@ else iTimeout = 0; _stprintf(szTimeout, _T("%i"), iTimeout); - WritePrivateProfileString(szBootLdrSection, _T("timeout"), szTimeout, m_szFreeldrIni); - } - case IDCANCEL: - { + + lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETCURSEL, (WPARAM)0, (LPARAM)0); + if (lResult == CB_ERR) + { + /* ? */ + DeleteBootRecords(hwndDlg); + return TRUE; + } + + + pRecord = (PBOOTRECORD) SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETITEMDATA, (WPARAM)lResult, (LPARAM)0); + + + + if ((INT)pRecord != CB_ERR) + { + if (m_FreeLdrIni == 1) // FreeLdrIni style + { + /* set default timeout */ + WritePrivateProfileString(_T("FREELOADER"), + _T("TimeOut"), + szTimeout, + m_szFreeldrIni); + /* set default os */ + WritePrivateProfileString(_T("FREELOADER"), + _T("DefaultOS"), + pRecord->szSectionName, + m_szFreeldrIni); + + } + else if (m_FreeLdrIni == 2) // BootIni style + { + /* set default timeout */ + WritePrivateProfileString(_T("boot loader"), + _T("timeout"), + szTimeout, + m_szFreeldrIni); + /* set default os */ + WritePrivateProfileString(_T("boot loader"), + _T("default"), + pRecord->szBootPath, + m_szFreeldrIni); + + } + } + DeleteBootRecords(hwndDlg); EndDialog(hwndDlg, LOWORD(wParam)); return TRUE; break; + } + case IDCANCEL: + { + DeleteBootRecords(hwndDlg); + EndDialog(hwndDlg, + LOWORD(wParam)); + return TRUE; } case IDC_STRECLIST: { Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/sysdm.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
============================================================================== --- branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/sysdm.rbuild (original) +++ branches/ros-branch-0_3_3-new/reactos/dll/cpl/sysdm/sysdm.rbuild Tue Aug 21 00:30:37 2007 @@ -8,6 +8,7 @@ <define name="WINVER">0x501</define> <library>kernel32</library> <library>advapi32</library> + <library>setupapi</library> <library>msvcrt</library> <library>user32</library> <library>gdi32</library>
17 years, 4 months
1
0
0
0
[cfinck] 28434: Merge 28402:28433
by cfinck@svn.reactos.org
Author: cfinck Date: Mon Aug 20 23:50:07 2007 New Revision: 28434 URL:
http://svn.reactos.org/svn/reactos?rev=28434&view=rev
Log: Merge 28402:28433 Added: branches/ros-branch-0_3_3-new/reactos/dll/win32/winsta/winsta.rbuild - copied unchanged from r28432, trunk/reactos/dll/win32/winsta/winsta.rbuild branches/ros-branch-0_3_3-new/reactos/dll/win32/ws2_32/misc/async.c - copied unchanged from r28432, trunk/reactos/dll/win32/ws2_32/misc/async.c branches/ros-branch-0_3_3-new/reactos/include/reactos/wine/winsock16.h - copied unchanged from r28432, trunk/reactos/include/reactos/wine/winsock16.h branches/ros-branch-0_3_3-new/reactos/tools/mkhive/mkhive.sln - copied unchanged from r28432, trunk/reactos/tools/mkhive/mkhive.sln branches/ros-branch-0_3_3-new/reactos/tools/mkhive/mkhive.vcproj - copied unchanged from r28432, trunk/reactos/tools/mkhive/mkhive.vcproj Modified: branches/ros-branch-0_3_3-new/reactos/base/applications/cmdutils/more/more.c branches/ros-branch-0_3_3-new/reactos/baseaddress.rbuild branches/ros-branch-0_3_3-new/reactos/boot/bootdata/packages/reactos.dff branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/access.c branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/display.c branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/general.c branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/keyboard.c branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/cs-CZ.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/de-DE.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/en-US.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/es-ES.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/fr-FR.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/hu-HU.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/id-ID.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/it-IT.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/ja-JP.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/nl-NL.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/pl-PL.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/ru-RU.rc branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/mouse.c branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/resource.h branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/sound.c branches/ros-branch-0_3_3-new/reactos/dll/cpl/ncpa/lang/fr-FR.rc branches/ros-branch-0_3_3-new/reactos/dll/win32/gdi32/gdi32.def branches/ros-branch-0_3_3-new/reactos/dll/win32/gdi32/misc/stubs.c branches/ros-branch-0_3_3-new/reactos/dll/win32/gdi32/objects/bitmap.c branches/ros-branch-0_3_3-new/reactos/dll/win32/gdi32/objects/dc.c branches/ros-branch-0_3_3-new/reactos/dll/win32/win32.rbuild branches/ros-branch-0_3_3-new/reactos/dll/win32/ws2_32/misc/ns.c branches/ros-branch-0_3_3-new/reactos/dll/win32/ws2_32/ws2_32.rbuild branches/ros-branch-0_3_3-new/reactos/drivers/video/miniport/vbe/vbemp.c branches/ros-branch-0_3_3-new/reactos/include/ddk/ddrawint.h branches/ros-branch-0_3_3-new/reactos/include/ddk/winddk.h branches/ros-branch-0_3_3-new/reactos/include/psdk/winnt.h branches/ros-branch-0_3_3-new/reactos/include/reactos/win32k/ntgdibad.h branches/ros-branch-0_3_3-new/reactos/lib/cmlib/cmlib.mak branches/ros-branch-0_3_3-new/reactos/ntoskrnl/kdbg/i386/i386-dis.c branches/ros-branch-0_3_3-new/reactos/ntoskrnl/ob/obhandle.c branches/ros-branch-0_3_3-new/reactos/subsystems/win32/win32k/ntuser/windc.c branches/ros-branch-0_3_3-new/reactos/subsystems/win32/win32k/objects/color.c branches/ros-branch-0_3_3-new/reactos/subsystems/win32/win32k/objects/dc.c branches/ros-branch-0_3_3-new/reactos/subsystems/win32/win32k/objects/dibobj.c branches/ros-branch-0_3_3-new/reactos/subsystems/win32/win32k/w32ksvc.db branches/ros-branch-0_3_3-new/reactos/tools/cabman/cabinet.cxx branches/ros-branch-0_3_3-new/reactos/tools/cdmake/cdmake.c branches/ros-branch-0_3_3-new/reactos/tools/mkhive/mkhive.h branches/ros-branch-0_3_3-new/reactos/tools/mkhive/reginf.c branches/ros-branch-0_3_3-new/reactos/tools/mkhive/registry.c branches/ros-branch-0_3_3-new/reactos/tools/nci/ncitool.c branches/ros-branch-0_3_3-new/reactos/tools/ssprintf.cpp branches/ros-branch-0_3_3-new/reactos/tools/tools.mak branches/ros-branch-0_3_3-new/reactos/tools/unicode/cptable.c branches/ros-branch-0_3_3-new/reactos/tools/unicode/mbtowc.c branches/ros-branch-0_3_3-new/reactos/tools/unicode/string.c branches/ros-branch-0_3_3-new/reactos/tools/unicode/unicode.mak branches/ros-branch-0_3_3-new/reactos/tools/unicode/utf8.c branches/ros-branch-0_3_3-new/reactos/tools/unicode/wctomb.c branches/ros-branch-0_3_3-new/reactos/tools/wrc/dumpres.c branches/ros-branch-0_3_3-new/reactos/tools/wrc/genres.c branches/ros-branch-0_3_3-new/reactos/tools/wrc/lex.yy.c branches/ros-branch-0_3_3-new/reactos/tools/wrc/newstruc.c branches/ros-branch-0_3_3-new/reactos/tools/wrc/parser.l branches/ros-branch-0_3_3-new/reactos/tools/wrc/parser.tab.c branches/ros-branch-0_3_3-new/reactos/tools/wrc/parser.y branches/ros-branch-0_3_3-new/reactos/tools/wrc/utils.c branches/ros-branch-0_3_3-new/reactos/tools/wrc/wrc.c branches/ros-branch-0_3_3-new/reactos/tools/xml.cpp branches/ros-branch-0_3_3-new/rosapps/downloader/downloader.xml branches/ros-branch-0_3_3-new/rostests/dxtest/win32kdxtest/dump.c [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/ros-branch-0_3_3-new/reactos/base/applications/cmdutils/more/more.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/ba…
Modified: branches/ros-branch-0_3_3-new/reactos/baseaddress.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/ba…
Modified: branches/ros-branch-0_3_3-new/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/bo…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/access.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/display.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/general.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/keyboard.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/mouse.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/resource.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/access/sound.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/cpl/ncpa/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/win32/gdi32/gdi32.def URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/win32/gdi32/misc/stubs.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/win32/gdi32/objects/bitmap.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/win32/gdi32/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/win32/win32.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/win32/ws2_32/misc/ns.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/dll/win32/ws2_32/ws2_32.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dl…
Modified: branches/ros-branch-0_3_3-new/reactos/drivers/video/miniport/vbe/vbemp.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/dr…
Modified: branches/ros-branch-0_3_3-new/reactos/include/ddk/ddrawint.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/in…
Modified: branches/ros-branch-0_3_3-new/reactos/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/in…
Modified: branches/ros-branch-0_3_3-new/reactos/include/psdk/winnt.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/in…
Modified: branches/ros-branch-0_3_3-new/reactos/include/reactos/win32k/ntgdibad.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/in…
Modified: branches/ros-branch-0_3_3-new/reactos/lib/cmlib/cmlib.mak URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/li…
Modified: branches/ros-branch-0_3_3-new/reactos/ntoskrnl/kdbg/i386/i386-dis.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/nt…
Modified: branches/ros-branch-0_3_3-new/reactos/ntoskrnl/ob/obhandle.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/nt…
Modified: branches/ros-branch-0_3_3-new/reactos/subsystems/win32/win32k/ntuser/windc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/su…
Modified: branches/ros-branch-0_3_3-new/reactos/subsystems/win32/win32k/objects/color.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/su…
Modified: branches/ros-branch-0_3_3-new/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/su…
Modified: branches/ros-branch-0_3_3-new/reactos/subsystems/win32/win32k/objects/dibobj.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/su…
Modified: branches/ros-branch-0_3_3-new/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/su…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/cabman/cabinet.cxx URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/cdmake/cdmake.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/mkhive/mkhive.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/mkhive/reginf.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/mkhive/registry.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/nci/ncitool.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/ssprintf.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/tools.mak URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/unicode/cptable.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/unicode/mbtowc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/unicode/string.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/unicode/unicode.mak URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/unicode/utf8.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/unicode/wctomb.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/wrc/dumpres.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/wrc/genres.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/wrc/lex.yy.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/wrc/newstruc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/wrc/parser.l URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/wrc/parser.tab.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/wrc/parser.y URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/wrc/utils.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/wrc/wrc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/reactos/tools/xml.cpp URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/reactos/to…
Modified: branches/ros-branch-0_3_3-new/rosapps/downloader/downloader.xml URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/rosapps/do…
Modified: branches/ros-branch-0_3_3-new/rostests/dxtest/win32kdxtest/dump.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_3_3-new/rostests/d…
17 years, 4 months
1
0
0
0
[janderwald] 28433: - support reading multiple boot configuration - support saving prefered boot configuration (freeldr / boot ini style) - parsing of boot options needs to be done
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Aug 20 23:21:54 2007 New Revision: 28433 URL:
http://svn.reactos.org/svn/reactos?rev=28433&view=rev
Log: - support reading multiple boot configuration - support saving prefered boot configuration (freeldr / boot ini style) - parsing of boot options needs to be done Modified: trunk/reactos/dll/cpl/sysdm/precomp.h trunk/reactos/dll/cpl/sysdm/startrec.c trunk/reactos/dll/cpl/sysdm/sysdm.rbuild Modified: trunk/reactos/dll/cpl/sysdm/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/precomp.h?re…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/precomp.h (original) +++ trunk/reactos/dll/cpl/sysdm/precomp.h Mon Aug 20 23:21:54 2007 @@ -3,7 +3,6 @@ #include <ntstatus.h> #define WIN32_NO_STATUS -#include <windows.h> #include <windows.h> #include <commctrl.h> #include <powrprof.h> @@ -16,6 +15,7 @@ #include <shlobj.h> #include <cplext.h> #include <regstr.h> +#include <setupapi.h> #include "resource.h" #define NUM_APPLETS (1) @@ -66,5 +66,13 @@ PAGEFILE Pagefile[26]; } VIRTMEM, *PVIRTMEM; +typedef struct _BOOTRECORD +{ + DWORD BootType; + TCHAR szSectionName[128]; + TCHAR szBootPath[MAX_PATH]; + TCHAR szOptions[512]; + +}BOOTRECORD, *PBOOTRECORD; #endif /* __CPL_SYSDM_H */ Modified: trunk/reactos/dll/cpl/sysdm/startrec.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/startrec.c?r…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/startrec.c (original) +++ trunk/reactos/dll/cpl/sysdm/startrec.c Mon Aug 20 23:21:54 2007 @@ -10,10 +10,8 @@ */ #include "precomp.h" - static TCHAR m_szFreeldrIni[MAX_PATH + 15]; -static TCHAR szBootLdrSection[12]; -static TCHAR szBootLdrDefault[10]; +static int m_FreeLdrIni = 0; void SetTimeout(HWND hwndDlg, int Timeout) { @@ -27,6 +25,431 @@ } SendDlgItemMessage(hwndDlg, IDC_STRRECLISTUPDWN, UDM_SETPOS, (WPARAM) 0, (LPARAM) MAKELONG((short) Timeout, 0)); } + +DWORD GetSystemDrive(TCHAR ** szSystemDrive) +{ + DWORD dwBufSize; + /* get Path to freeldr.ini or boot.ini */ + *szSystemDrive = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(TCHAR)); + if (szSystemDrive != NULL) + { + dwBufSize = GetEnvironmentVariable(_T("SystemDrive"), *szSystemDrive, MAX_PATH); + if (dwBufSize > MAX_PATH) + { + TCHAR *szTmp; + DWORD dwBufSize2; + + szTmp = HeapReAlloc(GetProcessHeap(), 0, *szSystemDrive, dwBufSize * sizeof(TCHAR)); + if (szTmp == NULL) + goto FailGetSysDrive; + + *szSystemDrive = szTmp; + + dwBufSize2 = GetEnvironmentVariable(_T("SystemDrive"), *szSystemDrive, dwBufSize); + if (dwBufSize2 > dwBufSize || dwBufSize2 == 0) + goto FailGetSysDrive; + } + else if (dwBufSize == 0) + { +FailGetSysDrive: + HeapFree(GetProcessHeap(), 0, szSystemDrive); + *szSystemDrive = NULL; + return FALSE; + } + return dwBufSize; + } + return FALSE; +} + +PBOOTRECORD ReadFreeldrSection(HINF hInf, TCHAR * szSectionName) +{ + PBOOTRECORD pRecord; + INFCONTEXT InfContext; + TCHAR szName[MAX_PATH]; + TCHAR szValue[MAX_PATH]; + DWORD LineLength; + + if (!SetupFindFirstLine(hInf, + szSectionName, + NULL, + &InfContext)) + { + /* failed to find section */ + return NULL; + } + + pRecord = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BOOTRECORD)); + if (pRecord == NULL) + { + return NULL; + } + _tcscpy(pRecord->szSectionName, szSectionName); + + do + { + if (!SetupGetStringField(&InfContext, + 0, + szName, + sizeof(szName) / sizeof(TCHAR), + &LineLength)) + { + break; + } + + if (!SetupGetStringField(&InfContext, + 1, + szValue, + sizeof(szValue) / sizeof(TCHAR), + &LineLength)) + { + break; + } + + + if (!_tcsnicmp(szName, _T("BootType"), 8)) + { + if (!_tcsnicmp(szValue, _T("ReactOS"), 7)) + { + //FIXME store as enum + pRecord->BootType = 1; + } + else + { + pRecord->BootType = 0; + } + } + else if (!_tcsnicmp(szName, _T("SystemPath"), 10)) + { + _tcscpy(pRecord->szBootPath, szValue); + } + else if (!_tcsnicmp(szName, _T("Options"), 7)) + { + //FIXME store flags as values + _tcscpy(pRecord->szOptions, szValue); + } + + }while(SetupFindNextLine(&InfContext, &InfContext)); + + return pRecord; +} + + +int LoadFreeldrSettings(HINF hInf, HWND hwndDlg) +{ + INFCONTEXT InfContext; + PBOOTRECORD pRecord; + TCHAR szDefaultOs[MAX_PATH]; + TCHAR szName[MAX_PATH]; + TCHAR szValue[MAX_PATH]; + DWORD LineLength; + DWORD TimeOut; + LRESULT lResult; + + if (!SetupFindFirstLine(hInf, + _T("FREELOADER"), + _T("DefaultOS"), + &InfContext)) + { + /* failed to find default os */ + return FALSE; + } + + if (!SetupGetStringField(&InfContext, + 1, + szDefaultOs, + sizeof(szDefaultOs) / sizeof(TCHAR), + &LineLength)) + { + /* no key */ + return FALSE; + } + + if (!SetupFindFirstLine(hInf, + _T("FREELOADER"), + _T("TimeOut"), + &InfContext)) + { + /* expected to find timeout value */ + return FALSE; + } + + + if (!SetupGetIntField(&InfContext, + 1, + (PINT)&TimeOut)) + { + /* failed to retrieve timeout */ + return FALSE; + } + + if (!SetupFindFirstLine(hInf, + _T("Operating Systems"), + NULL, + &InfContext)) + { + /* expected list of operating systems */ + return FALSE; + } + + do + { + if (!SetupGetStringField(&InfContext, + 0, + szName, + sizeof(szName) / sizeof(TCHAR), + &LineLength)) + { + /* the ini file is messed up */ + return FALSE; + } + + if (!SetupGetStringField(&InfContext, + 1, + szValue, + sizeof(szValue) / sizeof(TCHAR), + &LineLength)) + { + /* the ini file is messed up */ + return FALSE; + } + + pRecord = ReadFreeldrSection(hInf, szName); + if (pRecord) + { + lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM)szValue); + if (lResult != CB_ERR) + { + SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)pRecord); + if (!_tcscmp(szDefaultOs, szName)) + { + /* we store the friendly name as key */ + _tcscpy(szDefaultOs, szValue); + } + + } + else + { + HeapFree(GetProcessHeap(), 0, pRecord); + } + } + + }while(SetupFindNextLine(&InfContext, &InfContext)); + + /* find default os in list */ + lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_FINDSTRING, (WPARAM)-1, (LPARAM)szDefaultOs); + if (lResult != CB_ERR) + { + /* set cur sel */ + SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETCURSEL, (WPARAM)lResult, (LPARAM)0); + } + + SetTimeout(hwndDlg, TimeOut); + return TRUE; +} + +int LoadBootSettings(HINF hInf, HWND hwndDlg) +{ + INFCONTEXT InfContext; + TCHAR szName[MAX_PATH]; + TCHAR szValue[MAX_PATH]; + DWORD LineLength; + DWORD TimeOut = 0; + TCHAR szDefaultOS[MAX_PATH]; + TCHAR szOptions[MAX_PATH]; + PBOOTRECORD pRecord; + LRESULT lResult; + + if(!SetupFindFirstLine(hInf, + _T("boot loader"), + NULL, + &InfContext)) + { + return FALSE; + } + + do + { + if (!SetupGetStringField(&InfContext, + 0, + szName, + sizeof(szName) / sizeof(TCHAR), + &LineLength)) + { + return FALSE; + } + + if (!SetupGetStringField(&InfContext, + 1, + szValue, + sizeof(szValue) / sizeof(TCHAR), + &LineLength)) + { + return FALSE; + } + + if (!_tcsnicmp(szName, _T("timeout"), 7)) + { + TimeOut = _ttoi(szValue); + } + + if (!_tcsnicmp(szName, _T("default"), 7)) + { + _tcscpy(szDefaultOS, szValue); + } + + }while(SetupFindNextLine(&InfContext, &InfContext)); + + if (!SetupFindFirstLine(hInf, + _T("operating systems"), + NULL, + &InfContext)) + { + /* failed to find operating systems section */ + return FALSE; + } + + do + { + if (!SetupGetStringField(&InfContext, + 0, + szName, + sizeof(szName) / sizeof(TCHAR), + &LineLength)) + { + return FALSE; + } + + if (!SetupGetStringField(&InfContext, + 1, + szValue, + sizeof(szValue) / sizeof(TCHAR), + &LineLength)) + { + return FALSE; + } + + SetupGetStringField(&InfContext, + 2, + szOptions, + sizeof(szOptions) / sizeof(TCHAR), + &LineLength); + + pRecord = (PBOOTRECORD) HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(BOOTRECORD)); + if (pRecord) + { + pRecord->BootType = 0; + _tcscpy(pRecord->szBootPath, szName); + _tcscpy(pRecord->szSectionName, szValue); + _tcscpy(pRecord->szOptions, szOptions); + + if (!_tcscmp(szName, szDefaultOS)) + { + /* ms boot ini stores the path not the friendly name */ + _tcscpy(szDefaultOS, szValue); + } + + lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM)szValue); + if (lResult != CB_ERR) + { + SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETITEMDATA, (WPARAM)lResult, (LPARAM)pRecord); + } + else + { + HeapFree(GetProcessHeap(), 0, pRecord); + } + } + + }while(SetupFindNextLine(&InfContext, &InfContext)); + /* find default os in list */ + lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_FINDSTRING, (WPARAM)0, (LPARAM)szDefaultOS); + if (lResult != CB_ERR) + { + /* set cur sel */ + SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETCURSEL, (WPARAM)lResult, (LPARAM)0); + } + + SetTimeout(hwndDlg, TimeOut); + return TRUE; +} + +void DeleteBootRecords(HWND hwndDlg) +{ + LRESULT lIndex; + LONG index; + PBOOTRECORD pRecord; + + + lIndex = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETCOUNT, (WPARAM)0, (LPARAM)0); + if (lIndex == CB_ERR) + return; + + for (index = 0; index <lIndex; index++) + { + pRecord = (PBOOTRECORD) SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETITEMDATA, (WPARAM)index, (LPARAM)0); + if ((INT)pRecord != CB_ERR) + { + HeapFree(GetProcessHeap(), 0, pRecord); + } + } + SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_RESETCONTENT, (WPARAM)0, (LPARAM)0); +} + +LRESULT LoadOSList(HWND hwndDlg) +{ + DWORD dwBufSize; + TCHAR *szSystemDrive; + HINF hInf; + + SetDlgItemText(hwndDlg, IDC_STRRECDUMPFILE, _T("%SystemRoot%\\MiniDump")); + + dwBufSize = GetSystemDrive(&szSystemDrive); + if (!dwBufSize) + return FALSE; + + + _tcscpy(m_szFreeldrIni, szSystemDrive); + _tcscat(m_szFreeldrIni, _T("\\freeldr.ini")); + if (PathFileExists(m_szFreeldrIni)) + { + /* freeldr.ini exists */ + hInf = SetupOpenInfFile(m_szFreeldrIni, + NULL, + INF_STYLE_OLDNT, + NULL); + + if (hInf != INVALID_HANDLE_VALUE) + { + LoadFreeldrSettings(hInf, hwndDlg); + SetupCloseInfFile(hInf); + m_FreeLdrIni = 1; + return TRUE; + } + return FALSE; + } + /* try load boot.ini settings */ + _tcscpy(m_szFreeldrIni, szSystemDrive); + _tcscat(m_szFreeldrIni, _T("\\boot.ini")); + + if (PathFileExists(m_szFreeldrIni)) + { + /* load boot.ini settings */ + hInf = SetupOpenInfFile(m_szFreeldrIni, + NULL, + INF_STYLE_OLDNT, + NULL); + + if (hInf != INVALID_HANDLE_VALUE) + { + LoadBootSettings(hInf, hwndDlg); + SetupCloseInfFile(hInf); + m_FreeLdrIni = 2; + return TRUE; + } + return FALSE; + } + return FALSE; +} + /* Property page dialog callback */ INT_PTR CALLBACK @@ -35,11 +458,10 @@ WPARAM wParam, LPARAM lParam) { - TCHAR *szSystemDrive; - TCHAR szDefaultOS[MAX_PATH]; - TCHAR szDefaultOSName[MAX_PATH]; + PBOOTRECORD pRecord; + int iTimeout; + LRESULT lResult; TCHAR szTimeout[10]; - int iTimeout; UNREFERENCED_PARAMETER(lParam); @@ -47,76 +469,7 @@ { case WM_INITDIALOG: { - DWORD dwBufSize; - - /* get Path to freeldr.ini or boot.ini */ - szSystemDrive = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(TCHAR)); - if (szSystemDrive != NULL) - { - dwBufSize = GetEnvironmentVariable(_T("SystemDrive"), szSystemDrive, MAX_PATH); - if (dwBufSize > MAX_PATH) - { - TCHAR *szTmp; - DWORD dwBufSize2; - - szTmp = HeapReAlloc(GetProcessHeap(), 0, szSystemDrive, dwBufSize * sizeof(TCHAR)); - if (szTmp == NULL) - goto FailGetSysDrive; - - szSystemDrive = szTmp; - - dwBufSize2 = GetEnvironmentVariable(_T("SystemDrive"), szSystemDrive, dwBufSize); - if (dwBufSize2 > dwBufSize || dwBufSize2 == 0) - goto FailGetSysDrive; - } - else if (dwBufSize == 0) - { -FailGetSysDrive: - HeapFree(GetProcessHeap(), 0, szSystemDrive); - szSystemDrive = NULL; - return FALSE; - } - - if (szSystemDrive != NULL) - { - if (m_szFreeldrIni != NULL) - { - _tcscpy(m_szFreeldrIni, szSystemDrive); - _tcscat(m_szFreeldrIni, _T("\\freeldr.ini")); - if (!PathFileExists(m_szFreeldrIni)) - { - _tcscpy(m_szFreeldrIni, szSystemDrive); - _tcscat(m_szFreeldrIni, _T("\\boot.ini")); - _tcscpy(szBootLdrSection, _T("boot loader")); - _tcscpy(szBootLdrDefault, _T("default")); - } - else - { - _tcscpy(szBootLdrSection, _T("FREELOADER")); - _tcscpy(szBootLdrDefault, _T("DefaultOS")); - } - } - HeapFree(GetProcessHeap(), 0, szSystemDrive); - } - } - - if (m_szFreeldrIni == NULL) - return FALSE; - - SetDlgItemText(hwndDlg, IDC_STRRECDUMPFILE, _T("%SystemRoot%\\MiniDump")); - - /* load settings from freeldr.ini */ - GetPrivateProfileString(szBootLdrSection, szBootLdrDefault, NULL, szDefaultOS, MAX_PATH, m_szFreeldrIni); - GetPrivateProfileString(_T("operating systems"), szDefaultOS, NULL, szDefaultOSName, MAX_PATH, m_szFreeldrIni); - SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_ADDSTRING, (WPARAM)0, (LPARAM)szDefaultOSName); - SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_SETCURSEL, (WPARAM)0, (LPARAM)0); - - /* timeout */ - iTimeout = GetPrivateProfileInt(szBootLdrSection, _T("timeout"), 0, m_szFreeldrIni); - SetTimeout(hwndDlg, iTimeout); - if (iTimeout != 0) - SendDlgItemMessage(hwndDlg, IDC_STRECLIST, BM_SETCHECK, (WPARAM)BST_CHECKED, (LPARAM)0); - + return LoadOSList(hwndDlg); } break; @@ -127,6 +480,9 @@ case IDC_STRRECEDIT: { ShellExecute(0, _T("open"), _T("notepad"), m_szFreeldrIni, NULL, SW_SHOWNORMAL); + // FIXME use CreateProcess and wait untill finished + // DeleteBootRecords(hwndDlg); + // LoadOSList(hwndDlg); break; } case IDOK: @@ -137,14 +493,63 @@ else iTimeout = 0; _stprintf(szTimeout, _T("%i"), iTimeout); - WritePrivateProfileString(szBootLdrSection, _T("timeout"), szTimeout, m_szFreeldrIni); - } - case IDCANCEL: - { + + lResult = SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETCURSEL, (WPARAM)0, (LPARAM)0); + if (lResult == CB_ERR) + { + /* ? */ + DeleteBootRecords(hwndDlg); + return TRUE; + } + + + pRecord = (PBOOTRECORD) SendDlgItemMessage(hwndDlg, IDC_STRECOSCOMBO, CB_GETITEMDATA, (WPARAM)lResult, (LPARAM)0); + + + + if ((INT)pRecord != CB_ERR) + { + if (m_FreeLdrIni == 1) // FreeLdrIni style + { + /* set default timeout */ + WritePrivateProfileString(_T("FREELOADER"), + _T("TimeOut"), + szTimeout, + m_szFreeldrIni); + /* set default os */ + WritePrivateProfileString(_T("FREELOADER"), + _T("DefaultOS"), + pRecord->szSectionName, + m_szFreeldrIni); + + } + else if (m_FreeLdrIni == 2) // BootIni style + { + /* set default timeout */ + WritePrivateProfileString(_T("boot loader"), + _T("timeout"), + szTimeout, + m_szFreeldrIni); + /* set default os */ + WritePrivateProfileString(_T("boot loader"), + _T("default"), + pRecord->szBootPath, + m_szFreeldrIni); + + } + } + DeleteBootRecords(hwndDlg); EndDialog(hwndDlg, LOWORD(wParam)); return TRUE; break; + } + case IDCANCEL: + { + DeleteBootRecords(hwndDlg); + EndDialog(hwndDlg, + LOWORD(wParam)); + return TRUE; } case IDC_STRECLIST: { Modified: trunk/reactos/dll/cpl/sysdm/sysdm.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/sysdm/sysdm.rbuild…
============================================================================== --- trunk/reactos/dll/cpl/sysdm/sysdm.rbuild (original) +++ trunk/reactos/dll/cpl/sysdm/sysdm.rbuild Mon Aug 20 23:21:54 2007 @@ -8,6 +8,7 @@ <define name="WINVER">0x501</define> <library>kernel32</library> <library>advapi32</library> + <library>setupapi</library> <library>msvcrt</library> <library>user32</library> <library>gdi32</library>
17 years, 4 months
1
0
0
0
[greatlrd] 28432: Remove some expremnt code, need rehink how I can get current range of video memory pointer
by greatlrd@svn.reactos.org
Author: greatlrd Date: Mon Aug 20 19:17:06 2007 New Revision: 28432 URL:
http://svn.reactos.org/svn/reactos?rev=28432&view=rev
Log: Remove some expremnt code, need rehink how I can get current range of video memory pointer Modified: trunk/reactos/drivers/video/miniport/vbe/vbemp.c Modified: trunk/reactos/drivers/video/miniport/vbe/vbemp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/miniport/vbe…
============================================================================== --- trunk/reactos/drivers/video/miniport/vbe/vbemp.c (original) +++ trunk/reactos/drivers/video/miniport/vbe/vbemp.c Mon Aug 20 19:17:06 2007 @@ -251,9 +251,6 @@ VBEDeviceExtension->VbeInfo.Version & 0xFF, VBEDeviceExtension->VbeInfo.TotalMemory * 64); - - - #ifdef VBE12_SUPPORT if (VBEDeviceExtension->VbeInfo.Version < 0x102) #else @@ -298,16 +295,14 @@ break; } - - /* * Allocate space for video modes information. */ VBEDeviceExtension->ModeInfo = - VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, (ModeCount + 1) * sizeof(VBE_MODEINFO), TAG_VBE); + VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, ModeCount * sizeof(VBE_MODEINFO), TAG_VBE); VBEDeviceExtension->ModeNumbers = - VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, (ModeCount+ 1) * sizeof(USHORT), TAG_VBE); + VideoPortAllocatePool(HwDeviceExtension, VpPagedPool, ModeCount * sizeof(USHORT), TAG_VBE); /* * Get the actual mode infos. @@ -355,72 +350,27 @@ { if (VbeModeInfo->ModeAttributes & VBE_MODEATTR_LINEAR) { - VBEDeviceExtension->ModeNumbers[SuitableModeCount] = ModeTemp | 0x4000; - SuitableModeCount++; + /* Bit 15 14 13 12 | 11 10 9 8 | 7 6 5 4 | 3 2 1 0 */ + // if (ModeTemp & 0x4000) + //{ + VBEDeviceExtension->ModeNumbers[SuitableModeCount] = ModeTemp | 0x4000; + SuitableModeCount++; + //} } #ifdef VBE12_SUPPORT else { - /* FIXME when PCI bus scanner are inplace we need add ModeTemp | 0x4000 - * for we will map the memory our self and do not use bankswitch */ - - if (VBEDeviceExtension->VbeInfo.Version < 0x200) - { - VBEDeviceExtension->ModeNumbers[SuitableModeCount] = ModeTemp; - SuitableModeCount++; - } + VBEDeviceExtension->ModeNumbers[SuitableModeCount] = ModeTemp; + SuitableModeCount++; } #endif } } -#ifdef VBE12_SUPPORT - if (VBEDeviceExtension->VbeInfo.Version < 0x200) - { - /* FIXME add PCI bus scanner to detect the video ram phy address */ - } - else -#endif - if (VBEDeviceExtension->VbeInfo.Version >= 0x200) - { - - /* Call VBE BIOS to read the mode info.for the special mode */ - VideoPortZeroMemory(&BiosRegisters, sizeof(BiosRegisters)); - BiosRegisters.Eax = VBE_GET_MODE_INFORMATION; - BiosRegisters.Ecx = 0x81FF; - BiosRegisters.Edi = VBEDeviceExtension->TrampolineMemoryOffset + 0x200; - BiosRegisters.SegEs = VBEDeviceExtension->TrampolineMemorySegment; - VBEDeviceExtension->Int10Interface.Int10CallBios( - VBEDeviceExtension->Int10Interface.Context, - &BiosRegisters); - - VBEDeviceExtension->ModeNumbers[SuitableModeCount] = 0; - - if (BiosRegisters.Eax == VBE_SUCCESS) - { - /* transfer the special mode data to protected memory */ - VBEDeviceExtension->Int10Interface.Int10ReadMemory( - VBEDeviceExtension->Int10Interface.Context, - VBEDeviceExtension->TrampolineMemorySegment, - VBEDeviceExtension->TrampolineMemoryOffset + 0x200, - VBEDeviceExtension->ModeInfo + SuitableModeCount, - sizeof(VBE_MODEINFO)); - - VBEDeviceExtension->ModeNumbers[SuitableModeCount] = 0x81FF; - /* Do not add special mode to the list */ - //SuitableModeCount++; - - /* to gain full phy memory - * VBEDeviceExtension->ModeNumbers[SuitableModeCount].PhysBasePtr - * VBEDeviceExtension->VbeInfo.TotalMemory * 64 = x Memory on the card in Kbyte - */ - } - } - - if (SuitableModeCount == 0) { + VideoPortDebugPrint(Warn, "VBEMP: No video modes supported\n"); return FALSE; } @@ -446,9 +396,6 @@ VBEDeviceExtension->ModeInfo[CurrentMode].YResolution, VBEDeviceExtension->ModeInfo[CurrentMode].BitsPerPixel); } - - - /* * Enumerate our children. @@ -873,14 +820,11 @@ #ifdef VBE12_SUPPORT else { - // when pci bus scanner are in place we remove this one FrameBuffer.QuadPart = 0xA0000; MapInformation->VideoRamBase = RequestedAddress->RequestedVirtualAddress; MapInformation->VideoRamLength = 0x10000; } -#endif - - +#endif VideoPortMapMemory(DeviceExtension, FrameBuffer, &MapInformation->VideoRamLength, &inIoSpace,
17 years, 4 months
1
0
0
0
[hpoussin] 28431: Fix typo
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Aug 20 16:06:12 2007 New Revision: 28431 URL:
http://svn.reactos.org/svn/reactos?rev=28431&view=rev
Log: Fix typo Modified: trunk/reactos/boot/bootdata/packages/reactos.dff Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff Mon Aug 20 16:06:12 2007 @@ -242,7 +242,7 @@ dll\win32\winmm\winmm.dll 1 dll\win32\winmm\wavemap\msacm32.drv 1 optional dll\win32\winspool\winspool.drv 1 -dll\win32\winspool\winsta.dll 1 +dll\win32\winsta\winsta.dll 1 dll\win32\wintrust\wintrust.dll 1 dll\win32\wldap32\wldap32.dll 1 dll\win32\ws2_32\ws2_32.dll 1
17 years, 4 months
1
0
0
0
[hpoussin] 28430: Add rbuild file for winsta.dll, and add it to bootcd See issue #2574 for more details.
by hpoussin@svn.reactos.org
Author: hpoussin Date: Mon Aug 20 13:34:18 2007 New Revision: 28430 URL:
http://svn.reactos.org/svn/reactos?rev=28430&view=rev
Log: Add rbuild file for winsta.dll, and add it to bootcd See issue #2574 for more details. Added: trunk/reactos/dll/win32/winsta/winsta.rbuild (with props) Modified: trunk/reactos/baseaddress.rbuild trunk/reactos/boot/bootdata/packages/reactos.dff trunk/reactos/dll/win32/win32.rbuild Modified: trunk/reactos/baseaddress.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/baseaddress.rbuild?rev=284…
============================================================================== --- trunk/reactos/baseaddress.rbuild (original) +++ trunk/reactos/baseaddress.rbuild Mon Aug 20 13:34:18 2007 @@ -53,6 +53,7 @@ <property name="BASEADDRESS_SMDLL" value="0x6b3b0000" /> <property name="BASEADDRESS_URLMON" value="0x6b3c0000" /> <property name="BASEADDRESS_SERIALUI" value="0x6b3D0000" /> + <property name="BASEADDRESS_WINSTA" value="0x6b3D0000" /> <property name="BASEADDRESS_WLDAP32" value="0x6e130000" /> <property name="BASEADDRESS_CLB" value="0x6f2b0000" /> <property name="BASEADDRESS_CARDS" value="0x701a0000" /> Modified: trunk/reactos/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/packages/rea…
============================================================================== --- trunk/reactos/boot/bootdata/packages/reactos.dff (original) +++ trunk/reactos/boot/bootdata/packages/reactos.dff Mon Aug 20 13:34:18 2007 @@ -242,6 +242,7 @@ dll\win32\winmm\winmm.dll 1 dll\win32\winmm\wavemap\msacm32.drv 1 optional dll\win32\winspool\winspool.drv 1 +dll\win32\winspool\winsta.dll 1 dll\win32\wintrust\wintrust.dll 1 dll\win32\wldap32\wldap32.dll 1 dll\win32\ws2_32\ws2_32.dll 1 Modified: trunk/reactos/dll/win32/win32.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/win32.rbuild?rev…
============================================================================== --- trunk/reactos/dll/win32/win32.rbuild (original) +++ trunk/reactos/dll/win32/win32.rbuild Mon Aug 20 13:34:18 2007 @@ -289,6 +289,9 @@ <directory name="winspool"> <xi:include href="winspool/winspool.rbuild" /> </directory> +<directory name="winsta"> + <xi:include href="winsta/winsta.rbuild" /> +</directory> <directory name="wintrust"> <xi:include href="wintrust/wintrust.rbuild" /> </directory> Added: trunk/reactos/dll/win32/winsta/winsta.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/winsta/winsta.rb…
============================================================================== --- trunk/reactos/dll/win32/winsta/winsta.rbuild (added) +++ trunk/reactos/dll/win32/winsta/winsta.rbuild Mon Aug 20 13:34:18 2007 @@ -1,0 +1,14 @@ +<module name="winsta" type="win32dll" baseaddress="${BASEADDRESS_WINSTA}" installbase="system32" installname="winsta.dll"> + <importlibrary definition="winsta.def" /> + <include base="winsta">include</include> + <define name="_DISABLE_TIDENTS" /> + <define name="__USE_W32API" /> + <define name="_WIN32_WINNT">0x0500</define> + <library>ntdll</library> + <pch>winsta.h</pch> + <file>main.c</file> + <file>misc.c</file> + <file>server.c</file> + <file>ws.c</file> + <file>winsta.rc</file> +</module> Propchange: trunk/reactos/dll/win32/winsta/winsta.rbuild ------------------------------------------------------------------------------ svn:eol-style = native
17 years, 4 months
1
0
0
0
[janderwald] 28429: - update available software items in configuration file by Pierre Schweitzer (heis_spiter at hotmail com) See issue #2566 for more details.
by janderwald@svn.reactos.org
Author: janderwald Date: Mon Aug 20 13:19:07 2007 New Revision: 28429 URL:
http://svn.reactos.org/svn/reactos?rev=28429&view=rev
Log: - update available software items in configuration file by Pierre Schweitzer (heis_spiter at hotmail com) See issue #2566 for more details. Modified: trunk/rosapps/downloader/downloader.xml Modified: trunk/rosapps/downloader/downloader.xml URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/downloader/downloader.xml?…
============================================================================== --- trunk/rosapps/downloader/downloader.xml (original) +++ trunk/rosapps/downloader/downloader.xml Mon Aug 20 13:19:07 2007 @@ -8,11 +8,11 @@ <location>
http://ftp-mozilla.netscape.com/pub/mozilla.org/firefox/releases/1.5.0.9/wi…
</location> </application> <application name="Firefox 2.0"> - <regname>Mozilla Firefox (2.0.0.1)</regname> + <regname>Mozilla Firefox (2.0.0.6)</regname> <licence>MPL/GPL/LGPL</licence> - <version>2.0.0.1</version> + <version>2.0.0.6</version> <description>The most popular and one of the best free Web Browsers out there.</description> - <location>
http://ftp-mozilla.netscape.com/pub/mozilla.org/firefox/releases/latest/win…
</location> + <location>
http://ftp-mozilla.netscape.com/pub/mozilla.org/firefox/releases/latest/win…
</location> </application> <application name="Thunderbird"> <regname>Mozilla Thunderbird (1.5)</regname> @@ -21,11 +21,18 @@ <description>The most popular and one of the best free Mail Clients out there.</description> <location>
http://ftp-mozilla.netscape.com/pub/mozilla.org/thunderbird/releases/latest…
</location> </application> + <application name="Thunderbird 2.0"> + <regname>Mozilla Thunderbird (2.0.0.6)</regname> + <licence>MPL/GPL/LGPL</licence> + <version>2.0.0.6</version> + <description>The most popular and one of the best free Mail Clients out there.</description> + <location>
http://ftp-mozilla.netscape.com/pub/mozilla.org/thunderbird/releases/latest…
</location> + </application> <application name="SeaMonkey"> - <regname>SeaMonkey (1.0.7)</regname> - <version>1.0.7</version> + <regname>SeaMonkey (1.1.4)</regname> + <version>1.1.4</version> <description>Mozilla Suite is alive. This is the one and only Browser, Mail, Chat, and Composer bundle you will ever need.</description> - <location>
http://ftp-mozilla.netscape.com/pub/mozilla.org/seamonkey/releases/1.0.7/se…
</location> + <location>
http://ftp-mozilla.netscape.com/pub/mozilla.org/seamonkey/releases/1.1.4/se…
</location> </application> <application name="Mozilla ActiveX Control"> <regname>Mozilla ActiveX Control v1.7.12 (ReactOS special)</regname> @@ -44,59 +51,59 @@ </application> <application name="Miranda IM"> <regname>Miranda IM</regname> - <version>0.5.1</version> + <version>0.6.8</version> <description>Open source multiprotocol instant messaging application - May not work completely.</description> - <location>
http://ovh.dl.sourceforge.net/sourceforge/miranda/miranda-im-v0.5.1-unicode…
</location> + <location>
http://ovh.dl.sourceforge.net/sourceforge/miranda/miranda-im-v0.6.8-unicode…
</location> </application> <application name="Putty"> - <regname>PuTTY version 0.59</regname> + <regname>PuTTY version 0.60</regname> <licence>MIT</licence> - <version>0.59</version> + <version>0.60</version> <description>A free SSH, Telnet, rlogin, and raw TCP client.</description> - <location>
http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.59-installer.exe
</location> + <location>
http://the.earth.li/~sgtatham/putty/latest/x86/putty-0.60-installer.exe
</location> </application> </category> <category name="Office" icon="2"> <application name="Abiword"> - <regname>"AbiWord 2.4.1 (remove only)"</regname> - <version>2.4.1</version> + <regname>"AbiWord 2.4.6 (remove only)"</regname> + <version>2.4.6</version> <description>Word processor.</description> - <location>
http://www.abiword.org/downloads/abiword/2.4.1/Windows/abiword-setup-2.4.1.…
</location> + <location>
http://www.abiword.org/downloads/abiword/2.4.6/Windows/abiword-setup-2.4.6.…
</location> </application> <application name="OpenOffice"> - <regname>
OpenOffice.org
2.1</regname> - <version>2.1.0</version> + <regname>
OpenOffice.org
2.2</regname> + <version>2.2.1</version> <description>THE Open Source Office Suite.</description> - <location>
http://ftp.tu-chemnitz.de/pub/openoffice-extended//stable/2.1.0/OOo_2.1.0_W…
</location> + <location>
http://ftp.tu-chemnitz.de/pub/openoffice-extended/stable/2.2.1/OOo_2.2.1_Wi…
</location> </application> </category> <category name="Graphics" icon="3"> <application name="IrfanView"> <regname>IrfanView (remove only)</regname> - <version>3.99</version> + <version>4.00</version> <description>Viewer for all kinds of graphics/audio files/video files.</description> - <location>
http://gd.tuwien.ac.at/graphics/irfanview/iview399.exe
</location> + <location>
http://gd.tuwien.ac.at/graphics/irfanview/iview400_setup.exe
</location> </application> <application name="IrfanView Plugins"> - <version>3.99</version> + <version>4.00</version> <description>Additional Plugins for supporting more file types.</description> - <location>
http://irfanview.tuwien.ac.at/plugins/irfanview_plugins_399.exe
</location> + <location>
http://irfanview.tuwien.ac.at/plugins/irfanview_plugins_400_setup.exe
</location> </application> <application name="TuxPaint"> - <regname>Tux Paint 0.9.16</regname> - <version>0.9.16</version> + <regname>Tux Paint 0.9.17</regname> + <version>0.9.17</version> <description>An Open Source bitmap graphics editor geared towards young children.</description> - <location>
http://ovh.dl.sourceforge.net/sourceforge/tuxpaint/tuxpaint-0.9.16-win32-in…
</location> + <location>
http://ovh.dl.sourceforge.net/sourceforge/tuxpaint/tuxpaint-0.9.17-win32-in…
</location> </application> </category> <category name="Multimedia" icon="4"> </category> <category name="Development" icon="5"> <application name="ReactOS Build Environment"> - <regname>ReactOS Build Environment 0.3.4</regname> - <version>0.3.4</version> + <regname>ReactOS Build Environment 0.3.7</regname> + <version>0.3.7</version> <description>Allows you to build the ReactOS Source. For more instructions see ReactOS wiki.</description> - <location>
http://ovh.dl.sourceforge.net/sourceforge/reactos/RosBE-0.3.4.exe
</location> + <location>
http://ovh.dl.sourceforge.net/sourceforge/reactos/RosBE-0.3.7.exe
</location> </application> <application name="MinGW"> <regname>MinGW 5.1.3</regname> @@ -105,30 +112,30 @@ <location>
http://puzzle.dl.sourceforge.net/sourceforge/mingw/MinGW-5.1.3.exe
</location> </application> <application name="FreeBASIC"> - <regname>FreeBASIC 0.16b</regname> - <version>0.16b</version> + <regname>FreeBASIC 0.17b</regname> + <version>0.17b</version> <description>Open Source BASIC Compiler. The BASIC syntax is compatible to QBASIC.</description> <location>
http://switch.dl.sourceforge.net/sourceforge/fbc/FreeBASIC-v0.17b-win32.exe
</location> </application> </category> <category name="Games & Fun" icon="6"> <application name="ScummVM"> - <regname>ScummVM 0.9.1</regname> - <version>0.9.1</version> + <regname>ScummVM 0.10.0</regname> + <version>0.10.0</version> <description>SamNMax, Day of Tentacle, etc on ReactOS</description> - <location>
http://ovh.dl.sourceforge.net/sourceforge/scummvm/scummvm-0.9.1-win32.exe
</location> + <location>
http://ovh.dl.sourceforge.net/sourceforge/scummvm/scummvm-0.10.0-win32.exe
</location> </application> <application name="Tile World"> <description>Nice Clone of Chip's Challenge originally made for the Atari Lynx. Includes free CCLP2 Graphics Pack, so you dont need the copyrighted Original.</description> <location>
http://www.muppetlabs.com/~breadbox/pub/software/tworld/tworld-1.3.0-win32-…
</location> </application> <application name="OpenTTD"> - <regname>OpenTTD 0.5.0</regname> - <version>0.5.0-RC5</version> + <regname>OpenTTD 0.5.3</regname> + <version>0.5.3-RC2</version> <description>Open Source clone of the "Transport Tycoon Deluxe" game engine. You need a copy of Transport Tycoon.</description> - <location>
http://ovh.dl.sourceforge.net/sourceforge/openttd/openttd-0.5.0-RC5-win32.e…
</location> + <location>
http://ovh.dl.sourceforge.net/sourceforge/openttd/openttd-0.5.3-RC2-win32.e…
</location> </application> - <application name="LBreakout2">LBreakout2 2.4.1 + <application name="LBreakout2"> <regname>LBreakout2 2.4.1</regname> <version>2.4.1</version> <description>Breakout Clone using SDL libs.</description> @@ -156,12 +163,12 @@ </application> <application name="uTorrent"> <regname>µTorrent</regname> - <version>1.6</version> + <version>1.7.2</version> <description>Small and fast BitTorrent Client.</description> - <location>
http://download.utorrent.com/1.6/uTorrent-1.6-install.exe
</location> + <location>
http://download.utorrent.com/1.7.2/utorrent.exe
</location> </application> <application name="Audio Grabber"> - <regname>Audiograbber 1.83 SE </regname> + <regname>Audiograbber 1.83 SE</regname> <version>1.83 SE</version> <description>A very good CD Ripper/Audio File Converter.</description> <location>
http://www.audiograbber.de/files/342677432/agsetup183se.exe
</location> @@ -169,14 +176,14 @@ </category> <category name="Others" icon="8"> <application name="Simple Direct Media Layer (SDL) Runtime"> - <version>1.2.11</version> + <version>1.2.12</version> <description>Needed for many Open Source Games to run. You need 7-Zip or a similar Utility to extract it.</description> - <location>
http://ovh.dl.sourceforge.net/sourceforge/libsdl/SDL-1.2.11-win32.zip
</location> + <location>
http://www.libsdl.org/release/SDL-1.2.12-win32.zip
</location> </application> <application name="DOSBox"> - <version>0.65</version> + <version>0.71</version> <description>DOSBox is a DOS emulator.</description> - <location>
http://puzzle.dl.sourceforge.net/sourceforge/dosbox/DOSBox0.65-win32-instal…
</location> + <location>
http://puzzle.dl.sourceforge.net/sourceforge/dosbox/DOSBox0.71-win32-instal…
</location> </application> </category> </tree>
17 years, 4 months
1
0
0
0
[tkreuzer] 28428: - rename NtGdiSelectPalette to NtUserSelectPalette, move it to ntuser/windc.c and implement stub function SelectPalette in gdi32.dll calling it (Don't ask me why it is named this way, but it is on windows) - rename NtGdiSetDIBitsToDevice to NtGdiSetDIBitsToDeviceInternal and implement stub function in gdi32.dll - update ntgdibad.h
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Mon Aug 20 03:49:47 2007 New Revision: 28428 URL:
http://svn.reactos.org/svn/reactos?rev=28428&view=rev
Log: - rename NtGdiSelectPalette to NtUserSelectPalette, move it to ntuser/windc.c and implement stub function SelectPalette in gdi32.dll calling it (Don't ask me why it is named this way, but it is on windows) - rename NtGdiSetDIBitsToDevice to NtGdiSetDIBitsToDeviceInternal and implement stub function in gdi32.dll - update ntgdibad.h Modified: trunk/reactos/dll/win32/gdi32/gdi32.def trunk/reactos/dll/win32/gdi32/objects/bitmap.c trunk/reactos/dll/win32/gdi32/objects/dc.c trunk/reactos/include/reactos/win32k/ntgdibad.h trunk/reactos/subsystems/win32/win32k/ntuser/windc.c trunk/reactos/subsystems/win32/win32k/objects/color.c trunk/reactos/subsystems/win32/win32k/objects/dc.c trunk/reactos/subsystems/win32/win32k/objects/dibobj.c trunk/reactos/subsystems/win32/win32k/w32ksvc.db Modified: trunk/reactos/dll/win32/gdi32/gdi32.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/gdi32.def?…
============================================================================== --- trunk/reactos/dll/win32/gdi32/gdi32.def (original) +++ trunk/reactos/dll/win32/gdi32/gdi32.def Mon Aug 20 03:49:47 2007 @@ -527,7 +527,7 @@ SelectClipRgn@8 SelectFontLocal@8 SelectObject@8=NtGdiSelectObject@8 -SelectPalette@12=NtGdiSelectPalette@12 +SelectPalette@12 SetAbortProc@8 SetArcDirection@8 SetBitmapAttributes@8 @@ -544,7 +544,7 @@ SetDCPenColor@8 SetDIBColorTable@16=NtGdiSetDIBColorTable@16 SetDIBits@28=NtGdiSetDIBits@28 -SetDIBitsToDevice@48=NtGdiSetDIBitsToDevice@48 +SetDIBitsToDevice@48 SetDeviceGammaRamp@8 SetEnhMetaFileBits@8 SetFontEnumeration@4 Modified: trunk/reactos/dll/win32/gdi32/objects/bitmap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/bi…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/bitmap.c (original) +++ trunk/reactos/dll/win32/gdi32/objects/bitmap.c Mon Aug 20 03:49:47 2007 @@ -110,3 +110,37 @@ { return NtGdiCreateCompatibleBitmap(hDC, Width, Height); } + + +INT WINAPI +SetDIBitsToDevice( + HDC hDC, + int XDest, + int YDest, + DWORD Width, + DWORD Height, + int XSrc, + int YSrc, + UINT StartScan, + UINT ScanLines, + CONST VOID *Bits, + CONST BITMAPINFO *lpbmi, + UINT ColorUse) +{ + return NtGdiSetDIBitsToDeviceInternal(hDC, + XDest, + YDest, + Width, + Height, + XSrc, + YSrc, + StartScan, + ScanLines, + (LPBYTE)Bits, + (LPBITMAPINFO)lpbmi, + ColorUse, + lpbmi->bmiHeader.biSizeImage, + lpbmi->bmiHeader.biSize, + FALSE, + NULL); +} Modified: trunk/reactos/dll/win32/gdi32/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/objects/dc…
============================================================================== --- trunk/reactos/dll/win32/gdi32/objects/dc.c (original) +++ trunk/reactos/dll/win32/gdi32/objects/dc.c Mon Aug 20 03:49:47 2007 @@ -918,3 +918,17 @@ return NtGdiGetDCPoint( hdc, GdiGetWindowOrg, lpPoint ); } +/* FIXME: include correct header */ +HPALETTE STDCALL NtUserSelectPalette(HDC hDC, + HPALETTE hpal, + BOOL ForceBackground); + +HPALETTE +STDCALL +SelectPalette( + HDC hDC, + HPALETTE hPal, + BOOL bForceBackground) +{ + return NtUserSelectPalette(hDC, hPal, bForceBackground); +} Modified: trunk/reactos/include/reactos/win32k/ntgdibad.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntg…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntgdibad.h (original) +++ trunk/reactos/include/reactos/win32k/ntgdibad.h Mon Aug 20 03:49:47 2007 @@ -78,11 +78,6 @@ LPCWSTR CurrentPath ); -/* The gdi32 call Should Use NtGdiGetRandomRgn and nothing else */ -HRGN -NTAPI -NtGdiGetClipRgn(HDC hDC); - /* The gdi32 call Should Use NtGdiGetTextExtent */ BOOL NTAPI @@ -604,15 +599,6 @@ /* Should be done in user-mode. */ HGDIOBJ STDCALL NtGdiSelectObject(HDC hDC, HGDIOBJ hGDIObj); -/* Use NtUserSelectPalette. */ -HPALETTE -STDCALL -NtGdiSelectPalette ( - HDC hDC, - HPALETTE hpal, - BOOL ForceBackground - ); - /* Needs to be done in user-mode, using shared GDI Object Attributes. */ COLORREF STDCALL NtGdiSetBkColor (HDC hDC, COLORREF Color); @@ -635,24 +621,6 @@ NtGdiSetDIBits ( HDC hDC, HBITMAP hBitmap, - UINT StartScan, - UINT ScanLines, - CONST VOID * Bits, - CONST BITMAPINFO * bmi, - UINT ColorUse - ); - -/* Use NtGdiSetDIBitsToDeviceInternal. */ -INT -STDCALL -NtGdiSetDIBitsToDevice ( - HDC hDC, - INT XDest, - INT YDest, - DWORD Width, - DWORD Height, - INT XSrc, - INT YSrc, UINT StartScan, UINT ScanLines, CONST VOID * Bits, Modified: trunk/reactos/subsystems/win32/win32k/ntuser/windc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/windc.c (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/windc.c Mon Aug 20 03:49:47 2007 @@ -1006,5 +1006,62 @@ return Ret; } +/*! + * Select logical palette into device context. + * \param hDC handle to the device context + * \param hpal handle to the palette + * \param ForceBackground If this value is FALSE the logical palette will be copied to the device palette only when the applicatioon + * is in the foreground. If this value is TRUE then map the colors in the logical palette to the device + * palette colors in the best way. + * \return old palette + * + * \todo implement ForceBackground == TRUE +*/ +HPALETTE STDCALL NtUserSelectPalette(HDC hDC, + HPALETTE hpal, + BOOL ForceBackground) +{ + PDC dc; + HPALETTE oldPal = NULL; + PPALGDI PalGDI; + + // FIXME: mark the palette as a [fore\back]ground pal + dc = DC_LockDc(hDC); + if (NULL != dc) + { + /* Check if this is a valid palette handle */ + PalGDI = PALETTE_LockPalette(hpal); + if (NULL != PalGDI) + { + /* Is this a valid palette for this depth? */ + if ((dc->w.bitsPerPixel <= 8 && PAL_INDEXED == PalGDI->Mode) + || (8 < dc->w.bitsPerPixel && PAL_INDEXED != PalGDI->Mode)) + { + PALETTE_UnlockPalette(PalGDI); + oldPal = dc->w.hPalette; + dc->w.hPalette = hpal; + } + else if (8 < dc->w.bitsPerPixel && PAL_INDEXED == PalGDI->Mode) + { + PALETTE_UnlockPalette(PalGDI); + oldPal = dc->PalIndexed; + dc->PalIndexed = hpal; + } + else + { + PALETTE_UnlockPalette(PalGDI); + oldPal = NULL; + } + } + else + { + oldPal = NULL; + } + DC_UnlockDc(dc); + } + + return oldPal; +} + /* EOF */ Modified: trunk/reactos/subsystems/win32/win32k/objects/color.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/color.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/color.c Mon Aug 20 03:49:47 2007 @@ -617,63 +617,6 @@ return FALSE; } -/*! - * Select logical palette into device context. - * \param hDC handle to the device context - * \param hpal handle to the palette - * \param ForceBackground If this value is FALSE the logical palette will be copied to the device palette only when the applicatioon - * is in the foreground. If this value is TRUE then map the colors in the logical palette to the device - * palette colors in the best way. - * \return old palette - * - * \todo implement ForceBackground == TRUE -*/ -HPALETTE STDCALL NtGdiSelectPalette(HDC hDC, - HPALETTE hpal, - BOOL ForceBackground) -{ - PDC dc; - HPALETTE oldPal = NULL; - PPALGDI PalGDI; - - // FIXME: mark the palette as a [fore\back]ground pal - dc = DC_LockDc(hDC); - if (NULL != dc) - { - /* Check if this is a valid palette handle */ - PalGDI = PALETTE_LockPalette(hpal); - if (NULL != PalGDI) - { - /* Is this a valid palette for this depth? */ - if ((dc->w.bitsPerPixel <= 8 && PAL_INDEXED == PalGDI->Mode) - || (8 < dc->w.bitsPerPixel && PAL_INDEXED != PalGDI->Mode)) - { - PALETTE_UnlockPalette(PalGDI); - oldPal = dc->w.hPalette; - dc->w.hPalette = hpal; - } - else if (8 < dc->w.bitsPerPixel && PAL_INDEXED == PalGDI->Mode) - { - PALETTE_UnlockPalette(PalGDI); - oldPal = dc->PalIndexed; - dc->PalIndexed = hpal; - } - else - { - PALETTE_UnlockPalette(PalGDI); - oldPal = NULL; - } - } - else - { - oldPal = NULL; - } - DC_UnlockDc(dc); - } - - return oldPal; -} - BOOL STDCALL NtGdiSetColorAdjustment(HDC hDC, CONST LPCOLORADJUSTMENT ca) { Modified: trunk/reactos/subsystems/win32/win32k/objects/dc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dc.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dc.c Mon Aug 20 03:49:47 2007 @@ -1461,7 +1461,7 @@ NtGdiSetBkColor( hDC, dcs->Dc_Attr.crBackgroundClr); NtGdiSetTextColor( hDC, dcs->Dc_Attr.crForegroundClr); - NtGdiSelectPalette( hDC, dcs->w.hPalette, FALSE ); + NtUserSelectPalette( hDC, dcs->w.hPalette, FALSE ); #if 0 GDISelectPalette16( hDC, dcs->w.hPalette, FALSE ); Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c Mon Aug 20 03:49:47 2007 @@ -324,20 +324,27 @@ return Ret; } -INT STDCALL -NtGdiSetDIBitsToDevice( - HDC hDC, - INT XDest, - INT YDest, - DWORD Width, - DWORD Height, - INT XSrc, - INT YSrc, - UINT StartScan, - UINT ScanLines, - CONST VOID *Bits, - CONST BITMAPINFO *bmi, - UINT ColorUse) +W32KAPI +INT +APIENTRY +NtGdiSetDIBitsToDeviceInternal( + IN HDC hDC, + IN INT XDest, + IN INT YDest, + IN DWORD Width, + IN DWORD Height, + IN INT XSrc, + IN INT YSrc, + IN DWORD StartScan, + IN DWORD ScanLines, + IN LPBYTE Bits, + IN LPBITMAPINFO bmi, + IN DWORD ColorUse, + IN UINT cjMaxBits, + IN UINT cjMaxInfo, + IN BOOL bTransformCoordinates, + IN OPTIONAL HANDLE hcmXform +) { UNIMPLEMENTED; return 0; @@ -591,7 +598,7 @@ if(Usage == DIB_PAL_COLORS) { hPal = NtGdiGetCurrentObject(hDC, OBJ_PAL); - hPal = NtGdiSelectPalette(hdcMem, hPal, FALSE); + hPal = NtUserSelectPalette(hdcMem, hPal, FALSE); } if (BitsInfo->bmiHeader.biCompression == BI_RLE4 || @@ -622,7 +629,7 @@ SrcWidth, SrcHeight, ROP, 0); if(hPal) - NtGdiSelectPalette(hdcMem, hPal, FALSE); + NtUserSelectPalette(hdcMem, hPal, FALSE); NtGdiSelectObject(hdcMem, hOldBitmap); NtGdiDeleteObjectApp(hdcMem); Modified: trunk/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/w3…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/w32ksvc.db (original) +++ trunk/reactos/subsystems/win32/win32k/w32ksvc.db Mon Aug 20 03:49:47 2007 @@ -277,7 +277,7 @@ NtGdiSetColorAdjustment 2 NtGdiSetColorSpace 2 NtGdiSetDeviceGammaRamp 2 -# NtGdiSetDIBitsToDeviceInternal 16 +NtGdiSetDIBitsToDeviceInternal 16 # NtGdiSetFontEnumeration 1 # NtGdiSetFontXform 3 NtGdiSetIcmMode 3 @@ -507,7 +507,7 @@ NtUserSBGetParms 4 NtUserScrollDC 7 NtUserScrollWindowEx 8 -# NtUserSelectPalette 3 +NtUserSelectPalette 3 NtUserSendInput 3 NtUserSetActiveWindow 1 # NtUserSetAppImeLevel 2 @@ -692,12 +692,10 @@ # #ReactOS specify syscall NtGdiSelectObject 2 -NtGdiSelectPalette 3 NtGdiSetBkColor 2 NtGdiSetBkMode 2 NtGdiSetDIBColorTable 4 NtGdiSetDIBits 7 -NtGdiSetDIBitsToDevice 12 NtGdiSetEnhMetaFileBits 2 NtGdiSetGraphicsMode 2 NtGdiSetICMProfile 2
17 years, 4 months
1
0
0
0
← Newer
1
...
27
28
29
30
31
32
33
...
67
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
Results per page:
10
25
50
100
200