ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2007
----- 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
22 participants
605 discussions
Start a n
N
ew thread
[dchapyshev] 31048: - Move all hardcode strings to resource
by dchapyshev@svn.reactos.org
Author: dchapyshev Date: Thu Dec 6 22:49:12 2007 New Revision: 31048 URL:
http://svn.reactos.org/svn/reactos?rev=31048&view=rev
Log: - Move all hardcode strings to resource Modified: trunk/reactos/base/applications/control/control.c trunk/reactos/base/applications/control/lang/bg-BG.rc trunk/reactos/base/applications/control/lang/ca-ES.rc trunk/reactos/base/applications/control/lang/cs-CZ.rc trunk/reactos/base/applications/control/lang/da-DK.rc trunk/reactos/base/applications/control/lang/de-DE.rc trunk/reactos/base/applications/control/lang/el-GR.rc trunk/reactos/base/applications/control/lang/en-US.rc trunk/reactos/base/applications/control/lang/es-ES.rc trunk/reactos/base/applications/control/lang/fi-FI.rc trunk/reactos/base/applications/control/lang/fr-FR.rc trunk/reactos/base/applications/control/lang/hu-HU.rc trunk/reactos/base/applications/control/lang/id-ID.rc trunk/reactos/base/applications/control/lang/it-IT.rc trunk/reactos/base/applications/control/lang/ja-JP.rc trunk/reactos/base/applications/control/lang/lt-LT.rc trunk/reactos/base/applications/control/lang/nb-NO.rc trunk/reactos/base/applications/control/lang/nl-NL.rc trunk/reactos/base/applications/control/lang/pl-PL.rc trunk/reactos/base/applications/control/lang/pt-BR.rc trunk/reactos/base/applications/control/lang/ru-RU.rc trunk/reactos/base/applications/control/lang/sk-SK.rc trunk/reactos/base/applications/control/lang/sv-SE.rc trunk/reactos/base/applications/control/lang/th-TH.rc trunk/reactos/base/applications/control/lang/uk-UA.rc trunk/reactos/base/applications/control/lang/zh-CN.rc trunk/reactos/base/applications/control/resource.h Modified: trunk/reactos/base/applications/control/control.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/control.c (original) +++ trunk/reactos/base/applications/control/control.c Thu Dec 6 22:49:12 2007 @@ -181,6 +181,8 @@ LRESULT CALLBACK MyWindowProc(HWND hWnd,UINT uMsg,WPARAM wParam,LPARAM lParam) { + TCHAR szBuf[1024]; + switch (uMsg) { case WM_CREATE: @@ -197,11 +199,13 @@ column.fmt = LVCFMT_LEFT; column.cx = (rect.right - rect.left) / 3; column.iSubItem = 0; - column.pszText = _T("Name"); + LoadString(hInst, IDS_NAME, szBuf, sizeof(szBuf) / sizeof(TCHAR)); + column.pszText = szBuf; (void)ListView_InsertColumn(hListView,0,&column); column.cx = (rect.right - rect.left) - ((rect.right - rect.left) / 3) - 1; column.iSubItem = 1; - column.pszText = _T("Comment"); + LoadString(hInst, IDS_COMMENT, szBuf, sizeof(szBuf) / sizeof(TCHAR)); + column.pszText = szBuf; (void)ListView_InsertColumn(hListView,1,&column); PopulateCPLList(hListView); (void)ListView_SetColumnWidth(hListView,2,LVSCW_AUTOSIZE_USEHEADER); @@ -242,7 +246,8 @@ if (nSelect==-1) { /* no items */ - MessageBox(hWnd,_T("No Items in ListView"),_T("Error"),MB_OK|MB_ICONINFORMATION); + LoadString(hInst, IDS_NO_ITEMS, szBuf, sizeof(szBuf) / sizeof(TCHAR)); + MessageBox(hWnd,(LPCTSTR)szBuf,NULL,MB_OK|MB_ICONINFORMATION); break; } @@ -284,7 +289,14 @@ DestroyWindow(hWnd); break; case IDM_ABOUT: - MessageBox(hWnd,_T("Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL"),_T("About the Control Panel"),MB_OK | MB_ICONINFORMATION); + { + TCHAR Title[256]; + + LoadString(hInst, IDS_ABOUT, szBuf, sizeof(szBuf) / sizeof(TCHAR)); + LoadString(hInst, IDS_ABOUT_TITLE, Title, sizeof(Title) / sizeof(TCHAR)); + + MessageBox(hWnd,(LPCTSTR)szBuf,(LPCTSTR)Title,MB_OK | MB_ICONINFORMATION); + } break; } break; @@ -302,6 +314,7 @@ { MSG msg; WNDCLASS wc; + TCHAR szBuf[256]; memset(&wc,0x00,sizeof(wc)); wc.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_MAINICON)); @@ -311,10 +324,11 @@ RegisterClass(&wc); InitCommonControls(); - + + LoadString(hInst, IDS_WINDOW_TITLE, szBuf, sizeof(szBuf) / sizeof(TCHAR)); hMainWnd = CreateWindowEx(WS_EX_CLIENTEDGE, MYWNDCLASS, - _T("Control Panel"), + (LPCTSTR)szBuf, WS_OVERLAPPEDWINDOW, CW_USEDEFAULT, CW_USEDEFAULT, Modified: trunk/reactos/base/applications/control/lang/bg-BG.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/bg-BG.rc (original) +++ trunk/reactos/base/applications/control/lang/bg-BG.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/ca-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/ca-ES.rc (original) +++ trunk/reactos/base/applications/control/lang/ca-ES.rc Thu Dec 6 22:49:12 2007 @@ -25,3 +25,13 @@ MENUITEM "En quant a", IDM_ABOUT END END + +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/cs-CZ.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/cs-CZ.rc (original) +++ trunk/reactos/base/applications/control/lang/cs-CZ.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/da-DK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/da-DK.rc (original) +++ trunk/reactos/base/applications/control/lang/da-DK.rc Thu Dec 6 22:49:12 2007 @@ -24,3 +24,13 @@ MENUITEM "Om", IDM_ABOUT END END + +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/de-DE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/de-DE.rc (original) +++ trunk/reactos/base/applications/control/lang/de-DE.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/el-GR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/el-GR.rc (original) +++ trunk/reactos/base/applications/control/lang/el-GR.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/en-US.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/en-US.rc (original) +++ trunk/reactos/base/applications/control/lang/en-US.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/es-ES.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/es-ES.rc (original) +++ trunk/reactos/base/applications/control/lang/es-ES.rc Thu Dec 6 22:49:12 2007 @@ -30,3 +30,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/fi-FI.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/fi-FI.rc (original) +++ trunk/reactos/base/applications/control/lang/fi-FI.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/fr-FR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/fr-FR.rc (original) +++ trunk/reactos/base/applications/control/lang/fr-FR.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/hu-HU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/hu-HU.rc (original) +++ trunk/reactos/base/applications/control/lang/hu-HU.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/id-ID.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/id-ID.rc (original) +++ trunk/reactos/base/applications/control/lang/id-ID.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/it-IT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/it-IT.rc (original) +++ trunk/reactos/base/applications/control/lang/it-IT.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/ja-JP.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/ja-JP.rc (original) +++ trunk/reactos/base/applications/control/lang/ja-JP.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/lt-LT.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/lt-LT.rc (original) +++ trunk/reactos/base/applications/control/lang/lt-LT.rc Thu Dec 6 22:49:12 2007 @@ -28,3 +28,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/nb-NO.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/nb-NO.rc (original) +++ trunk/reactos/base/applications/control/lang/nb-NO.rc Thu Dec 6 22:49:12 2007 @@ -31,3 +31,13 @@ MENUITEM "Om", IDM_ABOUT END END + +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/nl-NL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/nl-NL.rc (original) +++ trunk/reactos/base/applications/control/lang/nl-NL.rc Thu Dec 6 22:49:12 2007 @@ -27,3 +27,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/pl-PL.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/pl-PL.rc (original) +++ trunk/reactos/base/applications/control/lang/pl-PL.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/pt-BR.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/pt-BR.rc (original) +++ trunk/reactos/base/applications/control/lang/pt-BR.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/ru-RU.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/ru-RU.rc (original) +++ trunk/reactos/base/applications/control/lang/ru-RU.rc Thu Dec 6 22:49:12 2007 @@ -25,3 +25,13 @@ MENUITEM "&Î ïðîãðàììå", IDM_ABOUT END END + +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Ïàíåëü óïðàâëåíèÿ" + IDS_ABOUT "Óïðîùåííàÿ ïàíåëü óïðàâëåíèÿ (íå ñâÿçàííàÿ ñ îáîëî÷êîé)\rÀâòîðñêèå ïðàâà 2004 GkWare e.K.\rhttp://www.gkware.com\rÐàñïðîñòðàíÿåòñÿ ïî GPL" + IDS_ABOUT_TITLE "Î ïàíåëè óïðàâëåíèÿ" + IDS_NO_ITEMS "Íåò ýëåìåíòîâ â ñïèñêå" + IDS_NAME "Èìÿ" + IDS_COMMENT "Îïèñàíèå" +END Modified: trunk/reactos/base/applications/control/lang/sk-SK.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/sk-SK.rc (original) +++ trunk/reactos/base/applications/control/lang/sk-SK.rc Thu Dec 6 22:49:12 2007 @@ -25,3 +25,13 @@ MENUITEM "È&o je...", IDM_ABOUT END END + +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/sv-SE.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/sv-SE.rc (original) +++ trunk/reactos/base/applications/control/lang/sv-SE.rc Thu Dec 6 22:49:12 2007 @@ -26,3 +26,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/th-TH.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/th-TH.rc (original) +++ trunk/reactos/base/applications/control/lang/th-TH.rc Thu Dec 6 22:49:12 2007 @@ -32,3 +32,13 @@ MENUITEM "à¡ÕèÂǡѺ...", IDM_ABOUT END END + +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/uk-UA.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/uk-UA.rc (original) +++ trunk/reactos/base/applications/control/lang/uk-UA.rc Thu Dec 6 22:49:12 2007 @@ -32,3 +32,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/lang/zh-CN.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/lang/zh-CN.rc (original) +++ trunk/reactos/base/applications/control/lang/zh-CN.rc Thu Dec 6 22:49:12 2007 @@ -44,3 +44,12 @@ END END +STRINGTABLE +BEGIN + IDS_WINDOW_TITLE "Control Panel" + IDS_ABOUT "Simple Control Panel (not Shell-namespace based)\rCopyright 2004 GkWare e.K.\rhttp://www.gkware.com\rReleased under the GPL" + IDS_ABOUT_TITLE "About the Control Panel" + IDS_NO_ITEMS "No Items in ListView" + IDS_NAME "Name" + IDS_COMMENT "Comment" +END Modified: trunk/reactos/base/applications/control/resource.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/control/…
============================================================================== --- trunk/reactos/base/applications/control/resource.h (original) +++ trunk/reactos/base/applications/control/resource.h Thu Dec 6 22:49:12 2007 @@ -11,6 +11,14 @@ #define IDM_ABOUT 40004 #define IDM_CLOSE 40005 +/* Strings */ +#define IDS_WINDOW_TITLE 5000 +#define IDS_ABOUT 5001 +#define IDS_ABOUT_TITLE 5002 +#define IDS_NO_ITEMS 5003 +#define IDS_NAME 5004 +#define IDS_COMMENT 5005 + // Next default values for new objects // #ifdef APSTUDIO_INVOKED
17 years
1
0
0
0
[fireball] 31047: - Rewrite CmiScanKeyList to use the NCB. - Disable private KCB allocator and allocate separate pool entries for each KCB -- should fix issues some people have been experiencing until the real bug is found - Remove all code that builds the name for the PKEY_OBJECT. This reduces non-paged pool allocation usage since the name is now stored compressed in the NCB, in paged pool.
by fireball@svn.reactos.org
Author: fireball Date: Thu Dec 6 22:46:59 2007 New Revision: 31047 URL:
http://svn.reactos.org/svn/reactos?rev=31047&view=rev
Log: - Rewrite CmiScanKeyList to use the NCB. - Disable private KCB allocator and allocate separate pool entries for each KCB -- should fix issues some people have been experiencing until the real bug is found - Remove all code that builds the name for the PKEY_OBJECT. This reduces non-paged pool allocation usage since the name is now stored compressed in the NCB, in paged pool. Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c trunk/reactos/ntoskrnl/cm/regobj.c trunk/reactos/ntoskrnl/config/cm.h trunk/reactos/ntoskrnl/config/cmalloc.c trunk/reactos/ntoskrnl/config/cmsysini.c Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/ntfunc.c?rev=3…
============================================================================== --- trunk/reactos/ntoskrnl/cm/ntfunc.c (original) +++ trunk/reactos/ntoskrnl/cm/ntfunc.c Thu Dec 6 22:46:59 2007 @@ -160,13 +160,7 @@ /* If we got here, this is a new key */ LocalDisposition = REG_CREATED_NEW_KEY; - /* Now save the key name */ - RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, - &RemainingPath, - &KeyObject->Name); - /* Get the parent node and the child node */ - ParentNode = (PCM_KEY_NODE)HvGetCell(KeyObject->KeyControlBlock->ParentKcb->KeyHive, KeyObject->KeyControlBlock->ParentKcb->KeyCell); Node = (PCM_KEY_NODE)HvGetCell(KeyObject->KeyControlBlock->KeyHive, Modified: trunk/reactos/ntoskrnl/cm/regobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/regobj.c?rev=3…
============================================================================== --- trunk/reactos/ntoskrnl/cm/regobj.c (original) +++ trunk/reactos/ntoskrnl/cm/regobj.c Thu Dec 6 22:46:59 2007 @@ -436,7 +436,6 @@ return STATUS_SUCCESS; } - /* Preconditions: Must be called with CmpRegistryLock held. */ NTSTATUS CmiScanKeyList(PCM_KEY_CONTROL_BLOCK Parent, @@ -445,48 +444,74 @@ PKEY_OBJECT* ReturnedObject) { PKEY_OBJECT CurKey = NULL; + PCM_NAME_CONTROL_BLOCK Ncb; PLIST_ENTRY NextEntry; - + PWCHAR p, pp; + ULONG i; + *ReturnedObject = NULL; + + /* Loop child keys in the KCB */ NextEntry = Parent->KeyBodyListHead.Flink; while (NextEntry != &Parent->KeyBodyListHead) { + /* Get the current ReactOS Key Object */ CurKey = CONTAINING_RECORD(NextEntry, KEY_OBJECT, KeyBodyEntry); - if (Attributes & OBJ_CASE_INSENSITIVE) - { - DPRINT("Comparing %wZ and %wZ\n", KeyName, &CurKey->Name); - if ((KeyName->Length == CurKey->Name.Length) - && (_wcsicmp(KeyName->Buffer, CurKey->Name.Buffer) == 0)) + + /* Get the NCB */ + Ncb = CurKey->KeyControlBlock->NameBlock; + + /* Check if the key is compressed */ + if (Ncb->Compressed) + { + /* Do a compressed compare */ + if (!CmpCompareCompressedName(KeyName, + Ncb->Name, + Ncb->NameLength)) { + /* We got it */ break; } } else { - if ((KeyName->Length == CurKey->Name.Length) - && (wcscmp(KeyName->Buffer, CurKey->Name.Buffer) == 0)) + /* Do a manual compare */ + p = KeyName->Buffer; + pp = Ncb->Name; + for (i = 0; i < Ncb->NameLength; i += sizeof(WCHAR)) { + /* Compare the character */ + if (RtlUpcaseUnicodeChar(*p) != RtlUpcaseUnicodeChar(*pp)) + { + /* Failed */ + break; + } + + /* Next chars */ + p++; + pp++; + } + + /* Did we find it? */ + if (i == Ncb->NameLength - 1) + { + /* We found it, break out */ break; } } + /* Go go the next entry */ NextEntry = NextEntry->Flink; } + /* Check if we got here and found something */ if (NextEntry != &Parent->KeyBodyListHead) { - if (CurKey->KeyControlBlock->Delete) - { - CHECKPOINT; - *ReturnedObject = NULL; - return STATUS_UNSUCCESSFUL; - } + /* Refernece the object and return it */ ObReferenceObject(CurKey); *ReturnedObject = CurKey; } - else - { - *ReturnedObject = NULL; - } + + /* Return success */ return STATUS_SUCCESS; } @@ -719,7 +744,6 @@ FoundObject->KeyControlBlock = Kcb; ASSERT(FoundObject->KeyControlBlock->KeyHive == ParsedKey->KeyControlBlock->KeyHive); - RtlpCreateUnicodeString(&FoundObject->Name, KeyName.Buffer, NonPagedPool); InsertTailList(&ParsedKey->KeyControlBlock->KeyBodyListHead, &FoundObject->KeyBodyEntry); DPRINT("Created object 0x%p\n", FoundObject); } @@ -783,8 +807,6 @@ ExReleaseResourceLite(&CmpRegistryLock); KeLeaveCriticalRegion(); - DPRINT("CmpParseKey: %wZ\n", &FoundObject->Name); - *Path = EndPtr; VERIFY_KEY_OBJECT(FoundObject); @@ -823,8 +845,6 @@ /* Acquire hive lock */ KeEnterCriticalRegion(); ExAcquireResourceExclusiveLite(&CmpRegistryLock, TRUE); - - RtlFreeUnicodeString(&KeyObject->Name); ASSERT((KeyObject->KeyControlBlock->Delete) == FALSE); @@ -845,61 +865,6 @@ { DPRINT1("CmpQueryKeyName() called\n"); while (TRUE); -#if 0 - PKEY_OBJECT KeyObject; - NTSTATUS Status; - - KeyObject = (PKEY_OBJECT)ObjectBody; - - if (KeyObject->KeyControlBlock->ParentKcb != KeyObject->KeyControlBlock) - { - Status = ObQueryNameString (KeyObject->ParentKey, - ObjectNameInfo, - Length, - ReturnLength); - } - else - { - /* KeyObject is the root key */ - Status = ObQueryNameString (OBJECT_HEADER_TO_NAME_INFO(OBJECT_TO_OBJECT_HEADER(KeyObject))->Directory, - ObjectNameInfo, - Length, - ReturnLength); - } - - if (!NT_SUCCESS(Status) && Status != STATUS_INFO_LENGTH_MISMATCH) - { - return Status; - } - (*ReturnLength) += sizeof(WCHAR) + KeyObject->Name.Length; - - if (Status == STATUS_INFO_LENGTH_MISMATCH || *ReturnLength > Length) - { - return STATUS_INFO_LENGTH_MISMATCH; - } - - if (ObjectNameInfo->Name.Buffer == NULL) - { - ObjectNameInfo->Name.Buffer = (PWCHAR)(ObjectNameInfo + 1); - ObjectNameInfo->Name.Length = 0; - ObjectNameInfo->Name.MaximumLength = (USHORT)Length - sizeof(OBJECT_NAME_INFORMATION); - } - - DPRINT ("Parent path: %wZ\n", ObjectNameInfo->Name); - - Status = RtlAppendUnicodeToString (&ObjectNameInfo->Name, - L"\\"); - if (!NT_SUCCESS (Status)) - return Status; - - Status = RtlAppendUnicodeStringToString (&ObjectNameInfo->Name, - &KeyObject->Name); - if (NT_SUCCESS (Status)) - { - DPRINT ("Total path: %wZ\n", &ObjectNameInfo->Name); - } -#endif - return STATUS_SUCCESS; } Modified: trunk/reactos/ntoskrnl/config/cm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cm.h?rev=3…
============================================================================== --- trunk/reactos/ntoskrnl/config/cm.h (original) +++ trunk/reactos/ntoskrnl/config/cm.h Thu Dec 6 22:46:59 2007 @@ -492,8 +492,6 @@ // typedef struct _KEY_OBJECT { - ULONG Type; - UNICODE_STRING Name; PCM_KEY_CONTROL_BLOCK KeyControlBlock; LIST_ENTRY KeyBodyEntry; } KEY_OBJECT, *PKEY_OBJECT; Modified: trunk/reactos/ntoskrnl/config/cmalloc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmalloc.c?…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmalloc.c (original) +++ trunk/reactos/ntoskrnl/config/cmalloc.c Thu Dec 6 22:46:59 2007 @@ -116,9 +116,9 @@ PCM_ALLOC_PAGE AllocPage; ULONG i; PAGED_CODE(); - + /* Check if private allocations are initialized */ - if (CmpAllocInited) + if (FALSE) { /* They are, acquire the bucket lock */ KeAcquireGuardedMutex(&CmpAllocBucketLock); @@ -178,7 +178,7 @@ goto SearchKcbList; } } - + /* Allocate a KCB only */ CurrentKcb = ExAllocatePoolWithTag(PagedPool, sizeof(CM_KEY_CONTROL_BLOCK), Modified: trunk/reactos/ntoskrnl/config/cmsysini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmsysini.c (original) +++ trunk/reactos/ntoskrnl/config/cmsysini.c Thu Dec 6 22:46:59 2007 @@ -604,12 +604,7 @@ /* Update KCB information */ NewKey->KeyControlBlock->KeyCell = RegistryHive->Hive.BaseBlock->RootCell; NewKey->KeyControlBlock->KeyHive = &RegistryHive->Hive; - - /* Build the key name */ - RtlDuplicateUnicodeString(RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE, - &RemainingPath, - &NewKey->Name); - + /* Reference the new key */ ObReferenceObject(NewKey); @@ -900,13 +895,11 @@ if (!Kcb) return FALSE; /* Initialize the object */ - RootKey->Type = TAG('k', 'v', '0', '2'); RootKey->KeyControlBlock = Kcb; #if 0 + RootKey->Type = TAG('k', 'v', '0', '2'); RootKey->NotifyBlock = NULL; RootKey->ProcessID = PsGetCurrentProcessId(); -#else - RtlpCreateUnicodeString(&RootKey->Name, L"Registry", NonPagedPool); #endif /* Insert the key into the namespace */
17 years
1
0
0
0
[fireball] 31046: - Remove CmiAddKeyToList. - Use ParseContext in CmpDoCreate, removing OriginatingHive parameter since ReactOS doesn't use this. - Sending the create options as key node flags is wrong -- identify this in the code (fixing this however will break the boot -- need to investigate).
by fireball@svn.reactos.org
Author: fireball Date: Thu Dec 6 21:31:37 2007 New Revision: 31046 URL:
http://svn.reactos.org/svn/reactos?rev=31046&view=rev
Log: - Remove CmiAddKeyToList. - Use ParseContext in CmpDoCreate, removing OriginatingHive parameter since ReactOS doesn't use this. - Sending the create options as key node flags is wrong -- identify this in the code (fixing this however will break the boot -- need to investigate). Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c trunk/reactos/ntoskrnl/cm/regobj.c trunk/reactos/ntoskrnl/config/cm.h trunk/reactos/ntoskrnl/config/cmparse.c trunk/reactos/ntoskrnl/config/cmsysini.c Modified: trunk/reactos/ntoskrnl/cm/ntfunc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/ntfunc.c?rev=3…
============================================================================== --- trunk/reactos/ntoskrnl/cm/ntfunc.c (original) +++ trunk/reactos/ntoskrnl/cm/ntfunc.c Thu Dec 6 21:31:37 2007 @@ -52,7 +52,13 @@ KPROCESSOR_MODE PreviousMode = ExGetPreviousMode(); HANDLE hKey; PCM_KEY_NODE Node, ParentNode; + CM_PARSE_CONTEXT ParseContext = {0}; PAGED_CODE(); + + /* Setup the parse context */ + ParseContext.CreateOperation = TRUE; + ParseContext.CreateOptions = CreateOptions; + if (Class) ParseContext.Class = *Class; /* Capture all the info */ Status = ObpCaptureObjectAttributes(ObjectAttributes, @@ -146,10 +152,8 @@ NULL, &RemainingPath, KernelMode, - Class, - CreateOptions, + &ParseContext, Parent->KeyControlBlock, - NULL, (PVOID*)&KeyObject); if (!NT_SUCCESS(Status)) goto Cleanup; @@ -175,7 +179,7 @@ KeyObject->KeyControlBlock->ValueCache.Count = Node->ValueList.Count; /* Link child to parent */ - CmiAddKeyToList(Parent->KeyControlBlock, KeyObject); + InsertTailList(&Parent->KeyControlBlock->KeyBodyListHead, &KeyObject->KeyBodyEntry); /* Create the actual handle to the object */ Status = CmpCreateHandle(KeyObject, Modified: trunk/reactos/ntoskrnl/cm/regobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cm/regobj.c?rev=3…
============================================================================== --- trunk/reactos/ntoskrnl/cm/regobj.c (original) +++ trunk/reactos/ntoskrnl/cm/regobj.c Thu Dec 6 21:31:37 2007 @@ -720,7 +720,7 @@ FoundObject->KeyControlBlock = Kcb; ASSERT(FoundObject->KeyControlBlock->KeyHive == ParsedKey->KeyControlBlock->KeyHive); RtlpCreateUnicodeString(&FoundObject->Name, KeyName.Buffer, NonPagedPool); - CmiAddKeyToList(ParsedKey->KeyControlBlock, FoundObject); + InsertTailList(&ParsedKey->KeyControlBlock->KeyBodyListHead, &FoundObject->KeyBodyEntry); DPRINT("Created object 0x%p\n", FoundObject); } else @@ -903,13 +903,6 @@ return STATUS_SUCCESS; } -VOID -CmiAddKeyToList(PCM_KEY_CONTROL_BLOCK ParentKey, - PKEY_OBJECT NewKey) -{ - InsertTailList(&ParentKey->KeyBodyListHead, &NewKey->KeyBodyEntry); -} - static NTSTATUS CmiGetLinkTarget(PCMHIVE RegistryHive, PCM_KEY_NODE KeyCell, Modified: trunk/reactos/ntoskrnl/config/cm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cm.h?rev=3…
============================================================================== --- trunk/reactos/ntoskrnl/config/cm.h (original) +++ trunk/reactos/ntoskrnl/config/cm.h Thu Dec 6 21:31:37 2007 @@ -507,9 +507,6 @@ IN PACCESS_STATE AccessState, IN PVOID ParseContext); NTSTATUS CmiCallRegisteredCallbacks(IN REG_NOTIFY_CLASS Argument1, IN PVOID Argument2); -VOID -CmiAddKeyToList(IN PCM_KEY_CONTROL_BLOCK ParentKey, - IN PKEY_OBJECT NewKey); /////////////////////////////////////////////////////////////////////////////// // @@ -1029,10 +1026,8 @@ IN PACCESS_STATE AccessState, IN PUNICODE_STRING Name, IN KPROCESSOR_MODE AccessMode, - IN PUNICODE_STRING Class, - IN ULONG CreateOptions, + IN PCM_PARSE_CONTEXT Context, IN PCM_KEY_CONTROL_BLOCK ParentKcb, - IN PCMHIVE OriginatingHive OPTIONAL, OUT PVOID *Object ); Modified: trunk/reactos/ntoskrnl/config/cmparse.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmparse.c?…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmparse.c (original) +++ trunk/reactos/ntoskrnl/config/cmparse.c Thu Dec 6 21:31:37 2007 @@ -82,9 +82,9 @@ IN PACCESS_STATE AccessState, IN PUNICODE_STRING Name, IN KPROCESSOR_MODE AccessMode, - IN PUNICODE_STRING Class, + IN PCM_PARSE_CONTEXT ParseContext, IN PCM_KEY_CONTROL_BLOCK ParentKcb, - IN ULONG CreateOptions, + IN ULONG Flags, OUT PHCELL_INDEX KeyCell, OUT PVOID *Object) { @@ -110,7 +110,7 @@ /* Get the storage type */ StorageType = Stable; - if (CreateOptions & REG_OPTION_VOLATILE) StorageType = Volatile; + if (Flags & REG_OPTION_VOLATILE) StorageType = Volatile; /* Allocate the child */ *KeyCell = HvAllocateCell(Hive, @@ -139,10 +139,13 @@ HvReleaseCell(Hive, *KeyCell); /* Check if we have a class name */ - if (Class->Length > 0) + if (ParseContext->Class.Length > 0) { /* Allocate a class cell */ - ClassCell = HvAllocateCell(Hive, Class->Length, StorageType, HCELL_NIL); + ClassCell = HvAllocateCell(Hive, + ParseContext->Class.Length, + StorageType, + HCELL_NIL); if (ClassCell == HCELL_NIL) { /* Fail */ @@ -165,7 +168,7 @@ KeyBody = (PKEY_OBJECT)(*Object); /* Check if we had a class */ - if (Class->Length > 0) + if (ParseContext->Class.Length > 0) { /* Get the class cell */ CellData = HvGetCell(Hive, ClassCell); @@ -183,13 +186,13 @@ /* Copy the class data */ RtlCopyMemory(&CellData->u.KeyString[0], - Class->Buffer, - Class->Length); + ParseContext->Class.Buffer, + ParseContext->Class.Length); } /* Fill out the key node */ KeyNode->Signature = CM_KEY_NODE_SIGNATURE; - KeyNode->Flags = CreateOptions; + KeyNode->Flags = Flags; KeQuerySystemTime(&SystemTime); KeyNode->LastWriteTime = SystemTime; KeyNode->Spare = 0; @@ -202,7 +205,7 @@ KeyNode->ValueList.List = HCELL_NIL; KeyNode->Security = HCELL_NIL; KeyNode->Class = ClassCell; - KeyNode->ClassLength = Class->Length; + KeyNode->ClassLength = ParseContext->Class.Length; KeyNode->MaxValueDataLen = 0; KeyNode->MaxNameLen = 0; KeyNode->MaxValueNameLen = 0; @@ -236,7 +239,7 @@ if (!NT_SUCCESS(Status)) { /* Free any cells we might've allocated */ - if (Class->Length > 0) HvFreeCell(Hive, ClassCell); + if (ParseContext->Class.Length > 0) HvFreeCell(Hive, ClassCell); HvFreeCell(Hive, *KeyCell); } @@ -260,10 +263,8 @@ IN PACCESS_STATE AccessState, IN PUNICODE_STRING Name, IN KPROCESSOR_MODE AccessMode, - IN PUNICODE_STRING Class OPTIONAL, - IN ULONG CreateOptions, + IN PCM_PARSE_CONTEXT ParseContext, IN PCM_KEY_CONTROL_BLOCK ParentKcb, - IN PCMHIVE OriginatingHive OPTIONAL, OUT PVOID *Object) { NTSTATUS Status; @@ -274,8 +275,6 @@ PSECURITY_DESCRIPTOR SecurityDescriptor = NULL; LARGE_INTEGER TimeStamp; PCM_KEY_NODE KeyNode; - UNICODE_STRING LocalClass = {0}; - if (!Class) Class = &LocalClass; /* Sanity check */ #if 0 @@ -319,7 +318,8 @@ /* Get the parent type */ ParentType = HvGetCellType(Cell); - if ((ParentType == Volatile) && !(CreateOptions & REG_OPTION_VOLATILE)) + if ((ParentType == Volatile) && + !(ParseContext->CreateOptions & REG_OPTION_VOLATILE)) { /* Children of volatile parents must also be volatile */ ASSERT(FALSE); @@ -346,9 +346,9 @@ AccessState, Name, AccessMode, - Class, + ParseContext, ParentKcb, - CreateOptions, + ParseContext->CreateOptions, // WRONG! &KeyCell, Object); if (NT_SUCCESS(Status)) @@ -391,14 +391,14 @@ } /* Check if we need toupdate class length maximum */ - if (KeyNode->MaxClassLen < Class->Length) + if (KeyNode->MaxClassLen < ParseContext->Class.Length) { /* Update it */ - KeyNode->MaxClassLen = Class->Length; + KeyNode->MaxClassLen = ParseContext->Class.Length; } /* Check if we're creating a symbolic link */ - if (CreateOptions & REG_OPTION_CREATE_LINK) + if (ParseContext->CreateOptions & REG_OPTION_CREATE_LINK) { /* Get the cell data */ CellData = HvGetCell(Hive, KeyCell); @@ -591,7 +591,7 @@ AccessState, AccessMode, CreateOptions, - NULL, + Context, 0, &Kcb, &Name, @@ -607,7 +607,7 @@ AccessState, &Name, AccessMode, - &Context->Class, + Context, ParentKcb, KEY_HIVE_ENTRY | KEY_NO_DELETE, &ChildCell, Modified: trunk/reactos/ntoskrnl/config/cmsysini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmsysini.c (original) +++ trunk/reactos/ntoskrnl/config/cmsysini.c Thu Dec 6 21:31:37 2007 @@ -614,7 +614,7 @@ ObReferenceObject(NewKey); /* Link this key to the parent */ - CmiAddKeyToList(ParentKey->KeyControlBlock, NewKey); + InsertTailList(&ParentKey->KeyControlBlock->KeyBodyListHead, &NewKey->KeyBodyEntry); return STATUS_SUCCESS; }
17 years
1
0
0
0
[cwittich] 31045: fix Device and Desktop rect values
by cwittich@svn.reactos.org
Author: cwittich Date: Thu Dec 6 19:53:50 2007 New Revision: 31045 URL:
http://svn.reactos.org/svn/reactos?rev=31045&view=rev
Log: fix Device and Desktop rect values Modified: trunk/reactos/dll/directx/ddraw/startup.c Modified: trunk/reactos/dll/directx/ddraw/startup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/startup.…
============================================================================== --- trunk/reactos/dll/directx/ddraw/startup.c (original) +++ trunk/reactos/dll/directx/ddraw/startup.c Thu Dec 6 19:53:50 2007 @@ -333,15 +333,15 @@ This->lpLcl->lpDDCB = This->lpLcl->lpGbl->lpDDCBtmp; This->lpLcl->hDD = ddgbl.hDD; - ddgbl.rectDevice.bottom = 0; - ddgbl.rectDevice.left= 0; + ddgbl.rectDevice.top = 0; + ddgbl.rectDevice.left = 0; ddgbl.rectDevice.right = ddgbl.vmiData.dwDisplayWidth; - ddgbl.rectDevice.right = ddgbl.vmiData.dwDisplayHeight; - - ddgbl.rectDesktop.bottom = 0; - ddgbl.rectDesktop.left= 0; + ddgbl.rectDevice.bottom = ddgbl.vmiData.dwDisplayHeight; + + ddgbl.rectDesktop.top = 0; + ddgbl.rectDesktop.left = 0; ddgbl.rectDesktop.right = ddgbl.vmiData.dwDisplayWidth; - ddgbl.rectDesktop.right = ddgbl.vmiData.dwDisplayHeight; + ddgbl.rectDesktop.bottom = ddgbl.vmiData.dwDisplayHeight; ddgbl.dwMonitorFrequency = GetDeviceCaps(GetWindowDC(NULL),VREFRESH); ddgbl.lpModeInfo->dwWidth = ddgbl.vmiData.dwDisplayWidth; @@ -504,7 +504,7 @@ { DxHeapMemFree(This->lpLcl->lpGbl->lpModeInfo); DxHeapMemFree(ddgbl.lpDDCBtmp); - // FIXME Close DX fristcall and second call + // FIXME Close DX first and second call return DD_FALSE; } @@ -522,7 +522,7 @@ if (mpFourCC == NULL) { DxHeapMemFree(ddgbl.lpDDCBtmp); - // FIXME Close DX fristcall and second call + // FIXME Close DX first and second call return DD_FALSE; } } @@ -544,7 +544,7 @@ { DxHeapMemFree(mpFourCC); DxHeapMemFree(ddgbl.lpDDCBtmp); - // FIXME Close DX fristcall and second call + // FIXME Close DX first and second call } } @@ -572,7 +572,7 @@ DxHeapMemFree(mpFourCC); DxHeapMemFree(mpTextures); DxHeapMemFree(ddgbl.lpDDCBtmp); - // FIXME Close DX fristcall and second call + // FIXME Close DX first and second call return DD_FALSE; }
17 years
1
0
0
0
[hpoussin] 31044: After plug&play at 3rd boot since r18448, after plug&play in 2nd stage setup since r22607, here is plug&play in 1st stage setup!
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Dec 6 19:25:57 2007 New Revision: 31044 URL:
http://svn.reactos.org/svn/reactos?rev=31044&view=rev
Log: After plug&play at 3rd boot since r18448, after plug&play in 2nd stage setup since r22607, here is plug&play in 1st stage setup! Added: trunk/reactos/base/setup/usetup/interface/devinst.c (with props) Modified: trunk/reactos/base/setup/usetup/interface/usetup.c trunk/reactos/base/setup/usetup/usetup.rbuild trunk/reactos/boot/bootdata/txtsetup.sif Added: trunk/reactos/base/setup/usetup/interface/devinst.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
============================================================================== --- trunk/reactos/base/setup/usetup/interface/devinst.c (added) +++ trunk/reactos/base/setup/usetup/interface/devinst.c Thu Dec 6 19:25:57 2007 @@ -1,0 +1,396 @@ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS text-mode setup + * FILE: subsys/system/usetup/interface/devinst.c + * PURPOSE: Device installation + * PROGRAMMER: Hervé Poussineau (hpoussin(a)reactos.org) + */ + +#include "usetup.h" + +#define NDEBUG +#include <debug.h> + +#define INITGUID +#include <guiddef.h> +#include <libs/umpnpmgr/sysguid.h> + +BOOLEAN +ResetDevice( + IN LPCWSTR DeviceId) +{ + PLUGPLAY_CONTROL_RESET_DEVICE_DATA ResetDeviceData; + NTSTATUS Status; + + RtlInitUnicodeString(&ResetDeviceData.DeviceInstance, DeviceId); + Status = NtPlugPlayControl(PlugPlayControlResetDevice, &ResetDeviceData, sizeof(PLUGPLAY_CONTROL_RESET_DEVICE_DATA)); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtPlugPlayControl() failed with status 0x%08x\n", Status); + return FALSE; + } + return TRUE; +} + +BOOLEAN +InstallDriver( + IN HINF hInf, + IN HANDLE hServices, + IN HANDLE hDeviceKey, + IN LPCWSTR DeviceId, + IN LPCWSTR HardwareId) +{ + UNICODE_STRING PathPrefix = RTL_CONSTANT_STRING(L"System32\\DRIVERS\\"); + UNICODE_STRING ServiceU = RTL_CONSTANT_STRING(L"Service"); + UNICODE_STRING ErrorControlU = RTL_CONSTANT_STRING(L"ErrorControl"); + UNICODE_STRING ImagePathU = RTL_CONSTANT_STRING(L"ImagePath"); + UNICODE_STRING StartU = RTL_CONSTANT_STRING(L"Start"); + UNICODE_STRING TypeU = RTL_CONSTANT_STRING(L"Type"); + UNICODE_STRING StringU; + OBJECT_ATTRIBUTES ObjectAttributes; + HANDLE hService; + INFCONTEXT Context; + LPWSTR Driver, ImagePath, FullImagePath; + ULONG dwValue; + ULONG Disposition; + NTSTATUS Status; + BOOLEAN deviceInstalled = FALSE; + + /* Check if we know the hardware */ + if (!SetupFindFirstLineW(hInf, L"HardwareIdsDatabase", HardwareId, &Context)) + return FALSE; + if (!INF_GetDataField(&Context, 1, &Driver)) + return FALSE; + + /* Find associated driver name */ + /* FIXME: check in other sections too! */ + if (!SetupFindFirstLineW(hInf, L"BootBusExtenders.Load", Driver, &Context) + && !SetupFindFirstLineW(hInf, L"Keyboard.Load", Driver, &Context)) + return FALSE; + if (!INF_GetDataField(&Context, 1, &ImagePath)) + return FALSE; + + /* Prepare full driver path */ + dwValue = PathPrefix.MaximumLength + wcslen(ImagePath) * sizeof(WCHAR); + FullImagePath = (LPWSTR)RtlAllocateHeap(ProcessHeap, 0, dwValue); + if (!FullImagePath) + { + DPRINT1("RtlAllocateHeap() failed\n"); + return FALSE; + } + RtlCopyMemory(FullImagePath, PathPrefix.Buffer, PathPrefix.MaximumLength); + wcscat(FullImagePath, ImagePath); + + DPRINT1("Using driver '%S' for device '%S'\n", ImagePath, DeviceId);; + + /* Create service key */ + RtlInitUnicodeString(&StringU, Driver); + InitializeObjectAttributes(&ObjectAttributes, &StringU, 0, hServices, NULL); + Status = NtCreateKey(&hService, KEY_SET_VALUE, &ObjectAttributes, 0, NULL, 0, &Disposition); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtCreateKey('%wZ') failed with status 0x%08x\n", &StringU, Status); + RtlFreeHeap(ProcessHeap, 0, FullImagePath); + return FALSE; + } + + /* Fill service key */ + if (Disposition == REG_CREATED_NEW_KEY) + { + dwValue = 0; + NtSetValueKey( + hService, + &ErrorControlU, + 0, + REG_DWORD, + &dwValue, + sizeof(dwValue)); + dwValue = 0; + NtSetValueKey( + hService, + &StartU, + 0, + REG_DWORD, + &dwValue, + sizeof(dwValue)); + dwValue = SERVICE_KERNEL_DRIVER; + NtSetValueKey( + hService, + &TypeU, + 0, + REG_DWORD, + &dwValue, + sizeof(dwValue)); + } + /* HACK: don't put any path in registry */ + NtSetValueKey( + hService, + &ImagePathU, + 0, + REG_SZ, + ImagePath, + (wcslen(ImagePath) + 1) * sizeof(WCHAR)); + + /* Associate device with the service we just filled */ + Status = NtSetValueKey( + hDeviceKey, + &ServiceU, + 0, + REG_SZ, + Driver, + (wcslen(Driver) + 1) * sizeof(WCHAR)); + if (NT_SUCCESS(Status)) + { + /* Restart the device, so it will use the driver we registred */ + deviceInstalled = ResetDevice(DeviceId); + } + + /* HACK: Update driver path */ + NtSetValueKey( + hService, + &ImagePathU, + 0, + REG_SZ, + FullImagePath, + (wcslen(FullImagePath) + 1) * sizeof(WCHAR)); + RtlFreeHeap(ProcessHeap, 0, FullImagePath); + NtClose(hService); + + return deviceInstalled; +} + +VOID +InstallDevice( + IN HINF hInf, + IN HANDLE hEnum, + IN HANDLE hServices, + IN LPCWSTR DeviceId) +{ + UNICODE_STRING HardwareIDU = RTL_CONSTANT_STRING(L"HardwareID"); + UNICODE_STRING CompatibleIDsU = RTL_CONSTANT_STRING(L"CompatibleIDs"); + UNICODE_STRING DeviceIdU; + OBJECT_ATTRIBUTES ObjectAttributes; + LPCWSTR HardwareID; + PKEY_VALUE_PARTIAL_INFORMATION pPartialInformation = NULL; + HANDLE hDeviceKey; + ULONG ulRequired; + BOOLEAN bDriverInstalled = FALSE; + NTSTATUS Status; + + RtlInitUnicodeString(&DeviceIdU, DeviceId); + InitializeObjectAttributes(&ObjectAttributes, &DeviceIdU, 0, hEnum, NULL); + Status = NtOpenKey(&hDeviceKey, KEY_QUERY_VALUE | KEY_SET_VALUE, &ObjectAttributes); + if (!NT_SUCCESS(Status)) + { + DPRINT("Unable to open subkey '%S'\n", DeviceId); + return; + } + + Status = NtQueryValueKey( + hDeviceKey, + &HardwareIDU, + KeyValuePartialInformation, + NULL, + 0, + &ulRequired); + if (Status == STATUS_BUFFER_TOO_SMALL) + { + pPartialInformation = (PKEY_VALUE_PARTIAL_INFORMATION)RtlAllocateHeap(ProcessHeap, 0, ulRequired); + if (!pPartialInformation) + { + DPRINT1("RtlAllocateHeap() failed\n"); + NtClose(hDeviceKey); + return; + } + Status = NtQueryValueKey( + hDeviceKey, + &HardwareIDU, + KeyValuePartialInformation, + pPartialInformation, + ulRequired, + &ulRequired); + } + if (Status == STATUS_OBJECT_NAME_NOT_FOUND) + { + /* Nothing to do */ + } + else if (!NT_SUCCESS(Status)) + { + DPRINT1("NtQueryValueKey() failed with status 0x%08x\n", Status); + if (pPartialInformation) + RtlFreeHeap(ProcessHeap, 0, pPartialInformation); + NtClose(hDeviceKey); + return; + } + else + { + for (HardwareID = (LPCWSTR)pPartialInformation->Data; + (PUCHAR)HardwareID < pPartialInformation->Data + pPartialInformation->DataLength + && *HardwareID + && !bDriverInstalled; + HardwareID += wcslen(HardwareID) + 1) + { + bDriverInstalled = InstallDriver(hInf, hServices,hDeviceKey, DeviceId, HardwareID); + } + } + + if (!bDriverInstalled) + { + if (pPartialInformation) + { + RtlFreeHeap(ProcessHeap, 0, pPartialInformation); + pPartialInformation = NULL; + } + Status = NtQueryValueKey( + hDeviceKey, + &CompatibleIDsU, + KeyValuePartialInformation, + NULL, + 0, + &ulRequired); + if (Status == STATUS_BUFFER_TOO_SMALL) + { + pPartialInformation = (PKEY_VALUE_PARTIAL_INFORMATION)RtlAllocateHeap(ProcessHeap, 0, ulRequired); + if (!pPartialInformation) + { + DPRINT("RtlAllocateHeap() failed\n"); + NtClose(hDeviceKey); + return; + } + Status = NtQueryValueKey( + hDeviceKey, + &CompatibleIDsU, + KeyValuePartialInformation, + pPartialInformation, + ulRequired, + &ulRequired); + } + if (Status == STATUS_OBJECT_NAME_NOT_FOUND) + { + /* Nothing to do */ + } + else if (!NT_SUCCESS(Status)) + { + if (pPartialInformation) + RtlFreeHeap(ProcessHeap, 0, pPartialInformation); + NtClose(hDeviceKey); + DPRINT1("NtQueryValueKey() failed with status 0x%08x\n", Status); + return; + } + else + { + for (HardwareID = (LPCWSTR)pPartialInformation->Data; + (PUCHAR)HardwareID < pPartialInformation->Data + pPartialInformation->DataLength + && *HardwareID + && !bDriverInstalled; + HardwareID += wcslen(HardwareID) + 1) + { + bDriverInstalled = InstallDriver(hInf, hServices,hDeviceKey, DeviceId, HardwareID); + } + } + } + if (!bDriverInstalled) + DPRINT("No driver available for %S\n", DeviceId); + + RtlFreeHeap(ProcessHeap, 0, pPartialInformation); + NtClose(hDeviceKey); +} + +NTSTATUS +EventThread(IN LPVOID lpParameter) +{ + UNICODE_STRING EnumU = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Enum"); + UNICODE_STRING ServicesU = RTL_CONSTANT_STRING(L"\\Registry\\Machine\\SYSTEM\\CurrentControlSet\\Services"); + PPLUGPLAY_EVENT_BLOCK PnpEvent; + OBJECT_ATTRIBUTES ObjectAttributes; + ULONG PnpEventSize; + HINF hInf; + HANDLE hEnum, hServices; + NTSTATUS Status; + + hInf = *(HINF *)lpParameter; + + InitializeObjectAttributes(&ObjectAttributes, &EnumU, OBJ_CASE_INSENSITIVE, NULL, NULL); + Status = NtOpenKey(&hEnum, 0, &ObjectAttributes); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtOpenKey('%wZ') failed with status 0x%08lx\n", &EnumU, Status); + return Status; + } + + InitializeObjectAttributes(&ObjectAttributes, &ServicesU, OBJ_CASE_INSENSITIVE, NULL, NULL); + Status = NtCreateKey(&hServices, 0, &ObjectAttributes, 0, NULL, 0, NULL); + if (!NT_SUCCESS(Status)) + { + DPRINT1("NtCreateKey('%wZ') failed with status 0x%08lx\n", &ServicesU, Status); + NtClose(hEnum); + return Status; + } + + PnpEventSize = 0x1000; + PnpEvent = (PPLUGPLAY_EVENT_BLOCK)RtlAllocateHeap(ProcessHeap, 0, PnpEventSize); + if (PnpEvent == NULL) + { + NtClose(hEnum); + NtClose(hServices); + return STATUS_NO_MEMORY; + } + + for (;;) + { + DPRINT("Calling NtGetPlugPlayEvent()\n"); + + /* Wait for the next pnp event */ + Status = NtGetPlugPlayEvent(0, 0, PnpEvent, PnpEventSize); + + /* Resize the buffer for the PnP event if it's too small. */ + if (Status == STATUS_BUFFER_TOO_SMALL) + { + PnpEventSize += 0x400; + PnpEvent = (PPLUGPLAY_EVENT_BLOCK)RtlReAllocateHeap(ProcessHeap, 0, PnpEvent, PnpEventSize); + if (PnpEvent == NULL) + { + NtClose(hEnum); + NtClose(hServices); + return STATUS_NO_MEMORY; + } + continue; + } + + if (!NT_SUCCESS(Status)) + { + DPRINT("NtPlugPlayEvent() failed (Status %lx)\n", Status); + break; + } + + /* Process the pnp event */ + DPRINT("Received PnP Event\n"); + if (IsEqualIID(&PnpEvent->EventGuid, (UUID*)&GUID_DEVICE_ARRIVAL)) + { + DPRINT1("Device arrival event: %S\n", PnpEvent->TargetDevice.DeviceIds); + InstallDevice(hInf, hEnum, hServices, PnpEvent->TargetDevice.DeviceIds); + } + else + { + DPRINT("Unknown event\n"); + } + + /* Dequeue the current pnp event and signal the next one */ + NtPlugPlayControl(PlugPlayControlUserResponse, NULL, 0); + } + + RtlFreeHeap(ProcessHeap, 0, PnpEvent); + NtClose(hEnum); + NtClose(hServices); + + return STATUS_SUCCESS; +} + +DWORD WINAPI +PnpEventThread(IN LPVOID lpParameter) +{ + NTSTATUS Status; + Status = EventThread(lpParameter); + NtTerminateThread(NtCurrentThread(), Status); + return 0; +} Propchange: trunk/reactos/base/setup/usetup/interface/devinst.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/base/setup/usetup/interface/usetup.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/interfac…
============================================================================== --- trunk/reactos/base/setup/usetup/interface/usetup.c (original) +++ trunk/reactos/base/setup/usetup/interface/usetup.c Thu Dec 6 19:25:57 2007 @@ -84,6 +84,7 @@ LONG AutoPartition = 0; WCHAR UnattendInstallationDirectory[MAX_PATH]; BOOLEAN RepairUpdateFlag = FALSE; +HANDLE hPnpThread = INVALID_HANDLE_VALUE; /* LOCALS *******************************************************************/ @@ -697,6 +698,13 @@ "ENTER = Reboot computer", Ir, POPUP_WAIT_ENTER); return QUIT_PAGE; + } + + /* Start PnP thread */ + if (hPnpThread != INVALID_HANDLE_VALUE) + { + NtResumeThread(hPnpThread, NULL); + hPnpThread = INVALID_HANDLE_VALUE; } CheckUnattendedSetup(); @@ -3630,15 +3638,22 @@ } +DWORD WINAPI +PnpEventThread(IN LPVOID lpParameter); + VOID RunUSetup(VOID) { INPUT_RECORD Ir; PAGE_NUMBER Page; LARGE_INTEGER Time; + NTSTATUS Status; NtQuerySystemTime(&Time); + Status = RtlCreateUserThread(NtCurrentProcess(), NULL, TRUE, 0, 0, 0, PnpEventThread, &SetupInf, &hPnpThread, NULL); + if (!NT_SUCCESS(Status)) + hPnpThread = INVALID_HANDLE_VALUE; if (!CONSOLE_Init()) { PrintString("Unable to open the console\n\n"); Modified: trunk/reactos/base/setup/usetup/usetup.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/setup/usetup/usetup.r…
============================================================================== --- trunk/reactos/base/setup/usetup/usetup.rbuild (original) +++ trunk/reactos/base/setup/usetup/usetup.rbuild Thu Dec 6 19:25:57 2007 @@ -16,6 +16,7 @@ <library>ntdll</library> <directory name="interface"> <file>consup.c</file> + <file>devinst.c</file> <file>usetup.c</file> </directory> <directory name="native"> Modified: trunk/reactos/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/bootdata/txtsetup.sif…
============================================================================== --- trunk/reactos/boot/bootdata/txtsetup.sif (original) +++ trunk/reactos/boot/bootdata/txtsetup.sif Thu Dec 6 19:25:57 2007 @@ -29,11 +29,19 @@ kbdclass.sys=,,,,,,x,,,,,,4 l_intl.nls=,,,,,,,,,,,,2 ntfs.sys=,,,,,,,,,,,,4 -ntoskrnl.exe=,,,,,,,,,,,,2 pci.sys=,,,,,,,,,,,,4 scsiport.sys=,,,,,,x,,,,,,4 uniata.sys=,,,,,,,,,,,,4 vfatfs.sys=,,,,,,,,,,,,4 + +[HardwareIdsDatabase] +*PNP0C08 = acpi +*PNP0A03 = pci +PCI\CC_0604 = pci + +[BootBusExtenders.Load] +acpi = acpi.sys +pci = pci.sys [Cabinets] Cabinet=reactos.cab
17 years
1
0
0
0
[fireball] 31043: - Fix Greatlordisms: * Don't try to link *user*mode program to static *kernelmode* libcntpr. msvcrt.dll exists for this. * Fix main()'s declaration and definition. * The above changes fix compiling of rostest module.
by fireball@svn.reactos.org
Author: fireball Date: Thu Dec 6 18:44:23 2007 New Revision: 31043 URL:
http://svn.reactos.org/svn/reactos?rev=31043&view=rev
Log: - Fix Greatlordisms: * Don't try to link *user*mode program to static *kernelmode* libcntpr. msvcrt.dll exists for this. * Fix main()'s declaration and definition. * The above changes fix compiling of rostest module. Modified: trunk/rostests/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild trunk/rostests/tests/D3DParseUnknownCommand_show/main.c Modified: trunk/rostests/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/D3DParseUnknownComm…
============================================================================== --- trunk/rostests/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild (original) +++ trunk/rostests/tests/D3DParseUnknownCommand_show/D3DParseUnknownCommand_show.rbuild Thu Dec 6 18:44:23 2007 @@ -5,7 +5,6 @@ <library>kernel32</library> <library>gdi32</library> <library>ddraw</library> - <library>libcntpr</library> <library>user32</library> <file>main.c</file> </module> Modified: trunk/rostests/tests/D3DParseUnknownCommand_show/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/tests/D3DParseUnknownComm…
============================================================================== --- trunk/rostests/tests/D3DParseUnknownCommand_show/main.c (original) +++ trunk/rostests/tests/D3DParseUnknownCommand_show/main.c Thu Dec 6 18:44:23 2007 @@ -22,10 +22,10 @@ * */ -INT main(INT argc, CHAR argv[]); +INT main(INT argc, TCHAR *argv[]); VOID BuildReturnCode(DWORD * ReturnCode); -INT main(INT argc, TCHAR argv[]) +INT main(INT argc, TCHAR *argv[]) { DWORD ReturnCode[256]; @@ -44,6 +44,6 @@ { dp2command.bCommand = t; ReturnCode[t] = D3DParseUnknownCommand ( (LPVOID) &dp2command, (LPVOID *) lplpvReturnedCommand) ; - printf("D3DParseUnknownCommand return code = %x command %d \n", ReturnCode[t], t); + printf("D3DParseUnknownCommand return code = %x command %d \n", (UINT)ReturnCode[t], t); } }
17 years
1
0
0
0
[hpoussin] 31042: Fix indentation
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Dec 6 17:51:53 2007 New Revision: 31042 URL:
http://svn.reactos.org/svn/reactos?rev=31042&view=rev
Log: Fix indentation Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
============================================================================== --- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c (original) +++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c Thu Dec 6 17:51:53 2007 @@ -138,7 +138,7 @@ LONG retval; // Here we go DEVMODE DevMode; - ZeroMemory(&DevMode, sizeof(DEVMODE)); + ZeroMemory(&DevMode, sizeof(DEVMODE)); DevMode.dmSize = sizeof(DEVMODE); if (dwHeight)
17 years
1
0
0
0
[cwittich] 31041: zero DEVMODE and setting the correct size before calling ChangeDisplaySettings
by cwittich@svn.reactos.org
Author: cwittich Date: Thu Dec 6 17:46:56 2007 New Revision: 31041 URL:
http://svn.reactos.org/svn/reactos?rev=31041&view=rev
Log: zero DEVMODE and setting the correct size before calling ChangeDisplaySettings Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
============================================================================== --- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c (original) +++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c Thu Dec 6 17:46:56 2007 @@ -41,7 +41,6 @@ { DevMode.dmSize = sizeof(DEVMODE); - DevMode.dmDriverExtra = 0; while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) == TRUE) { @@ -139,7 +138,8 @@ LONG retval; // Here we go DEVMODE DevMode; - DevMode.dmFields = 0; + ZeroMemory(&DevMode, sizeof(DEVMODE)); + DevMode.dmSize = sizeof(DEVMODE); if (dwHeight) DevMode.dmFields |= DM_PELSHEIGHT;
17 years
1
0
0
0
[hpoussin] 31040: Fix small typo
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Dec 6 16:43:47 2007 New Revision: 31040 URL:
http://svn.reactos.org/svn/reactos?rev=31040&view=rev
Log: Fix small typo Modified: trunk/reactos/ntoskrnl/config/cm.h trunk/reactos/ntoskrnl/config/cmkcbncb.c trunk/reactos/ntoskrnl/config/cmsysini.c Modified: trunk/reactos/ntoskrnl/config/cm.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cm.h?rev=3…
============================================================================== --- trunk/reactos/ntoskrnl/config/cm.h (original) +++ trunk/reactos/ntoskrnl/config/cm.h Thu Dec 6 16:43:47 2007 @@ -906,7 +906,7 @@ VOID NTAPI -CmpAcquireTwoKcbLocksExcusiveByKey( +CmpAcquireTwoKcbLocksExclusiveByKey( IN ULONG ConvKey1, IN ULONG ConvKey2 ); Modified: trunk/reactos/ntoskrnl/config/cmkcbncb.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmkcbncb.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmkcbncb.c (original) +++ trunk/reactos/ntoskrnl/config/cmkcbncb.c Thu Dec 6 16:43:47 2007 @@ -660,7 +660,7 @@ if (Parent) { /* Lock the parent KCB and ourselves */ - CmpAcquireTwoKcbLocksExcusiveByKey(ConvKey, Parent->ConvKey); + CmpAcquireTwoKcbLocksExclusiveByKey(ConvKey, Parent->ConvKey); } else { Modified: trunk/reactos/ntoskrnl/config/cmsysini.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/config/cmsysini.c…
============================================================================== --- trunk/reactos/ntoskrnl/config/cmsysini.c (original) +++ trunk/reactos/ntoskrnl/config/cmsysini.c Thu Dec 6 16:43:47 2007 @@ -1595,8 +1595,8 @@ VOID NTAPI -CmpAcquireTwoKcbLocksExcusiveByKey(IN ULONG ConvKey1, - IN ULONG ConvKey2) +CmpAcquireTwoKcbLocksExclusiveByKey(IN ULONG ConvKey1, + IN ULONG ConvKey2) { ULONG Index1, Index2;
17 years
1
0
0
0
[hpoussin] 31039: Define serial port bases only once Formatting, cleanup, code factorization
by hpoussin@svn.reactos.org
Author: hpoussin Date: Thu Dec 6 16:11:21 2007 New Revision: 31039 URL:
http://svn.reactos.org/svn/reactos?rev=31039&view=rev
Log: Define serial port bases only once Formatting, cleanup, code factorization Modified: trunk/reactos/drivers/base/kdcom/kdbg.c Modified: trunk/reactos/drivers/base/kdcom/kdbg.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kdcom/kdbg.c?…
============================================================================== --- trunk/reactos/drivers/base/kdcom/kdbg.c (original) +++ trunk/reactos/drivers/base/kdcom/kdbg.c Thu Dec 6 16:11:21 2007 @@ -1,13 +1,10 @@ -/* $Id: kdbg.c 23670 2006-08-23 17:28:39Z ion $ - * +/* * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS kernel - * FILE: ntoskrnl/hal/x86/kdbg.c + * FILE: drivers/base/kdcom/kdbg.c * PURPOSE: Serial i/o functions for the kernel debugger. - * PROGRAMMER: Emanuele Aliberti - * Eric Kohl - * UPDATE HISTORY: - * Created 05/09/99 + * PROGRAMMER: Alex Ionescu + * Hervé Poussineau */ /* INCLUDES *****************************************************************/ @@ -20,6 +17,7 @@ #include <debug.h> #include "arc/arc.h" #include "windbgkd.h" +#include <kddll.h> typedef struct _KD_PORT_INFORMATION { @@ -28,27 +26,61 @@ ULONG BaseAddress; } KD_PORT_INFORMATION, *PKD_PORT_INFORMATION; +BOOLEAN +NTAPI +KdPortInitializeEx( + IN PKD_PORT_INFORMATION PortInformation, + IN ULONG Unknown1, + IN ULONG Unknown2); + +BOOLEAN +NTAPI +KdPortGetByteEx( + IN PKD_PORT_INFORMATION PortInformation, + OUT PUCHAR ByteReceived); + +BOOLEAN +NTAPI +KdPortPollByteEx( + IN PKD_PORT_INFORMATION PortInformation, + OUT PUCHAR ByteReceived); + +VOID +NTAPI +KdPortPutByteEx( + IN PKD_PORT_INFORMATION PortInformation, + IN UCHAR ByteToSend); + #define DEFAULT_BAUD_RATE 19200 +#ifdef _M_IX86 +const ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8}; +#elif defined(_M_PPC) +const ULONG BaseArray[5] = {0, 0x800003f8}; +#elif defined(_M_MIPS) +const ULONG BaseArray[5] = {0, 0x80006000, 0x80007000}; +#else +#error Unknown architecture +#endif /* MACROS *******************************************************************/ -#define SER_RBR(x) ((x)+0) -#define SER_THR(x) ((x)+0) -#define SER_DLL(x) ((x)+0) -#define SER_IER(x) ((x)+1) +#define SER_RBR(x) ((PUCHAR)(x)+0) +#define SER_THR(x) ((PUCHAR)(x)+0) +#define SER_DLL(x) ((PUCHAR)(x)+0) +#define SER_IER(x) ((PUCHAR)(x)+1) #define SR_IER_ERDA 0x01 #define SR_IER_ETHRE 0x02 #define SR_IER_ERLSI 0x04 #define SR_IER_EMS 0x08 #define SR_IER_ALL 0x0F -#define SER_DLM(x) ((x)+1) -#define SER_IIR(x) ((x)+2) -#define SER_FCR(x) ((x)+2) +#define SER_DLM(x) ((PUCHAR)(x)+1) +#define SER_IIR(x) ((PUCHAR)(x)+2) +#define SER_FCR(x) ((PUCHAR)(x)+2) #define SR_FCR_ENABLE_FIFO 0x01 #define SR_FCR_CLEAR_RCVR 0x02 #define SR_FCR_CLEAR_XMIT 0x04 -#define SER_LCR(x) ((x)+3) +#define SER_LCR(x) ((PUCHAR)(x)+3) #define SR_LCR_CS5 0x00 #define SR_LCR_CS6 0x01 #define SR_LCR_CS7 0x02 @@ -62,28 +94,26 @@ #define SR_LCR_PSP 0x38 #define SR_LCR_BRK 0x40 #define SR_LCR_DLAB 0x80 -#define SER_MCR(x) ((x)+4) +#define SER_MCR(x) ((PUCHAR)(x)+4) #define SR_MCR_DTR 0x01 #define SR_MCR_RTS 0x02 #define SR_MCR_OUT1 0x04 #define SR_MCR_OUT2 0x08 #define SR_MCR_LOOP 0x10 -#define SER_LSR(x) ((x)+5) +#define SER_LSR(x) ((PUCHAR)(x)+5) #define SR_LSR_DR 0x01 #define SR_LSR_TBE 0x20 -#define SER_MSR(x) ((x)+6) +#define SER_MSR(x) ((PUCHAR)(x)+6) #define SR_MSR_CTS 0x10 #define SR_MSR_DSR 0x20 -#define SER_SCR(x) ((x)+7) +#define SER_SCR(x) ((PUCHAR)(x)+7) /* GLOBAL VARIABLES *********************************************************/ /* STATIC VARIABLES *********************************************************/ -static ULONG ComPort = 0; -static ULONG BaudRate = 0; -static PUCHAR PortBase = (PUCHAR)0; +static KD_PORT_INFORMATION DefaultPort = { 0, 0, 0 }; /* The com port must only be initialized once! */ static BOOLEAN PortInitialized = FALSE; @@ -92,468 +122,340 @@ /* STATIC FUNCTIONS *********************************************************/ static BOOLEAN -KdpDoesComPortExist (PUCHAR BaseAddress) -{ - BOOLEAN found; - UCHAR mcr; - UCHAR msr; - - found = FALSE; - - /* save Modem Control Register (MCR) */ - mcr = READ_PORT_UCHAR (SER_MCR(BaseAddress)); - - /* enable loop mode (set Bit 4 of the MCR) */ - WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x10); - - /* clear all modem output bits */ - WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x10); +KdpDoesComPortExist( + IN ULONG BaseAddress) +{ + BOOLEAN found; + UCHAR mcr; + UCHAR msr; + + found = FALSE; + + /* save Modem Control Register (MCR) */ + mcr = READ_PORT_UCHAR(SER_MCR(BaseAddress)); + + /* enable loop mode (set Bit 4 of the MCR) */ + WRITE_PORT_UCHAR(SER_MCR(BaseAddress), SR_MCR_LOOP); + + /* clear all modem output bits */ + WRITE_PORT_UCHAR(SER_MCR(BaseAddress), SR_MCR_LOOP); + + /* read the Modem Status Register */ + msr = READ_PORT_UCHAR(SER_MSR(BaseAddress)); + + /* + * the upper nibble of the MSR (modem output bits) must be + * equal to the lower nibble of the MCR (modem input bits) + */ + if ((msr & 0xF0) == 0x00) + { + /* set all modem output bits */ + WRITE_PORT_UCHAR(SER_MCR(BaseAddress), SR_MCR_DTR | SR_MCR_RTS | SR_MCR_OUT1 | SR_MCR_OUT2 | SR_MCR_LOOP); /* read the Modem Status Register */ - msr = READ_PORT_UCHAR (SER_MSR(BaseAddress)); + msr = READ_PORT_UCHAR(SER_MSR(BaseAddress)); /* * the upper nibble of the MSR (modem output bits) must be * equal to the lower nibble of the MCR (modem input bits) */ - if ((msr & 0xF0) == 0x00) + if ((msr & 0xF0) == 0xF0) { - /* set all modem output bits */ - WRITE_PORT_UCHAR (SER_MCR(BaseAddress), 0x1F); - - /* read the Modem Status Register */ - msr = READ_PORT_UCHAR (SER_MSR(BaseAddress)); - - /* - * the upper nibble of the MSR (modem output bits) must be - * equal to the lower nibble of the MCR (modem input bits) - */ - if ((msr & 0xF0) == 0xF0) + /* + * setup a resonable state for the port: + * enable fifo and clear recieve/transmit buffers + */ + WRITE_PORT_UCHAR(SER_FCR(BaseAddress), + (SR_FCR_ENABLE_FIFO | SR_FCR_CLEAR_RCVR | SR_FCR_CLEAR_XMIT)); + WRITE_PORT_UCHAR(SER_FCR(BaseAddress), 0); + READ_PORT_UCHAR(SER_RBR(BaseAddress)); + WRITE_PORT_UCHAR(SER_IER(BaseAddress), 0); + found = TRUE; + } + } + + /* restore MCR */ + WRITE_PORT_UCHAR(SER_MCR(BaseAddress), mcr); + + return found; +} + + +/* FUNCTIONS ****************************************************************/ + +/* HAL.KdPortInitialize */ +BOOLEAN +NTAPI +KdPortInitialize( + IN PKD_PORT_INFORMATION PortInformation, + IN ULONG Unknown1, + IN ULONG Unknown2) +{ + SIZE_T i; + CHAR buffer[80]; + + if (!PortInitialized) + { + DefaultPort.BaudRate = PortInformation->BaudRate; + + if (PortInformation->ComPort == 0) + { + for (i = sizeof(BaseArray) / sizeof(BaseArray[0]) - 1; i > 0; i--) + { + if (KdpDoesComPortExist(BaseArray[i])) { - /* - * setup a resonable state for the port: - * enable fifo and clear recieve/transmit buffers - */ - WRITE_PORT_UCHAR (SER_FCR(BaseAddress), - (SR_FCR_ENABLE_FIFO | SR_FCR_CLEAR_RCVR | SR_FCR_CLEAR_XMIT)); - WRITE_PORT_UCHAR (SER_FCR(BaseAddress), 0); - READ_PORT_UCHAR (SER_RBR(BaseAddress)); - WRITE_PORT_UCHAR (SER_IER(BaseAddress), 0); - found = TRUE; + DefaultPort.BaseAddress = BaseArray[i]; + DefaultPort.ComPort = i; + PortInformation->BaseAddress = DefaultPort.BaseAddress; + PortInformation->ComPort = DefaultPort.ComPort; + break; } + } + if (i == 0) + { + sprintf(buffer, + "\nKernel Debugger: No COM port found!\n\n"); + HalDisplayString(buffer); + return FALSE; + } } - /* restore MCR */ - WRITE_PORT_UCHAR (SER_MCR(BaseAddress), mcr); - - return (found); -} - - -/* FUNCTIONS ****************************************************************/ - -/* HAL.KdPortInitialize */ -BOOLEAN -STDCALL -KdPortInitialize ( - PKD_PORT_INFORMATION PortInformation, - ULONG Unknown1, - ULONG Unknown2 - ) -{ - ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8}; - char buffer[80]; - ULONG divisor; - UCHAR lcr; - - if (PortInitialized == FALSE) - { - if (PortInformation->BaudRate != 0) - { - BaudRate = PortInformation->BaudRate; - } - else - { - BaudRate = DEFAULT_BAUD_RATE; - } - - if (PortInformation->ComPort == 0) - { - if (KdpDoesComPortExist ((PUCHAR)BaseArray[2])) - { - PortBase = (PUCHAR)BaseArray[2]; - ComPort = 2; - PortInformation->BaseAddress = (ULONG)PortBase; - PortInformation->ComPort = ComPort; + PortInitialized = TRUE; + } + + /* initialize port */ + if (!KdPortInitializeEx(&DefaultPort, Unknown1, Unknown2)) + return FALSE; + + /* set global info */ + *KdComPortInUse = (PUCHAR)DefaultPort.BaseAddress; + + return TRUE; +} + + +/* HAL.KdPortInitializeEx */ +BOOLEAN +NTAPI +KdPortInitializeEx( + IN PKD_PORT_INFORMATION PortInformation, + IN ULONG Unknown1, + IN ULONG Unknown2) +{ + ULONG ComPortBase; + CHAR buffer[80]; + ULONG divisor; + UCHAR lcr; + + if (PortInformation->BaudRate == 0) + PortInformation->BaudRate = DEFAULT_BAUD_RATE; + + if (PortInformation->ComPort == 0) + return FALSE; + + if (!KdpDoesComPortExist(BaseArray[PortInformation->ComPort])) + { + sprintf(buffer, + "\nKernel Debugger: Serial port not found!\n\n"); + HalDisplayString(buffer); + return FALSE; + } + + ComPortBase = BaseArray[PortInformation->ComPort]; + PortInformation->BaseAddress = ComPortBase; #ifndef NDEBUG - sprintf (buffer, - "\nSerial port COM%ld found at 0x%lx\n", - ComPort, - (ULONG)PortBase); - HalDisplayString (buffer); + sprintf(buffer, + "\nSerial port COM%ld found at 0x%lx\n", + PortInformation->ComPort, + ComPortBase]; + HalDisplayString(buffer); #endif /* NDEBUG */ - } - else if (KdpDoesComPortExist ((PUCHAR)BaseArray[1])) - { - PortBase = (PUCHAR)BaseArray[1]; - ComPort = 1; - PortInformation->BaseAddress = (ULONG)PortBase; - PortInformation->ComPort = ComPort; + + /* set baud rate and data format (8N1) */ + + /* turn on DTR and RTS */ + WRITE_PORT_UCHAR(SER_MCR(ComPortBase), SR_MCR_DTR | SR_MCR_RTS); + + /* set DLAB */ + lcr = READ_PORT_UCHAR(SER_LCR(ComPortBase)) | SR_LCR_DLAB; + WRITE_PORT_UCHAR(SER_LCR(ComPortBase), lcr); + + /* set baud rate */ + divisor = 115200 / PortInformation->BaudRate; + WRITE_PORT_UCHAR(SER_DLL(ComPortBase), (UCHAR)(divisor & 0xff)); + WRITE_PORT_UCHAR(SER_DLM(ComPortBase), (UCHAR)((divisor >> 8) & 0xff)); + + /* reset DLAB and set 8N1 format */ + WRITE_PORT_UCHAR(SER_LCR(ComPortBase), + SR_LCR_CS8 | SR_LCR_ST1 | SR_LCR_PNO); + + /* read junk out of the RBR */ + lcr = READ_PORT_UCHAR(SER_RBR(ComPortBase)); + #ifndef NDEBUG - sprintf (buffer, - "\nSerial port COM%ld found at 0x%lx\n", - ComPort, - (ULONG)PortBase); - HalDisplayString (buffer); + /* print message to blue screen */ + sprintf(buffer, + "\nKernel Debugger: COM%ld (Port 0x%lx) BaudRate %ld\n\n", + PortInformation->ComPort, + ComPortBase, + PortInformation->BaudRate); + + HalDisplayString(buffer); #endif /* NDEBUG */ - } - else - { - sprintf (buffer, - "\nKernel Debugger: No COM port found!!!\n\n"); - HalDisplayString (buffer); - return FALSE; - } - } - else - { - if (KdpDoesComPortExist ((PUCHAR)BaseArray[PortInformation->ComPort])) - { - PortBase = (PUCHAR)BaseArray[PortInformation->ComPort]; - ComPort = PortInformation->ComPort; - PortInformation->BaseAddress = (ULONG)PortBase; -#ifndef NDEBUG - sprintf (buffer, - "\nSerial port COM%ld found at 0x%lx\n", - ComPort, - (ULONG)PortBase); - HalDisplayString (buffer); -#endif /* NDEBUG */ - } - else - { - sprintf (buffer, - "\nKernel Debugger: No serial port found!!!\n\n"); - HalDisplayString (buffer); - return FALSE; - } - } - - PortInitialized = TRUE; - } - - /* - * set baud rate and data format (8N1) - */ - - /* turn on DTR and RTS */ - WRITE_PORT_UCHAR (SER_MCR(PortBase), SR_MCR_DTR | SR_MCR_RTS); - - /* set DLAB */ - lcr = READ_PORT_UCHAR (SER_LCR(PortBase)) | SR_LCR_DLAB; - WRITE_PORT_UCHAR (SER_LCR(PortBase), lcr); - - /* set baud rate */ - divisor = 115200 / BaudRate; - WRITE_PORT_UCHAR (SER_DLL(PortBase), (UCHAR)(divisor & 0xff)); - WRITE_PORT_UCHAR (SER_DLM(PortBase), (UCHAR)((divisor >> 8) & 0xff)); - - /* reset DLAB and set 8N1 format */ - WRITE_PORT_UCHAR (SER_LCR(PortBase), - SR_LCR_CS8 | SR_LCR_ST1 | SR_LCR_PNO); - - /* read junk out of the RBR */ - lcr = READ_PORT_UCHAR (SER_RBR(PortBase)); - - /* - * set global info - */ - *KdComPortInUse = PortBase; - - /* - * print message to blue screen - */ - sprintf (buffer, - "\nKernel Debugger: COM%ld (Port 0x%lx) BaudRate %ld\n\n", - ComPort, - (ULONG)PortBase, - BaudRate); - - HalDisplayString (buffer); - + + return TRUE; +} + + +/* HAL.KdPortGetByte */ +BOOLEAN +NTAPI +KdPortGetByte( + OUT PUCHAR ByteReceived) +{ + if (!PortInitialized) + return FALSE; + return KdPortGetByteEx(&DefaultPort, ByteReceived); +} + + +/* HAL.KdPortGetByteEx */ +BOOLEAN +NTAPI +KdPortGetByteEx( + IN PKD_PORT_INFORMATION PortInformation, + OUT PUCHAR ByteReceived) +{ + PUCHAR ComPortBase = (PUCHAR)PortInformation->BaseAddress; + + if ((READ_PORT_UCHAR(SER_LSR(ComPortBase)) & SR_LSR_DR)) + { + *ByteReceived = READ_PORT_UCHAR(SER_RBR(ComPortBase)); return TRUE; -} - - -/* HAL.KdPortInitializeEx */ -BOOLEAN -STDCALL -KdPortInitializeEx ( - PKD_PORT_INFORMATION PortInformation, - ULONG Unknown1, - ULONG Unknown2 - ) -{ -#ifdef _M_IX86 - ULONG BaseArray[5] = {0, 0x3F8, 0x2F8, 0x3E8, 0x2E8}; -#elif defined(_M_PPC) - ULONG BaseArray[5] = {0, 0x800003f8}; -#endif - PUCHAR ComPortBase; - char buffer[80]; - ULONG divisor; - UCHAR lcr; - - if (PortInformation->BaudRate == 0) - { - PortInformation->BaudRate = DEFAULT_BAUD_RATE; - } - - if (PortInformation->ComPort == 0) - { - return FALSE; - } - else - { - if (KdpDoesComPortExist ((PUCHAR)BaseArray[PortInformation->ComPort])) - { - ComPortBase = (PUCHAR)BaseArray[PortInformation->ComPort]; - PortInformation->BaseAddress = (ULONG)ComPortBase; -#ifndef NDEBUG - sprintf (buffer, - "\nSerial port COM%ld found at 0x%lx\n", - PortInformation->ComPort, - (ULONG)ComPortBase]; - HalDisplayString (buffer); -#endif /* NDEBUG */ - } - else - { - sprintf (buffer, - "\nKernel Debugger: Serial port not found!!!\n\n"); - HalDisplayString (buffer); - return FALSE; - } - } - - /* - * set baud rate and data format (8N1) - */ - - /* turn on DTR and RTS */ - WRITE_PORT_UCHAR (SER_MCR(ComPortBase), SR_MCR_DTR | SR_MCR_RTS); - - /* set DLAB */ - lcr = READ_PORT_UCHAR (SER_LCR(ComPortBase)) | SR_LCR_DLAB; - WRITE_PORT_UCHAR (SER_LCR(ComPortBase), lcr); - - /* set baud rate */ - divisor = 115200 / PortInformation->BaudRate; - WRITE_PORT_UCHAR (SER_DLL(ComPortBase), (UCHAR)(divisor & 0xff)); - WRITE_PORT_UCHAR (SER_DLM(ComPortBase), (UCHAR)((divisor >> 8) & 0xff)); - - /* reset DLAB and set 8N1 format */ - WRITE_PORT_UCHAR (SER_LCR(ComPortBase), - SR_LCR_CS8 | SR_LCR_ST1 | SR_LCR_PNO); - - /* read junk out of the RBR */ - lcr = READ_PORT_UCHAR (SER_RBR(ComPortBase)); - -#ifndef NDEBUG - - /* - * print message to blue screen - */ - sprintf (buffer, - "\nKernel Debugger: COM%ld (Port 0x%lx) BaudRate %ld\n\n", - PortInformation->ComPort, - (ULONG)ComPortBase, - PortInformation->BaudRate); - - HalDisplayString (buffer); - -#endif /* NDEBUG */ - - return TRUE; -} - - -/* HAL.KdPortGetByte */ -BOOLEAN -STDCALL -KdPortGetByte ( - PUCHAR ByteRecieved - ) -{ - if (PortInitialized == FALSE) - return FALSE; - - if ((READ_PORT_UCHAR (SER_LSR(PortBase)) & SR_LSR_DR)) - { - *ByteRecieved = READ_PORT_UCHAR (SER_RBR(PortBase)); - return TRUE; - } - - return FALSE; -} - - -/* HAL.KdPortGetByteEx */ -BOOLEAN -STDCALL -KdPortGetByteEx ( - PKD_PORT_INFORMATION PortInformation, - PUCHAR ByteRecieved - ) -{ - PUCHAR ComPortBase = (PUCHAR)PortInformation->BaseAddress; - - if ((READ_PORT_UCHAR (SER_LSR(ComPortBase)) & SR_LSR_DR)) - { - *ByteRecieved = READ_PORT_UCHAR (SER_RBR(ComPortBase)); - return TRUE; - } - - return FALSE; + } + + return FALSE; } /* HAL.KdPortPollByte */ BOOLEAN -STDCALL -KdPortPollByte ( - PUCHAR ByteRecieved - ) -{ - if (PortInitialized == FALSE) - return FALSE; - - while ((READ_PORT_UCHAR (SER_LSR(PortBase)) & SR_LSR_DR) == 0) - ; - - *ByteRecieved = READ_PORT_UCHAR (SER_RBR(PortBase)); - - return TRUE; +NTAPI +KdPortPollByte( + OUT PUCHAR ByteReceived) +{ + if (!PortInitialized) + return FALSE; + return KdPortPollByteEx(&DefaultPort, ByteReceived); } /* HAL.KdPortPollByteEx */ BOOLEAN -STDCALL -KdPortPollByteEx ( - PKD_PORT_INFORMATION PortInformation, - PUCHAR ByteRecieved - ) -{ - PUCHAR ComPortBase = (PUCHAR)PortInformation->BaseAddress; - - while ((READ_PORT_UCHAR (SER_LSR(ComPortBase)) & SR_LSR_DR) == 0) - ; - - *ByteRecieved = READ_PORT_UCHAR (SER_RBR(ComPortBase)); - - return TRUE; -} - - +NTAPI +KdPortPollByteEx( + IN PKD_PORT_INFORMATION PortInformation, + OUT PUCHAR ByteReceived) +{ + PUCHAR ComPortBase = (PUCHAR)PortInformation->BaseAddress; + + while ((READ_PORT_UCHAR(SER_LSR(ComPortBase)) & SR_LSR_DR) == 0) + ; + + *ByteReceived = READ_PORT_UCHAR(SER_RBR(ComPortBase)); + + return TRUE; +} /* HAL.KdPortPutByte */ VOID -STDCALL -KdPortPutByte ( - UCHAR ByteToSend - ) -{ - if (PortInitialized == FALSE) - return; - - while ((READ_PORT_UCHAR (SER_LSR(PortBase)) & SR_LSR_TBE) == 0) - ; - - WRITE_PORT_UCHAR (SER_THR(PortBase), ByteToSend); +NTAPI +KdPortPutByte( + IN UCHAR ByteToSend) +{ + if (!PortInitialized) + return; + KdPortPutByteEx(&DefaultPort, ByteToSend); } /* HAL.KdPortPutByteEx */ VOID -STDCALL -KdPortPutByteEx ( - PKD_PORT_INFORMATION PortInformation, - UCHAR ByteToSend - ) -{ - PUCHAR ComPortBase = (PUCHAR)PortInformation->BaseAddress; - - while ((READ_PORT_UCHAR (SER_LSR(ComPortBase)) & SR_LSR_TBE) == 0) - ; - - WRITE_PORT_UCHAR (SER_THR(ComPortBase), ByteToSend); +NTAPI +KdPortPutByteEx( + IN PKD_PORT_INFORMATION PortInformation, + IN UCHAR ByteToSend) +{ + PUCHAR ComPortBase = (PUCHAR)PortInformation->BaseAddress; + + while ((READ_PORT_UCHAR(SER_LSR(ComPortBase)) & SR_LSR_TBE) == 0) + ; + + WRITE_PORT_UCHAR(SER_THR(ComPortBase), ByteToSend); } /* HAL.KdPortRestore */ VOID -STDCALL -KdPortRestore ( - VOID - ) -{ +NTAPI +KdPortRestore(VOID) +{ + UNIMPLEMENTED; } /* HAL.KdPortSave */ VOID -STDCALL -KdPortSave ( - VOID - ) -{ +NTAPI +KdPortSave(VOID) +{ + UNIMPLEMENTED; } /* HAL.KdPortDisableInterrupts */ BOOLEAN -STDCALL -KdPortDisableInterrupts() -{ - UCHAR ch; - - if (PortInitialized == FALSE) - return FALSE; - - ch = READ_PORT_UCHAR (SER_MCR (PortBase)); - ch &= (~(SR_MCR_OUT1 | SR_MCR_OUT2)); - WRITE_PORT_UCHAR (SER_MCR (PortBase), ch); - - ch = READ_PORT_UCHAR (SER_IER (PortBase)); - ch &= (~SR_IER_ALL); - WRITE_PORT_UCHAR (SER_IER (PortBase), ch); - - return TRUE; +NTAPI +KdPortDisableInterrupts(VOID) +{ + UCHAR ch; + + if (!PortInitialized) + return FALSE; + + ch = READ_PORT_UCHAR(SER_MCR(DefaultPort.BaseAddress)); + ch &= (~(SR_MCR_OUT1 | SR_MCR_OUT2)); + WRITE_PORT_UCHAR(SER_MCR(DefaultPort.BaseAddress), ch); + + ch = READ_PORT_UCHAR(SER_IER(DefaultPort.BaseAddress)); + ch &= (~SR_IER_ALL); + WRITE_PORT_UCHAR(SER_IER(DefaultPort.BaseAddress), ch); + + return TRUE; } /* HAL.KdPortEnableInterrupts */ BOOLEAN -STDCALL -KdPortEnableInterrupts() -{ - UCHAR ch; - - if (PortInitialized == FALSE) - return FALSE; - - ch = READ_PORT_UCHAR (SER_IER (PortBase)); - ch &= (~SR_IER_ALL); - ch |= SR_IER_ERDA; - WRITE_PORT_UCHAR (SER_IER (PortBase), ch); - - ch = READ_PORT_UCHAR (SER_MCR (PortBase)); - ch &= (~SR_MCR_LOOP); - ch |= (SR_MCR_OUT1 | SR_MCR_OUT2); - WRITE_PORT_UCHAR (SER_MCR (PortBase), ch); - - return TRUE; +NTAPI +KdPortEnableInterrupts(VOID) +{ + UCHAR ch; + + if (PortInitialized == FALSE) + return FALSE; + + ch = READ_PORT_UCHAR(SER_IER(DefaultPort.BaseAddress)); + ch &= (~SR_IER_ALL); + ch |= SR_IER_ERDA; + WRITE_PORT_UCHAR(SER_IER(DefaultPort.BaseAddress), ch); + + ch = READ_PORT_UCHAR(SER_MCR(DefaultPort.BaseAddress)); + ch &= (~SR_MCR_LOOP); + ch |= (SR_MCR_OUT1 | SR_MCR_OUT2); + WRITE_PORT_UCHAR(SER_MCR(DefaultPort.BaseAddress), ch); + + return TRUE; } /* @@ -561,10 +463,11 @@ */ NTSTATUS NTAPI -KdDebuggerInitialize0(IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) -{ - /* FIXME: TODO */ - return STATUS_UNSUCCESSFUL; +KdDebuggerInitialize0( + IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } /* @@ -572,10 +475,11 @@ */ NTSTATUS NTAPI -KdDebuggerInitialize1(IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) -{ - /* FIXME: TODO */ - return STATUS_UNSUCCESSFUL; +KdDebuggerInitialize1( + IN PLOADER_PARAMETER_BLOCK LoaderBlock OPTIONAL) +{ + UNIMPLEMENTED; + return STATUS_NOT_IMPLEMENTED; } /* @@ -583,7 +487,8 @@ */ NTSTATUS NTAPI -KdSave(IN BOOLEAN SleepTransition) +KdSave( + IN BOOLEAN SleepTransition) { /* Nothing to do on COM ports */ return STATUS_SUCCESS; @@ -594,7 +499,8 @@ */ NTSTATUS NTAPI -KdRestore(IN BOOLEAN SleepTransition) +KdRestore( + IN BOOLEAN SleepTransition) { /* Nothing to do on COM ports */ return STATUS_SUCCESS; @@ -605,27 +511,29 @@ */ VOID NTAPI -KdSendPacket(IN USHORT PacketType, - IN PSTRING Header, - IN PSTRING Data OPTIONAL, - OUT PKD_CONTEXT Context) -{ - /* FIXME: TODO */ +KdSendPacket( + IN ULONG PacketType, + IN PSTRING MessageHeader, + IN PSTRING MessageData, + IN OUT PKD_CONTEXT Context) +{ + UNIMPLEMENTED; return; } /* * @unimplemented */ -ULONG -NTAPI -KdReceivePacket(IN USHORT PacketType, - OUT PSTRING Header, - OUT PSTRING Data, - OUT PUSHORT DataSize, - OUT PKD_CONTEXT Context OPTIONAL) -{ - /* FIXME: TODO */ +KDSTATUS +NTAPI +KdReceivePacket( + IN ULONG PacketType, + OUT PSTRING MessageHeader, + OUT PSTRING MessageData, + OUT PULONG DataLength, + IN OUT PKD_CONTEXT Context) +{ + UNIMPLEMENTED; return 0; }
17 years
1
0
0
0
← Newer
1
...
46
47
48
49
50
51
52
...
61
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
Results per page:
10
25
50
100
200