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
November 2005
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
27 participants
875 discussions
Start a n
N
ew thread
[gvg] 19702: Auto-register DLLs during 2nd stage setup
by gvg@svn.reactos.com
Auto-register DLLs during 2nd stage setup Modified: trunk/reactos/lib/avifil32/avifil32.xml Modified: trunk/reactos/lib/comctl32/comctl32.xml Modified: trunk/reactos/lib/dinput/dinput.xml Modified: trunk/reactos/lib/dinput8/dinput8.xml Modified: trunk/reactos/lib/dplayx/dplayx.xml Modified: trunk/reactos/lib/dsound/dsound.xml Modified: trunk/reactos/lib/dxdiagn/dxdiagn.xml Modified: trunk/reactos/lib/msi/msi.xml Modified: trunk/reactos/lib/objsel/objsel.xml Modified: trunk/reactos/lib/ole32/ole32.xml Modified: trunk/reactos/lib/oleaut32/oleaut32.xml Modified: trunk/reactos/lib/olepro32/olepro32.xml Modified: trunk/reactos/lib/rpcrt4/rpcrt4.xml Modified: trunk/reactos/lib/shell32/regsvr.c Modified: trunk/reactos/lib/shell32/shell32.xml Modified: trunk/reactos/lib/syssetup/resource.h Modified: trunk/reactos/lib/syssetup/syssetup.xml Modified: trunk/reactos/lib/syssetup/syssetup_Cz.rc Modified: trunk/reactos/lib/syssetup/syssetup_De.rc Modified: trunk/reactos/lib/syssetup/syssetup_En.rc Modified: trunk/reactos/lib/syssetup/syssetup_Fr.rc Modified: trunk/reactos/lib/syssetup/syssetup_Hu.rc Modified: trunk/reactos/lib/syssetup/syssetup_Ja.rc Modified: trunk/reactos/lib/syssetup/syssetup_Nl.rc Modified: trunk/reactos/lib/syssetup/wizard.c Modified: trunk/reactos/lib/wininet/wininet.xml Modified: trunk/reactos/media/inf/syssetup.inf.tpl _____ Modified: trunk/reactos/lib/avifil32/avifil32.xml --- trunk/reactos/lib/avifil32/avifil32.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/avifil32/avifil32.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="avifil32" type="win32dll" baseaddress="${BASEADDRESS_AVIFIL32}" installbase="system32" installname="avifil32.dll"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="avifil32.spec.def" /> <include base="avifil32">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/comctl32/comctl32.xml --- trunk/reactos/lib/comctl32/comctl32.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/comctl32/comctl32.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="comctl32" type="win32dll" baseaddress="${BASEADDRESS_COMCTL32}" installbase="system32" installname="comctl32.dll" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="DllInstall" /> <importlibrary definition="comctl32.spec.def" /> <include base="comctl32">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/dinput/dinput.xml --- trunk/reactos/lib/dinput/dinput.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/dinput/dinput.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="dinput" type="win32dll" baseaddress="${BASEADDRESS_DINPUT}" installbase="system32" installname="dinput.dll" allowwarnings ="true"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="dinput.spec.def" /> <include base="dinput">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/dinput8/dinput8.xml --- trunk/reactos/lib/dinput8/dinput8.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/dinput8/dinput8.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="dinput8" type="win32dll" baseaddress="${BASEADDRESS_DINPUT8}" installbase="system32" installname="dinput8.dll"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="dinput8.spec.def" /> <include base="dinput8">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/dplayx/dplayx.xml --- trunk/reactos/lib/dplayx/dplayx.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/dplayx/dplayx.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="dplayx" type="win32dll" baseaddress="${BASEADDRESS_DPLAYX}" installbase="system32" installname="dplayx.dll" allowwarnings ="true"> + <!-- Won't load correctly in ReactOS yet autoregister infsection="OleControlDlls" type="DllRegisterServer" --> <importlibrary definition="dplayx.spec.def" /> <include base="dplayx">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/dsound/dsound.xml --- trunk/reactos/lib/dsound/dsound.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/dsound/dsound.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="dsound" type="win32dll" baseaddress="${BASEADDRESS_DSOUND}" installbase="system32" installname="dsound.dll" allowwarnings ="true"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="dsound.spec.def" /> <include base="dsound">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/dxdiagn/dxdiagn.xml --- trunk/reactos/lib/dxdiagn/dxdiagn.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/dxdiagn/dxdiagn.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="dxdiagn" type="win32dll" baseaddress="${BASEADDRESS_DXDIAGN}" installbase="system32" installname="dxdiagn.dll" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="dxdiagn.spec.def" /> <include base="dxdiagn">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/msi/msi.xml --- trunk/reactos/lib/msi/msi.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/msi/msi.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="msi" type="win32dll" baseaddress="${BASEADDRESS_MSI}" installbase="system32" installname="msi.dll" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="msi.spec.def" /> <include base="msi">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/objsel/objsel.xml --- trunk/reactos/lib/objsel/objsel.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/objsel/objsel.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="objsel" type="win32dll" baseaddress="${BASEADDRESS_OBJSEL}" installbase="system32" installname="objsel.dll"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="objsel.spec.def" /> <include base="objsel">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/ole32/ole32.xml --- trunk/reactos/lib/ole32/ole32.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/ole32/ole32.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="ole32" type="win32dll" baseaddress="${BASEADDRESS_OLE32}" installbase="system32" installname="ole32.dll" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="ole32.spec.def" /> <include base="ole32">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/oleaut32/oleaut32.xml --- trunk/reactos/lib/oleaut32/oleaut32.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/oleaut32/oleaut32.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="oleaut32" type="win32dll" baseaddress="${BASEADDRESS_OLEAUT32}" installbase="system32" installname="oleaut32.dll" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="oleaut32.spec.def" /> <include base="oleaut32">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/olepro32/olepro32.xml --- trunk/reactos/lib/olepro32/olepro32.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/olepro32/olepro32.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="olepro32" type="win32dll" baseaddress="${BASEADDRESS_OLEPRO32}" installbase="system32" installname="olepro32.dll"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="olepro32.spec.def" /> <include base="olepro32">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/rpcrt4/rpcrt4.xml --- trunk/reactos/lib/rpcrt4/rpcrt4.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/rpcrt4/rpcrt4.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="rpcrt4" type="win32dll" baseaddress="${BASEADDRESS_RPCRT4}" installbase="system32" installname="rpcrt4.dll" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="DllRegisterServer" /> <importlibrary definition="rpcrt4.spec.def" /> <include base="rpcrt4">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/shell32/regsvr.c --- trunk/reactos/lib/shell32/regsvr.c 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/shell32/regsvr.c 2005-11-27 22:27:35 UTC (rev 19702) @@ -642,11 +642,13 @@ static const WCHAR wszMyDocuments[] = { 'M','y',' ','D','o','c','u','m','e','n','t','s', 0 }; static struct regsvr_namespace const namespace_extensions_list[] = { +#if 0 { &CLSID_MyDocuments, wszDesktop, wszMyDocuments }, +#endif { NULL } }; _____ Modified: trunk/reactos/lib/shell32/shell32.xml --- trunk/reactos/lib/shell32/shell32.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/shell32/shell32.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="shell32" type="win32dll" baseaddress="${BASEADDRESS_SHELL32}" installbase="system32" installname="shell32.dll" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="Both" /> <importlibrary definition="shell32.spec.def" /> <include base="shell32">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/lib/syssetup/resource.h --- trunk/reactos/lib/syssetup/resource.h 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/syssetup/resource.h 2005-11-27 22:27:35 UTC (rev 19702) @@ -53,7 +53,9 @@ #define IDC_AUTODAYLIGHT 1054 #define IDD_PROCESSPAGE 1060 -#define IDC_PROCESSPROGRESS 1061 +#define IDC_ACTIVITY 1061 +#define IDC_ITEM 1062 +#define IDC_PROCESSPROGRESS 1063 #define IDD_FINISHPAGE 1070 #define IDC_FINISHTITLE 1071 @@ -94,6 +96,16 @@ #define IDS_CMT_SOLITAIRE 3216 #define IDS_CMT_WINEMINE 3217 +#define IDS_REACTOS_SETUP 3300 +#define IDS_UNKNOWN_ERROR 3301 +#define IDS_REGISTERING_COMPONENTS 3302 +#define IDS_LOADLIBRARY_FAILED 3303 +#define IDS_GETPROCADDR_FAILED 3304 +#define IDS_REGSVR_FAILED 3305 +#define IDS_DLLINSTALL_FAILED 3306 +#define IDS_TIMEOUT 3307 +#define IDS_REASON_UNKNOWN 3308 + #define IDR_GPL 4000 #endif /* RESOURCE_H */ _____ Modified: trunk/reactos/lib/syssetup/syssetup.xml --- trunk/reactos/lib/syssetup/syssetup.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/syssetup/syssetup.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -6,6 +6,7 @@ <define name="_UNICODE" /> <define name="_WIN32_IE">0x0600</define> <define name="_WIN32_WINNT">0x0501</define> + <define name="_SETUPAPI_VER">0x0501</define> <library>uuid</library> <library>ntdll</library> <library>kernel32</library> _____ Modified: trunk/reactos/lib/syssetup/syssetup_Cz.rc --- trunk/reactos/lib/syssetup/syssetup_Cz.rc 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/syssetup/syssetup_Cz.rc 2005-11-27 22:27:35 UTC (rev 19702) @@ -130,8 +130,8 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Some text...", IDC_STATIC, 53, 7, 253, 20 - LTEXT "Some more text...", IDC_STATIC, 53, 29, 253, 20 + LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 + LTEXT "", IDC_ITEM, 53, 29, 253, 20 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 END _____ Modified: trunk/reactos/lib/syssetup/syssetup_De.rc --- trunk/reactos/lib/syssetup/syssetup_De.rc 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/syssetup/syssetup_De.rc 2005-11-27 22:27:35 UTC (rev 19702) @@ -132,8 +132,8 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Some text...", IDC_STATIC, 53, 7, 253, 20 - LTEXT "Some more text...", IDC_STATIC, 53, 29, 253, 20 + LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 + LTEXT "", IDC_ITEM, 53, 29, 253, 20 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 END _____ Modified: trunk/reactos/lib/syssetup/syssetup_En.rc --- trunk/reactos/lib/syssetup/syssetup_En.rc 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/syssetup/syssetup_En.rc 2005-11-27 22:27:35 UTC (rev 19702) @@ -132,8 +132,8 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Some text...", IDC_STATIC, 53, 7, 253, 20 - LTEXT "Some more text...", IDC_STATIC, 53, 29, 253, 20 + LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 + LTEXT "", IDC_ITEM, 53, 29, 253, 20 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 END @@ -198,5 +198,17 @@ IDS_CMT_WINEMINE "WineMine" END +STRINGTABLE +BEGIN + IDS_REACTOS_SETUP "ReactOS Setup" + IDS_UNKNOWN_ERROR "Unknown error" + IDS_REGISTERING_COMPONENTS "Registering components..." + IDS_LOADLIBRARY_FAILED "LoadLibrary failed: " + IDS_GETPROCADDR_FAILED "GetProcAddr failed: " + IDS_REGSVR_FAILED "DllRegisterServer failed: " + IDS_DLLINSTALL_FAILED "DllInstall failed: " + IDS_TIMEOUT "Timeout during registration" + IDS_REASON_UNKNOWN "" +END /* EOF */ _____ Modified: trunk/reactos/lib/syssetup/syssetup_Fr.rc --- trunk/reactos/lib/syssetup/syssetup_Fr.rc 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/syssetup/syssetup_Fr.rc 2005-11-27 22:27:35 UTC (rev 19702) @@ -133,8 +133,8 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Some text...", IDC_STATIC, 53, 7, 253, 20 - LTEXT "Some more text...", IDC_STATIC, 53, 29, 253, 20 + LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 + LTEXT "", IDC_ITEM, 53, 29, 253, 20 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 END _____ Modified: trunk/reactos/lib/syssetup/syssetup_Hu.rc --- trunk/reactos/lib/syssetup/syssetup_Hu.rc 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/syssetup/syssetup_Hu.rc 2005-11-27 22:27:35 UTC (rev 19702) @@ -126,8 +126,8 @@ CAPTION "ReactOS TelepÝt§" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Some text...", IDC_STATIC, 53, 7, 253, 20 - LTEXT "Some more text...", IDC_STATIC, 53, 29, 253, 20 + LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 + LTEXT "", IDC_ITEM, 53, 29, 253, 20 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 END _____ Modified: trunk/reactos/lib/syssetup/syssetup_Ja.rc --- trunk/reactos/lib/syssetup/syssetup_Ja.rc 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/syssetup/syssetup_Ja.rc 2005-11-27 22:27:35 UTC (rev 19702) @@ -132,8 +132,8 @@ CAPTION "ReactOS âZâbâgâAâbâv" FONT 9, "MS UI Gothic" BEGIN - LTEXT "Some text...", IDC_STATIC, 53, 7, 253, 20 - LTEXT "Some more text...", IDC_STATIC, 53, 29, 253, 20 + LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 + LTEXT "", IDC_ITEM, 53, 29, 253, 20 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 END _____ Modified: trunk/reactos/lib/syssetup/syssetup_Nl.rc --- trunk/reactos/lib/syssetup/syssetup_Nl.rc 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/syssetup/syssetup_Nl.rc 2005-11-27 22:27:35 UTC (rev 19702) @@ -27,7 +27,7 @@ BEGIN LTEXT "Welkom bij de Reactos installatiewizard.", IDC_WELCOMETITLE, 115, 8, 195, 24 LTEXT "Deze wizard zal Reactos op je computer installeren. De wizard "\ - "heeft informatie over u en uw computer nodig "\ + "heeft informatie over jou en jouw computer nodig "\ "om Reactos correct in te stellen.", IDC_STATIC, 115, 40, 195, 100 LTEXT "Klik op Volgende om voort te gaan met de installatie.", IDC_STATIC, 115, 169, 195, 17 END @@ -132,8 +132,8 @@ CAPTION "ReactOS Setup" FONT 8, "MS Shell Dlg" BEGIN - LTEXT "Some text...", IDC_STATIC, 53, 7, 253, 20 - LTEXT "Some more text...", IDC_STATIC, 53, 29, 253, 20 + LTEXT "", IDC_ACTIVITY, 53, 7, 253, 20 + LTEXT "", IDC_ITEM, 53, 29, 253, 20 CONTROL "", IDC_PROCESSPROGRESS, "msctls_progress32", PBS_SMOOTH | WS_CHILD | WS_VISIBLE | WS_BORDER, 53, 70, 253, 8 END _____ Modified: trunk/reactos/lib/syssetup/wizard.c --- trunk/reactos/lib/syssetup/wizard.c 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/syssetup/wizard.c 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,45 +1,55 @@ /* - * ReactOS kernel - * Copyright (C) 2004 ReactOS Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * PROJECT: System setup + * LICENSE: GPL - See COPYING in the top level directory + * PROGRAMMER: Eric Kohl */ -/* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS system libraries - * PURPOSE: System setup - * FILE: lib/syssetup/wizard.c - * PROGRAMER: Eric Kohl - */ /* INCLUDES *****************************************************************/ +#include <ntstatus.h> +#define WIN32_NO_STATUS #include <windows.h> #include <windowsx.h> #include <commctrl.h> #include <tchar.h> #include <string.h> #include <setupapi.h> +#define NTOS_MODE_USER +#include <ndk/ntndk.h> #include <syssetup/syssetup.h> +#define NDEBUG +#include <debug.h> + #include "globals.h" #include "resource.h" #define VMWINST +#define PM_REGISTRATION_NOTIFY (WM_APP + 1) + /* Private Message used to communicate progress from the background + registration thread to the main thread. + wParam = 0 Registration in progress + = 1 Registration completed + lParam = Pointer to a REGISTRATIONNOTIFY structure */ + +typedef struct _REGISTRATIONNOTIFY +{ + ULONG Progress; + UINT ActivityID; + LPCWSTR CurrentItem; + LPCWSTR ErrorMessage; +} REGISTRATIONNOTIFY, *PREGISTRATIONNOTIFY; + +typedef struct _REGISTRATIONDATA +{ + HWND hwndDlg; + ULONG DllCount; + ULONG Registered; + PVOID DefaultContext; +} REGISTRATIONDATA, *PREGISTRATIONDATA; + /* GLOBALS ******************************************************************/ static SETUPDATA SetupData; @@ -1292,6 +1302,248 @@ } +static UINT CALLBACK +RegistrationNotificationProc(PVOID Context, + UINT Notification, + UINT_PTR Param1, + UINT_PTR Param2) +{ + PREGISTRATIONDATA RegistrationData; + REGISTRATIONNOTIFY RegistrationNotify; + PSP_REGISTER_CONTROL_STATUSW StatusInfo; + UINT MessageID; + WCHAR ErrorMessage[128]; + + RegistrationData = (PREGISTRATIONDATA) Context; + + if (SPFILENOTIFY_STARTREGISTRATION == Notification || + SPFILENOTIFY_ENDREGISTRATION == Notification) + { + StatusInfo = (PSP_REGISTER_CONTROL_STATUSW) Param1; + RegistrationNotify.CurrentItem = wcsrchr(StatusInfo->FileName, L'\\'); + if (NULL == RegistrationNotify.CurrentItem) + { + RegistrationNotify.CurrentItem = StatusInfo->FileName; + } + else + { + RegistrationNotify.CurrentItem++; + } + + if (SPFILENOTIFY_STARTREGISTRATION == Notification) + { + DPRINT("Received SPFILENOTIFY_STARTREGISTRATION notification for %S\n", + StatusInfo->FileName); + RegistrationNotify.ErrorMessage = NULL; + RegistrationNotify.Progress = RegistrationData->Registered; + } + else + { + DPRINT("Received SPFILENOTIFY_ENDREGISTRATION notification for %S\n", + StatusInfo->FileName); + DPRINT("Win32Error %u FailureCode %u\n", StatusInfo->Win32Error, + StatusInfo->FailureCode); + if (SPREG_SUCCESS != StatusInfo->FailureCode) + { + switch(StatusInfo->FailureCode) + { + case SPREG_LOADLIBRARY: + MessageID = IDS_LOADLIBRARY_FAILED; + break; + case SPREG_GETPROCADDR: + MessageID = IDS_GETPROCADDR_FAILED; + break; + case SPREG_REGSVR: + MessageID = IDS_REGSVR_FAILED; + break; + case SPREG_DLLINSTALL: + MessageID = IDS_DLLINSTALL_FAILED; + break; + case SPREG_TIMEOUT: + MessageID = IDS_TIMEOUT; + break; + default: + MessageID = IDS_REASON_UNKNOWN; + break; + } + if (0 == LoadStringW(hDllInstance, MessageID, + ErrorMessage, + sizeof(ErrorMessage) / + sizeof(ErrorMessage[0]))) + { + ErrorMessage[0] = L'\0'; + } + if (SPREG_TIMEOUT != StatusInfo->FailureCode) + { + FormatMessageW(FORMAT_MESSAGE_FROM_SYSTEM, NULL, + StatusInfo->Win32Error, 0, + ErrorMessage + wcslen(ErrorMessage), + sizeof(ErrorMessage) / sizeof(ErrorMessage[0]) - + wcslen(ErrorMessage), NULL); + } + RegistrationNotify.ErrorMessage = ErrorMessage; + } + else + { + RegistrationNotify.ErrorMessage = NULL; + } + if (RegistrationData->Registered < RegistrationData->DllCount) + { + RegistrationData->Registered++; + } + } + + RegistrationNotify.Progress = RegistrationData->Registered; + RegistrationNotify.ActivityID = IDS_REGISTERING_COMPONENTS; + SendMessage(RegistrationData->hwndDlg, PM_REGISTRATION_NOTIFY, + 0, (LPARAM) &RegistrationNotify); + + return FILEOP_DOIT; + } + else + { + DPRINT1("Received unexpected notification %u\n", Notification); + return SetupDefaultQueueCallback(RegistrationData->DefaultContext, + Notification, Param1, Param2); + } +} + + +static DWORD CALLBACK +RegistrationProc(LPVOID Parameter) +{ + PREGISTRATIONDATA RegistrationData; + REGISTRATIONNOTIFY RegistrationNotify; + DWORD LastError; + WCHAR UnknownError[84]; + + RegistrationData = (PREGISTRATIONDATA) Parameter; + RegistrationData->Registered = 0; + RegistrationData->DefaultContext = SetupInitDefaultQueueCallback(RegistrationData->hwndDlg); + + if (SetupInstallFromInfSectionW(GetParent(RegistrationData->hwndDlg), + hSysSetupInf, + L"RegistrationPhase2", + SPINST_REGISTRY | + SPINST_REGISTERCALLBACKAWARE | + SPINST_REGSVR, + 0, + NULL, + 0, + RegistrationNotificationProc, + RegistrationData, + NULL, + NULL)) + { + RegistrationNotify.ErrorMessage = NULL; + } + else + { + LastError = GetLastError(); + DPRINT1("SetupInstallFromInfSection failed with error %u\n", + LastError); + if (0 == FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | + FORMAT_MESSAGE_FROM_SYSTEM, NULL, LastError, 0, + (LPWSTR) &RegistrationNotify.ErrorMessage, 0, + NULL)) + { + if (0 == LoadStringW(hDllInstance, IDS_UNKNOWN_ERROR, + UnknownError, + sizeof(UnknownError) / sizeof(UnknownError[0] - + 20))) + { + wcscpy(UnknownError, L"Unknown error"); + } + wcscat(UnknownError, L" "); + _ultow(LastError, UnknownError + wcslen(UnknownError), 10); + RegistrationNotify.ErrorMessage = UnknownError; + } + } + + RegistrationNotify.Progress = RegistrationData->DllCount; + RegistrationNotify.ActivityID = IDS_REGISTERING_COMPONENTS; + RegistrationNotify.CurrentItem = NULL; + SendMessage(RegistrationData->hwndDlg, PM_REGISTRATION_NOTIFY, + 1, (LPARAM) &RegistrationNotify); + if (NULL != RegistrationNotify.ErrorMessage && + UnknownError != RegistrationNotify.ErrorMessage) + { + LocalFree((PVOID) RegistrationNotify.ErrorMessage); + } + + SetupTermDefaultQueueCallback(RegistrationData->DefaultContext); + HeapFree(GetProcessHeap(), 0, RegistrationData); + + return 0; +} + + +static BOOL +StartComponentRegistration(HWND hwndDlg, PULONG MaxProgress) +{ + HANDLE RegistrationThread; + LONG DllCount; + INFCONTEXT Context; + WCHAR SectionName[512]; + PREGISTRATIONDATA RegistrationData; + + DllCount = -1; + if (! SetupFindFirstLineW(hSysSetupInf, L"RegistrationPhase2", + L"RegisterDlls", &Context)) + { + DPRINT1("No RegistrationPhase2 section found\n"); + return FALSE; + } + if (! SetupGetStringFieldW(&Context, 1, SectionName, + sizeof(SectionName) / sizeof(SectionName[0]), + NULL)) + { + DPRINT1("Unable to retrieve section name\n"); + return FALSE; + } + DllCount = SetupGetLineCountW(hSysSetupInf, SectionName); + DPRINT("SectionName %S DllCount %ld\n", SectionName, DllCount); + if (DllCount < 0) + { + SetLastError(STATUS_NOT_FOUND); + return FALSE; + } + + *MaxProgress = (ULONG) DllCount; + + /* + * Create a background thread to do the actual registrations, so the + * main thread can just run its message loop. + */ + RegistrationThread = NULL; + RegistrationData = HeapAlloc(GetProcessHeap(), 0, + sizeof(REGISTRATIONDATA)); + if (NULL != RegistrationData) + { + RegistrationData->hwndDlg = hwndDlg; + RegistrationData->DllCount = DllCount; + RegistrationThread = CreateThread(NULL, 0, RegistrationProc, + (LPVOID) RegistrationData, 0, NULL); + if (NULL != RegistrationThread) + { + CloseHandle(RegistrationThread); + } + else + { + DPRINT1("CreateThread failed, error %u\n", GetLastError()); + return FALSE; + } + } + else + { + DPRINT1("HeapAlloc() failed, error %u\n", GetLastError()); + return FALSE; + } + + return TRUE; +} + + static INT_PTR CALLBACK ProcessPageDlgProc(HWND hwndDlg, UINT uMsg, @@ -1299,6 +1551,8 @@ LPARAM lParam) { PSETUPDATA SetupData; + PREGISTRATIONNOTIFY RegistrationNotify; + WCHAR Title[64]; /* Retrieve pointer to the global setup data */ SetupData = (PSETUPDATA)GetWindowLongPtr (hwndDlg, GWL_USERDATA); @@ -1313,39 +1567,10 @@ } break; - case WM_TIMER: - { - INT Position; - HWND hWndProgress; - - hWndProgress = GetDlgItem(hwndDlg, IDC_PROCESSPROGRESS); - Position = SendMessage(hWndProgress, PBM_GETPOS, 0, 0); - if (Position == 2) - { - KillTimer(hwndDlg, 1); - - /* Enable the Back and Next buttons */ - PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT); - PropSheet_PressButton(GetParent(hwndDlg), PSBTN_NEXT); - } - else - { -#ifdef VMWINST - if (Position == 1) - { - KillTimer(hwndDlg, 1); - RunVMWInstall(GetParent(hwndDlg)); - SetTimer(hwndDlg, 1, 50, NULL); - } -#endif - SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0); - } - } - return TRUE; - case WM_NOTIFY: { LPNMHDR lpnm = (LPNMHDR)lParam; + ULONG MaxProgress; switch (lpnm->code) { @@ -1353,9 +1578,12 @@ /* Disable the Back and Next buttons */ PropSheet_SetWizButtons(GetParent(hwndDlg), 0); - SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETRANGE, 0, - MAKELPARAM(0, 2)); - SetTimer(hwndDlg, 1, 50, NULL); + StartComponentRegistration(hwndDlg, &MaxProgress); + + SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETRANGE, + 0, MAKELPARAM(0, MaxProgress)); + SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETPOS, + 0, 0); break; case PSN_WIZNEXT: @@ -1367,6 +1595,47 @@ } break; + case PM_REGISTRATION_NOTIFY: + { + WCHAR Activity[64]; + RegistrationNotify = (PREGISTRATIONNOTIFY) lParam; + if (0 != LoadStringW(hDllInstance, RegistrationNotify->ActivityID, + Activity, + sizeof(Activity) / sizeof(Activity[0]))) + { + SendDlgItemMessageW(hwndDlg, IDC_ACTIVITY, WM_SETTEXT, + 0, (LPARAM) Activity); + } + SendDlgItemMessageW(hwndDlg, IDC_ITEM, WM_SETTEXT, 0, + (LPARAM)(NULL == RegistrationNotify->CurrentItem ? + L"" : RegistrationNotify->CurrentItem)); + SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETPOS, + RegistrationNotify->Progress, 0); + if (NULL != RegistrationNotify->ErrorMessage) + { + if (0 == LoadStringW(hDllInstance, IDS_REACTOS_SETUP, + Title, sizeof(Title) / sizeof(Title[0]))) + { + wcscpy(Title, L"ReactOS Setup"); + } + MessageBoxW(hwndDlg, RegistrationNotify->ErrorMessage, + Title, MB_ICONERROR | MB_OK); + + } + + if (wParam) + { +#ifdef VMWINST + RunVMWInstall(GetParent(hwndDlg)); +#endif + + /* Enable the Back and Next buttons */ + PropSheet_SetWizButtons(GetParent(hwndDlg), PSWIZB_NEXT); + PropSheet_PressButton(GetParent(hwndDlg), PSBTN_NEXT); + } + } + return TRUE; + default: break; } _____ Modified: trunk/reactos/lib/wininet/wininet.xml --- trunk/reactos/lib/wininet/wininet.xml 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/lib/wininet/wininet.xml 2005-11-27 22:27:35 UTC (rev 19702) @@ -1,4 +1,5 @@ <module name="wininet" type="win32dll" baseaddress="${BASEADDRESS_WININET}" installbase="system32" installname="wininet.dll" allowwarnings="true"> + <autoregister infsection="OleControlDlls" type="DllInstall" /> <importlibrary definition="wininet.spec.def" /> <include base="wininet">.</include> <include base="ReactOS">include/wine</include> _____ Modified: trunk/reactos/media/inf/syssetup.inf.tpl --- trunk/reactos/media/inf/syssetup.inf.tpl 2005-11-27 22:13:00 UTC (rev 19701) +++ trunk/reactos/media/inf/syssetup.inf.tpl 2005-11-27 22:27:35 UTC (rev 19702) @@ -23,4 +23,7 @@ NET_NIC.inf ports.inf scsi.inf -usbport.inf \ No newline at end of file +usbport.inf + +[RegistrationPhase2] +RegisterDlls=OleControlDlls
19 years
1
0
0
0
[hpoussin] 19701: Keep remote machine name in device info set. Use it when needed
by hpoussin@svn.reactos.com
Keep remote machine name in device info set. Use it when needed Modified: trunk/reactos/lib/setupapi/devinst.c Modified: trunk/reactos/lib/setupapi/setupapi_private.h _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-11-27 21:31:35 UTC (rev 19700) +++ trunk/reactos/lib/setupapi/devinst.c 2005-11-27 22:13:00 UTC (rev 19701) @@ -632,6 +632,7 @@ { struct DeviceInfoSet *list; LPWSTR UNCServerName = NULL; + DWORD size; DWORD rc; //CONFIGRET cr; HDEVINFO ret = (HDEVINFO)INVALID_HANDLE_VALUE;; @@ -639,7 +640,10 @@ TRACE("%s %p %s %p\n", debugstr_guid(ClassGuid), hwndParent, debugstr_w(MachineName), Reserved); - list = HeapAlloc(GetProcessHeap(), 0, sizeof(struct DeviceInfoSet)); + size = sizeof(struct DeviceInfoSet); + if (MachineName) + size += (wcslen(MachineName) + 3) * sizeof(WCHAR); + list = HeapAlloc(GetProcessHeap(), 0, size); if (!list) { SetLastError(ERROR_NOT_ENOUGH_MEMORY); @@ -671,6 +675,9 @@ } strcpyW(UNCServerName + 2, MachineName); + list->szData[0] = list->szData[1] = '\\'; + strcpyW(list->szData + 2, MachineName); + list->MachineName = list->szData; } else { @@ -684,6 +691,7 @@ } if (!GetComputerNameW(UNCServerName + 2, &Size)) goto cleanup; + list->MachineName = NULL; } #if 0 UNCServerName[0] = UNCServerName[1] = '\\'; @@ -3336,7 +3344,10 @@ &list->ClassGuid, sizeof(GUID)); DeviceInfoListDetailData->RemoteMachineHandle = list->hMachine; - DeviceInfoListDetailData->RemoteMachineName[0] = 0; /* FIXME */ + if (list->MachineName) + strcpyW(DeviceInfoListDetailData->RemoteMachineName, list->MachineName + 2); + else + DeviceInfoListDetailData->RemoteMachineName[0] = 0; ret = TRUE; } @@ -3639,8 +3650,8 @@ hKey = SetupDiOpenDevRegKey(DeviceInfoSet, DeviceInfoData, DICS_FLAG_GLOBAL, 0, DIREG_DRV, KEY_QUERY_VALUE); else { - /* FIXME: what if DeviceInfoSet is a remote device info set? */ - hKey = SetupDiOpenClassRegKey(&list->ClassGuid, KEY_QUERY_VALUE); + hKey = SetupDiOpenClassRegKeyExW(&list->ClassGuid, KEY_QUERY_VALUE, + DIOCR_INSTALLER, list->MachineName + 2, NULL); } if (hKey == INVALID_HANDLE_VALUE) goto cleanup; _____ Modified: trunk/reactos/lib/setupapi/setupapi_private.h --- trunk/reactos/lib/setupapi/setupapi_private.h 2005-11-27 21:31:35 UTC (rev 19700) +++ trunk/reactos/lib/setupapi/setupapi_private.h 2005-11-27 22:13:00 UTC (rev 19701) @@ -144,6 +144,12 @@ LIST_ENTRY DriverListHead; /* List of struct DriverInfoElement */ LIST_ENTRY ListHead; /* List of struct DeviceInfoElement */ + + /* Contains the name of the remote computer ('\\COMPUTERNAME' for example), + * or NULL if related to local machine. Points into szData field at the + * end of the structure */ + PCWSTR MachineName; + WCHAR szData[0]; }; extern HINSTANCE hInstance;
19 years
1
0
0
0
[turner] 19700: Structure member name changes. Alex just told me what to do. ; )
by turner@svn.reactos.com
Structure member name changes. Alex just told me what to do. ;) Modified: trunk/reactos/ntoskrnl/kdbg/kdb.c Modified: trunk/reactos/ntoskrnl/kdbg/kdb_cli.c Modified: trunk/reactos/ntoskrnl/kdbg/kdb_expr.c _____ Modified: trunk/reactos/ntoskrnl/kdbg/kdb.c --- trunk/reactos/ntoskrnl/kdbg/kdb.c 2005-11-27 21:00:09 UTC (rev 19699) +++ trunk/reactos/ntoskrnl/kdbg/kdb.c 2005-11-27 21:31:35 UTC (rev 19700) @@ -128,9 +128,9 @@ KdbpTrapFrameToKdbTrapFrame(PKTRAP_FRAME TrapFrame, PKDB_KTRAP_FRAME KdbTrapFrame) { /* Copy the TrapFrame only up to Eflags and zero the rest*/ - RtlCopyMemory(&KdbTrapFrame->Tf, TrapFrame, FIELD_OFFSET(KTRAP_FRAME, Esp)); - RtlZeroMemory((PVOID)((ULONG_PTR)&KdbTrapFrame->Tf + FIELD_OFFSET(KTRAP_FRAME, Esp)), - sizeof (KTRAP_FRAME) - FIELD_OFFSET(KTRAP_FRAME, Esp)); + RtlCopyMemory(&KdbTrapFrame->Tf, TrapFrame, FIELD_OFFSET(KTRAP_FRAME, HardwareEsp)); + RtlZeroMemory((PVOID)((ULONG_PTR)&KdbTrapFrame->Tf + FIELD_OFFSET(KTRAP_FRAME, HardwareEsp)), + sizeof (KTRAP_FRAME) - FIELD_OFFSET(KTRAP_FRAME, HardwareEsp)); asm volatile( "movl %%cr0, %0" "\n\t" "movl %%cr2, %1" "\n\t" @@ -139,8 +139,8 @@ : "=r"(KdbTrapFrame->Cr0), "=r"(KdbTrapFrame->Cr2), "=r"(KdbTrapFrame->Cr3), "=r"(KdbTrapFrame->Cr4)); - KdbTrapFrame->Tf.Esp = KiEspFromTrapFrame(TrapFrame); - KdbTrapFrame->Tf.Ss = (USHORT)(KiSsFromTrapFrame(TrapFrame) & 0xFFFF); + KdbTrapFrame->Tf.HardwareEsp = KiEspFromTrapFrame(TrapFrame); + KdbTrapFrame->Tf.HardwareSegSs = (USHORT)(KiSsFromTrapFrame(TrapFrame) & 0xFFFF); /* FIXME: copy v86 registers if TrapFrame is a V86 trapframe */ @@ -150,12 +150,12 @@ KdbpKdbTrapFrameToTrapFrame(PKDB_KTRAP_FRAME KdbTrapFrame, PKTRAP_FRAME TrapFrame) { /* Copy the TrapFrame only up to Eflags and zero the rest*/ - RtlCopyMemory(TrapFrame, &KdbTrapFrame->Tf, FIELD_OFFSET(KTRAP_FRAME, Esp)); + RtlCopyMemory(TrapFrame, &KdbTrapFrame->Tf, FIELD_OFFSET(KTRAP_FRAME, HardwareEsp)); /* FIXME: write cr0, cr2, cr3 and cr4 (not needed atm) */ - KiSsToTrapFrame(TrapFrame, KdbTrapFrame->Tf.Ss); - KiEspToTrapFrame(TrapFrame, KdbTrapFrame->Tf.Esp); + KiSsToTrapFrame(TrapFrame, KdbTrapFrame->Tf.HardwareSegSs); + KiEspToTrapFrame(TrapFrame, KdbTrapFrame->Tf.HardwareEsp); /* FIXME: copy v86 registers if TrapFrame is a V86 trapframe */ } @@ -330,7 +330,7 @@ IntVect = 3; else if (Mem[0] == 0xcd) IntVect = Mem[1]; - else if (Mem[0] == 0xce && KdbCurrentTrapFrame->Tf.Eflags & (1<<11)) /* 1 << 11 is the overflow flag */ + else if (Mem[0] == 0xce && KdbCurrentTrapFrame->Tf.EFlags & (1<<11)) /* 1 << 11 is the overflow flag */ IntVect = 4; else return FALSE; @@ -1177,7 +1177,7 @@ IN OUT PKTRAP_FRAME TrapFrame, IN BOOLEAN FirstChance) { - ULONG ExpNr = (ULONG)TrapFrame->DebugArgMark; + ULONG ExpNr = (ULONG)TrapFrame->DbgArgMark; KDB_ENTER_CONDITION EnterCondition; KD_CONTINUE_TYPE ContinueType = kdHandleException; PKDB_BREAKPOINT BreakPoint; @@ -1245,7 +1245,7 @@ else if (BreakPoint->Type == KdbBreakPointTemporary && BreakPoint->Process == KdbCurrentProcess) { - ASSERT((TrapFrame->Eflags & X86_EFLAGS_TF) == 0); + ASSERT((TrapFrame->EFlags & X86_EFLAGS_TF) == 0); /* * Delete the temporary breakpoint which was used to step over or into the instruction. @@ -1257,7 +1257,7 @@ if ((KdbSingleStepOver && !KdbpStepOverInstruction(TrapFrame->Eip)) || (!KdbSingleStepOver && !KdbpStepIntoInstruction(TrapFrame->Eip))) { - TrapFrame->Eflags |= X86_EFLAGS_TF; + TrapFrame->EFlags |= X86_EFLAGS_TF; } goto continue_execution; /* return */ } @@ -1273,7 +1273,7 @@ BreakPoint->Type == KdbBreakPointTemporary) { ASSERT(ExpNr == 3); - TrapFrame->Eflags |= X86_EFLAGS_TF; + TrapFrame->EFlags |= X86_EFLAGS_TF; KdbBreakPointToReenable = BreakPoint; } @@ -1307,7 +1307,7 @@ if (BreakPoint->Type == KdbBreakPointSoftware) { DbgPrint("Entered debugger on breakpoint #%d: EXEC 0x%04x:0x%08x\n", - KdbLastBreakPointNr, TrapFrame->Cs & 0xffff, TrapFrame->Eip); + KdbLastBreakPointNr, TrapFrame->SegCs & 0xffff, TrapFrame->Eip); } else if (BreakPoint->Type == KdbBreakPointHardware) { @@ -1346,7 +1346,7 @@ /* Unset TF if we are no longer single stepping. */ if (KdbNumSingleSteps == 0) - TrapFrame->Eflags &= ~X86_EFLAGS_TF; + TrapFrame->EFlags &= ~X86_EFLAGS_TF; goto continue_execution; /* return */ } @@ -1359,16 +1359,16 @@ if ((KdbSingleStepOver && KdbpStepOverInstruction(TrapFrame->Eip)) || (!KdbSingleStepOver && KdbpStepIntoInstruction(TrapFrame->Eip))) { - TrapFrame->Eflags &= ~X86_EFLAGS_TF; + TrapFrame->EFlags &= ~X86_EFLAGS_TF; } else { - TrapFrame->Eflags |= X86_EFLAGS_TF; + TrapFrame->EFlags |= X86_EFLAGS_TF; } goto continue_execution; /* return */ } - TrapFrame->Eflags &= ~X86_EFLAGS_TF; + TrapFrame->EFlags &= ~X86_EFLAGS_TF; KdbEnteredOnSingleStep = TRUE; } else @@ -1393,7 +1393,7 @@ } DbgPrint("Entered debugger on embedded INT3 at 0x%04x:0x%08x.\n", - TrapFrame->Cs & 0xffff, TrapFrame->Eip - 1); + TrapFrame->SegCs & 0xffff, TrapFrame->Eip - 1); } else { @@ -1414,7 +1414,7 @@ ULONG_PTR Cr2; ULONG Err; asm volatile("movl %%cr2, %0" : "=r"(Cr2)); - Err = TrapFrame->ErrorCode; + Err = TrapFrame->ErrCode; DbgPrint("Memory at 0x%p could not be %s: ", Cr2, (Err & (1 << 1)) ? "written" : "read"); if ((Err & (1 << 0)) == 0) DbgPrint("Page not present.\n"); @@ -1459,12 +1459,12 @@ if ((KdbSingleStepOver && KdbpStepOverInstruction(KdbCurrentTrapFrame->Tf.Eip)) || (!KdbSingleStepOver && KdbpStepIntoInstruction(KdbCurrentTrapFrame->Tf.Eip))) { - ASSERT((KdbCurrentTrapFrame->Tf.Eflags & X86_EFLAGS_TF) == 0); - /*KdbCurrentTrapFrame->Tf.Eflags &= ~X86_EFLAGS_TF;*/ + ASSERT((KdbCurrentTrapFrame->Tf.EFlags & X86_EFLAGS_TF) == 0); + /*KdbCurrentTrapFrame->Tf.EFlags &= ~X86_EFLAGS_TF;*/ } else { - KdbCurrentTrapFrame->Tf.Eflags |= X86_EFLAGS_TF; + KdbCurrentTrapFrame->Tf.EFlags |= X86_EFLAGS_TF; } } @@ -1496,7 +1496,7 @@ /* Set the RF flag so we don't trigger the same breakpoint again. */ if (Resume) { - TrapFrame->Eflags |= X86_EFLAGS_RF; + TrapFrame->EFlags |= X86_EFLAGS_RF; } /* Clear dr6 status flags. */ _____ Modified: trunk/reactos/ntoskrnl/kdbg/kdb_cli.c --- trunk/reactos/ntoskrnl/kdbg/kdb_cli.c 2005-11-27 21:00:09 UTC (rev 19699) +++ trunk/reactos/ntoskrnl/kdbg/kdb_cli.c 2005-11-27 21:31:35 UTC (rev 19700) @@ -379,28 +379,28 @@ " ECX 0x%08x EDX 0x%08x\n" " ESI 0x%08x EDI 0x%08x\n" " EBP 0x%08x\n", - Tf->Cs & 0xFFFF, Tf->Eip, - Tf->Ss, Tf->Esp, + Tf->SegCs & 0xFFFF, Tf->Eip, + Tf->HardwareSegSs, Tf->HardwareEsp, Tf->Eax, Tf->Ebx, Tf->Ecx, Tf->Edx, Tf->Esi, Tf->Edi, Tf->Ebp); - KdbpPrint("EFLAGS 0x%08x ", Tf->Eflags); + KdbpPrint("EFLAGS 0x%08x ", Tf->EFlags); for (i = 0; i < 32; i++) { if (i == 1) { - if ((Tf->Eflags & (1 << 1)) == 0) + if ((Tf->EFlags & (1 << 1)) == 0) KdbpPrint(" !BIT1"); } else if (i == 12) { - KdbpPrint(" IOPL%d", (Tf->Eflags >> 12) & 3); + KdbpPrint(" IOPL%d", (Tf->EFlags >> 12) & 3); } else if (i == 13) { } - else if ((Tf->Eflags & (1 << i)) != 0) + else if ((Tf->EFlags & (1 << i)) != 0) KdbpPrint(EflagsBits[i]); } KdbpPrint("\n"); @@ -461,18 +461,18 @@ else if (Argv[0][0] == 's') /* sregs */ { KdbpPrint("CS 0x%04x Index 0x%04x %cDT RPL%d\n", - Tf->Cs & 0xffff, (Tf->Cs & 0xffff) >> 3, - (Tf->Cs & (1 << 2)) ? 'L' : 'G', Tf->Cs & 3); + Tf->SegCs & 0xffff, (Tf->SegCs & 0xffff) >> 3, + (Tf->SegCs & (1 << 2)) ? 'L' : 'G', Tf->SegCs & 3); KdbpPrint("DS 0x%04x Index 0x%04x %cDT RPL%d\n", - Tf->Ds, Tf->Ds >> 3, (Tf->Ds & (1 << 2)) ? 'L' : 'G', Tf->Ds & 3); + Tf->SegDs, Tf->SegDs >> 3, (Tf->SegDs & (1 << 2)) ? 'L' : 'G', Tf->SegDs & 3); KdbpPrint("ES 0x%04x Index 0x%04x %cDT RPL%d\n", - Tf->Es, Tf->Es >> 3, (Tf->Es & (1 << 2)) ? 'L' : 'G', Tf->Es & 3); + Tf->SegEs, Tf->SegEs >> 3, (Tf->SegEs & (1 << 2)) ? 'L' : 'G', Tf->SegEs & 3); KdbpPrint("FS 0x%04x Index 0x%04x %cDT RPL%d\n", - Tf->Fs, Tf->Fs >> 3, (Tf->Fs & (1 << 2)) ? 'L' : 'G', Tf->Fs & 3); + Tf->SegFs, Tf->SegFs >> 3, (Tf->SegFs & (1 << 2)) ? 'L' : 'G', Tf->SegFs & 3); KdbpPrint("GS 0x%04x Index 0x%04x %cDT RPL%d\n", - Tf->Gs, Tf->Gs >> 3, (Tf->Gs & (1 << 2)) ? 'L' : 'G', Tf->Gs & 3); + Tf->SegGs, Tf->SegGs >> 3, (Tf->SegGs & (1 << 2)) ? 'L' : 'G', Tf->SegGs & 3); KdbpPrint("SS 0x%04x Index 0x%04x %cDT RPL%d\n", - Tf->Ss, Tf->Ss >> 3, (Tf->Ss & (1 << 2)) ? 'L' : 'G', Tf->Ss & 3); + Tf->HardwareSegSs, Tf->HardwareSegSs >> 3, (Tf->HardwareSegSs & (1 << 2)) ? 'L' : 'G', Tf->HardwareSegSs & 3); } else /* dregs */ { @@ -940,10 +940,10 @@ if (Thread->Tcb.TrapFrame != NULL) { - if (Thread->Tcb.TrapFrame->PreviousMode == KernelMode) + if (Thread->Tcb.TrapFrame->PreviousPreviousMode == KernelMode) Esp = (PULONG)Thread->Tcb.TrapFrame->TempEsp; else - Esp = (PULONG)Thread->Tcb.TrapFrame->Esp; + Esp = (PULONG)Thread->Tcb.TrapFrame->HardwareEsp; Ebp = (PULONG)Thread->Tcb.TrapFrame->Ebp; Eip = Thread->Tcb.TrapFrame->Eip; } @@ -1466,35 +1466,15 @@ KTSS *Tss = KeGetCurrentKPCR()->TSS; KdbpPrint("Current TSS is at 0x%08x.\n", (INT)Tss); - KdbpPrint(" PreviousTask: 0x%08x\n" - " Ss0:Esp0: 0x%04x:0x%08x\n" - " Ss1:Esp1: 0x%04x:0x%08x\n" - " Ss2:Esp2: 0x%04x:0x%08x\n" - " Cr3: 0x%08x\n" - " Eip: 0x%08x\n" - " Eflags: 0x%08x\n" - " Eax: 0x%08x\n" - " Ecx: 0x%08x\n" - " Edx: 0x%08x\n" - " Ebx: 0x%08x\n" - " Esp: 0x%08x\n" - " Ebp: 0x%08x\n" - " Esi: 0x%08x\n" - " Edi: 0x%08x\n" + KdbpPrint(" Eip: 0x%08x\n" " Es: 0x%04x\n" " Cs: 0x%04x\n" " Ss: 0x%04x\n" " Ds: 0x%04x\n" " Fs: 0x%04x\n" " Gs: 0x%04x\n" - " Ldt: 0x%04x\n" - " Trap: 0x%04x\n" " IoMapBase: 0x%04x\n", - Tss->PreviousTask, Tss->Ss0, Tss->Esp0, Tss->Ss1, Tss->Esp1, - Tss->Ss2, Tss->Esp2, Tss->Cr3, Tss->Eip, Tss->Eflags, Tss->Eax, - Tss->Ecx, Tss->Edx, Tss->Ebx, Tss->Esp, Tss->Ebp, Tss->Esi, - Tss->Edi, Tss->Es, Tss->Cs, Tss->Ss, Tss->Ds, Tss->Fs, Tss->Gs, - Tss->Ldt, Tss->Trap, Tss->IoMapBase); + Tss->Eip, Tss->Es, Tss->Cs, Tss->Ds, Tss->Fs, Tss->Gs, Tss->IoMapBase); return TRUE; } _____ Modified: trunk/reactos/ntoskrnl/kdbg/kdb_expr.c --- trunk/reactos/ntoskrnl/kdbg/kdb_expr.c 2005-11-27 21:00:09 UTC (rev 19699) +++ trunk/reactos/ntoskrnl/kdbg/kdb_expr.c 2005-11-27 21:31:35 UTC (rev 19700) @@ -93,21 +93,21 @@ STATIC CONST struct { PCHAR Name; UCHAR Offset; UCHAR Size; } RegisterToTrapFrame[] = { {"eip", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Eip), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Eip)}, - {"eflags", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Eflags), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Eflags)}, + {"eflags", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.EFlags), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.EFlags)}, {"eax", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Eax), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Eax)}, {"ebx", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Ebx), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Ebx)}, {"ecx", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Ecx), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Ecx)}, {"edx", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Edx), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Edx)}, {"esi", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Esi), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Esi)}, {"edi", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Edi), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Edi)}, - {"esp", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Esp), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Esp)}, + {"esp", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.HardwareEsp), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.HardwareEsp)}, {"ebp", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Ebp), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Ebp)}, - {"cs", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Cs), 2 }, /* Use only the lower 2 bytes */ - {"ds", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Ds), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Ds)}, - {"es", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Es), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Es)}, - {"fs", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Fs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Fs)}, - {"gs", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Gs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Gs)}, - {"ss", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Ss), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Ss)}, + {"cs", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegCs), 2 }, /* Use only the lower 2 bytes */ + {"ds", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegDs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.SegDs)}, + {"es", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegEs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.SegEs)}, + {"fs", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegFs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.SegFs)}, + {"gs", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.SegGs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.SegGs)}, + {"ss", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.HardwareSegSs), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.HardwareSegSs)}, {"dr0", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Dr0), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Dr0)}, {"dr1", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Dr1), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Dr1)}, {"dr2", FIELD_OFFSET(KDB_KTRAP_FRAME, Tf.Dr2), RTL_FIELD_SIZE(KDB_KTRAP_FRAME, Tf.Dr2)},
19 years
1
0
0
0
[hpoussin] 19699: Write connection name at the right place in registry.
by hpoussin@svn.reactos.com
Write connection name at the right place in registry. Add PnpInstanceId and ShowIcon values Modified: trunk/reactos/lib/netcfgx/netcfgx.c _____ Modified: trunk/reactos/lib/netcfgx/netcfgx.c --- trunk/reactos/lib/netcfgx/netcfgx.c 2005-11-27 20:59:09 UTC (rev 19698) +++ trunk/reactos/lib/netcfgx/netcfgx.c 2005-11-27 21:00:09 UTC (rev 19699) @@ -100,11 +100,13 @@ { RPC_STATUS RpcStatus; UUID Uuid; + LPWSTR InstanceId = NULL; LPWSTR UuidRpcString = NULL; LPWSTR UuidString = NULL; LPWSTR DeviceName = NULL; LPWSTR ExportName = NULL; LONG rc; + DWORD dwShowIcon, dwLength; HKEY hKey = INVALID_HANDLE_VALUE; HKEY hLinkageKey = INVALID_HANDLE_VALUE; HKEY hNetworkKey = INVALID_HANDLE_VALUE; @@ -115,6 +117,27 @@ DPRINT("%lu %p %p\n", InstallFunction, DeviceInfoSet, DeviceInfoData); + /* Get Instance ID */ + if (SetupDiGetDeviceInstanceIdW(DeviceInfoSet, DeviceInfoData, NULL, 0, &dwLength)) + { + DPRINT("SetupDiGetDeviceInstanceIdW() returned TRUE. FALSE expected\n"); + rc = ERROR_GEN_FAILURE; + goto cleanup; + } + InstanceId = HeapAlloc(GetProcessHeap(), 0, dwLength); + if (!InstanceId) + { + DPRINT("HeapAlloc() failed\n"); + rc = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + if (!SetupDiGetDeviceInstanceIdW(DeviceInfoSet, DeviceInfoData, InstanceId, dwLength, NULL)) + { + rc = GetLastError(); + DPRINT("SetupDiGetDeviceInstanceIdW() failed with error 0x%lx\n", rc); + goto cleanup; + } + /* Create a new UUID */ RpcStatus = UuidCreate(&Uuid); if (RpcStatus != RPC_S_OK && RpcStatus != RPC_S_UUID_LOCAL_ONLY) @@ -263,20 +286,39 @@ DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } - rc = RegCreateKeyExW(hNetworkKey, UuidString, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hKey, NULL); + rc = RegCreateKeyExW(hNetworkKey, UuidString, 0, NULL, REG_OPTION_NON_VOLATILE, KEY_CREATE_SUB_KEY, NULL, &hKey, NULL); if (rc != ERROR_SUCCESS) { DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); goto cleanup; } - rc = RegSetValueExW(hKey, L"Name", 0, REG_SZ, (const BYTE*)L"Network connection", (wcslen(L"Network connection") + 1) * sizeof(WCHAR)); + rc = RegCreateKeyExW(hKey, L"Connection", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_SET_VALUE, NULL, &hConnectionKey, NULL); + RegCloseKey(hKey); + hKey = INVALID_HANDLE_VALUE; if (rc != ERROR_SUCCESS) { + DPRINT("RegCreateKeyExW() failed with error 0x%lx\n", rc); + goto cleanup; + } + rc = RegSetValueExW(hConnectionKey, L"Name", 0, REG_SZ, (const BYTE*)L"Network connection", (wcslen(L"Network connection") + 1) * sizeof(WCHAR)); + if (rc != ERROR_SUCCESS) + { DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); goto cleanup; } - RegCloseKey(hKey); - hKey = INVALID_HANDLE_VALUE; + rc = RegSetValueExW(hConnectionKey, L"PnpInstanceId", 0, REG_SZ, (const BYTE*)InstanceId, (wcslen(InstanceId) + 1) * sizeof(WCHAR)); + if (rc != ERROR_SUCCESS) + { + DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + goto cleanup; + } + dwShowIcon = 1; + rc = RegSetValueExW(hConnectionKey, L"ShowIcon", 0, REG_DWORD, (const BYTE*)&dwShowIcon, sizeof(dwShowIcon)); + if (rc != ERROR_SUCCESS) + { + DPRINT("RegSetValueExW() failed with error 0x%lx\n", rc); + goto cleanup; + } /* Write linkage information in Tcpip service */ rc = RegCreateKeyExW(HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Linkage", 0, NULL, REG_OPTION_NON_VOLATILE, KEY_QUERY_VALUE | KEY_SET_VALUE, NULL, &hKey, NULL); @@ -309,6 +351,7 @@ cleanup: if (UuidRpcString != NULL) RpcStringFreeW(&UuidRpcString); + HeapFree(GetProcessHeap(), 0, InstanceId); HeapFree(GetProcessHeap(), 0, UuidString); HeapFree(GetProcessHeap(), 0, DeviceName); HeapFree(GetProcessHeap(), 0, ExportName);
19 years
1
0
0
0
[hpoussin] 19698: Small cleanup/fixes:
by hpoussin@svn.reactos.com
Small cleanup/fixes: - Don't open registry keys with full access rights - Replace OutputDebugString by DPRINT Modified: trunk/reactos/lib/cpl/ncpa/ncpa.c Modified: trunk/reactos/lib/cpl/ncpa/ncpa.h _____ Modified: trunk/reactos/lib/cpl/ncpa/ncpa.c --- trunk/reactos/lib/cpl/ncpa/ncpa.c 2005-11-27 20:18:33 UTC (rev 19697) +++ trunk/reactos/lib/cpl/ncpa/ncpa.c 2005-11-27 20:59:09 UTC (rev 19698) @@ -15,8 +15,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -/* $Id$ - * +/* * PROJECT: ReactOS Network Control Panel * FILE: lib/cpl/system/ncpa.c * PURPOSE: ReactOS Network Control Panel @@ -53,10 +52,9 @@ #include <iphlpapi.h> #include <commctrl.h> #include <cpl.h> -//#ifdef __REACTOS__ -//#include <Netcfgn.h> -//#endif +#include <debug.h> + #include "resource.h" #include "ncpa.h" @@ -90,11 +88,9 @@ TCHAR tpszName[MAX_PATH]; DWORD dwNameLen = sizeof(tpszName); - if(RegOpenKeyEx(hBaseKey,tpszRegPath,0,KEY_ALL_ACCESS,&hKey)!=ERROR_SUCC ESS) + if(RegOpenKeyEx(hBaseKey,tpszRegPath,0,KEY_ENUMERATE_SUB_KEYS,&hKey)!=ER ROR_SUCCESS) { - OutputDebugString(_T("EnumRegKeys failed (key not found)\r\n")); - OutputDebugString(tpszRegPath); - OutputDebugString(_T("\r\n")); + DPRINT("EnumRegKeys failed (key not found): %S\n", tpszRegPath); return; } @@ -104,14 +100,12 @@ ret = RegEnumKeyEx(hKey,i,tpszName,&dwNameLen,NULL,NULL,NULL,NULL); if(ret != ERROR_SUCCESS) { - OutputDebugString(_T("EnumRegKeys: RegEnumKeyEx failed for\r\n")); - OutputDebugString(tpszName); - OutputDebugString(_T("\r\n")); + DPRINT("EnumRegKeys: RegEnumKeyEx failed for %S (rc 0x%lx)\n", tpszName, ret); break; } _stprintf(pszNewPath,_T("%s\\%s"),tpszRegPath,tpszName); - OutputDebugString(_T("EnumRegKeys: Calling user supplied enum function\r\n")); + DPRINT("EnumRegKeys: Calling user supplied enum function\n"); pCallback(pCookie,hBaseKey,pszNewPath); dwNameLen = sizeof(tpszName); @@ -146,7 +140,7 @@ for (i = 0; i < 100; i++) { _stprintf(tpszSubKey,_T("SYSTEM\\CurrentControlSet\\Control\\Class\\{4D3 6E972-E325-11CE-BFC1-08002BE10318}\\%04d"),i); - if(RegOpenKey(HKEY_LOCAL_MACHINE,tpszSubKey,&hKey)!=ERROR_SUCCESS) + if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,tpszSubKey,0,KEY_QUERY_VALUE,&hKey)!= ERROR_SUCCESS) continue; dwType = REG_SZ; dwSize = sizeof(tpszCfgInst2); @@ -181,7 +175,7 @@ // INetCfgComponentPropertyUi *pNetCfgPropUI; hwndDlg = (HWND)pCookie; - if(RegOpenKey(HKEY_LOCAL_MACHINE,tpszSubKey,&hKey)!=ERROR_SUCCESS) + if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,tpszSubKey,0,KEY_QUERY_VALUE,&hKey)!= ERROR_SUCCESS) return; dwType = REG_DWORD; @@ -200,7 +194,7 @@ if(RegQueryValueEx(hKey,_T("Description"),NULL,&dwType,(BYTE*)tpszDescri ption,&dwSize)!= ERROR_SUCCESS) return; - RegOpenKey(hKey,_T("Ndi"),&hNDIKey); + RegOpenKeyEx(hKey,_T("Ndi"),0,KEY_QUERY_VALUE,&hNDIKey); dwType = REG_SZ; dwSize = sizeof(tpszNotifyObjectCLSID); if(RegQueryValueEx(hNDIKey,_T("ClsId"),NULL,&dwType,(BYTE*)tpszNotifyObj ectCLSID,&dwSize)!= ERROR_SUCCESS) @@ -258,7 +252,7 @@ MessageBox(hwndDlg,tpszCfgInstanceID,tpszSubKey,MB_ICONSTOP); } - if(RegOpenKey(HKEY_LOCAL_MACHINE,tpszSubKey,&hKey)!=ERROR_SUCCESS) + if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,tpszSubKey,0,KEY_QUERY_VALUE,&hKey)!= ERROR_SUCCESS) return 0; dwType = REG_SZ; dwSize = sizeof(tpszDisplayName); @@ -293,7 +287,7 @@ break; _stprintf(tpszHelpKey,_T("%s\\Ndi"),tpszSubKey); - RegOpenKey(HKEY_LOCAL_MACHINE,tpszHelpKey,&hNDIKey); + RegOpenKeyEx(HKEY_LOCAL_MACHINE,tpszHelpKey,0,KEY_QUERY_VALUE,&hNDIKey); dwType = REG_SZ; dwSize = sizeof(tpszHelpText); if(RegQueryValueEx(hNDIKey,_T("HelpText"),NULL,&dwType,(BYTE*)tpszHelpTe xt,&dwSize)!= ERROR_SUCCESS) @@ -320,10 +314,9 @@ break; _stprintf(tpszNDIKey,_T("%s\\Ndi"),tpszSubKey); - RegOpenKey(HKEY_LOCAL_MACHINE,tpszNDIKey,&hNDIKey); - dwType = REG_SZ; + RegOpenKeyEx(HKEY_LOCAL_MACHINE,tpszNDIKey,0,KEY_QUERY_VALUE,&hNDIKey); dwSize = sizeof(tpszClsIDText); - if(RegQueryValueEx(hNDIKey,_T("ClsId"),NULL,&dwType,(BYTE*)tpszClsIDText ,&dwSize)!= ERROR_SUCCESS) + if(RegQueryValueEx(hNDIKey,_T("ClsId"),NULL,&dwType,(BYTE*)tpszClsIDText ,&dwSize)!= ERROR_SUCCESS || dwType != REG_SZ) ;//return; RegCloseKey(hNDIKey); @@ -342,16 +335,14 @@ { TCHAR tpszAdatperName[MAX_PATH]; swprintf(tpszAdatperName,L"%S",pAdapter->AdapterName); - OutputDebugString(_T("IPHLPAPI returned:\r\n")); - OutputDebugString(tpszAdatperName); - OutputDebugString(_T("\r\n")); + DPRINT("IPHLPAPI returned: %S\n", tpszAdatperName); if(_tcscmp(tpszAdatperName,tpszCfgInstanceID)==0) { DisplayTCPIPProperties(hwndDlg,pAdapter); break; } else { - OutputDebugString(_T("... which is not the TCPIP property sheet\r\n")); + DPRINT("... which is not the TCPIP property sheet\n"); } pAdapter = pAdapter->Next; if(!pAdapter) @@ -387,7 +378,7 @@ // Get the "Name" for this Connection _stprintf(tpszSubKey,_T("System\\CurrentControlSet\\Control\\Network\\{4 D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection"),tpszCfgInstanceID ); - if(RegOpenKey(HKEY_LOCAL_MACHINE,tpszSubKey,&hKey)!=ERROR_SUCCESS) + if(RegOpenKeyEx(HKEY_LOCAL_MACHINE,tpszSubKey,0,KEY_QUERY_VALUE,&hKey)!= ERROR_SUCCESS) return; if(RegQueryValueEx(hKey,_T("Name"),NULL,&dwType,(BYTE*)tpszName,&dwSize) !=ERROR_SUCCESS) _stprintf(tpszName,_T("[ERROR]")); @@ -457,7 +448,7 @@ // Get the "Name" for this Connection _stprintf(tpszSubKey,_T("System\\CurrentControlSet\\Control\\Network\\{4 D36E972-E325-11CE-BFC1-08002BE10318}\\%s\\Connection"),tpszCfgInstanceID ); - if (RegOpenKey(HKEY_LOCAL_MACHINE,tpszSubKey,&hKey)!=ERROR_SUCCESS) + if (RegOpenKeyEx(HKEY_LOCAL_MACHINE,tpszSubKey,0,KEY_QUERY_VALUE,&hKey)!=ER ROR_SUCCESS) return; if (RegQueryValueEx(hKey,_T("Name"),NULL,&dwType,(BYTE*)tpszName,&dwSize)!= ERROR_SUCCESS) @@ -532,13 +523,11 @@ HWND hwndDlg = (HWND)pCookie; DWORD dwCharacteristics; - OutputDebugString(_T("NetAdapterCallback\r\n")); - OutputDebugString(tpszSubKey); - OutputDebugString(_T("\r\n")); - if(RegOpenKeyEx(hBaseKey,tpszSubKey,0,KEY_ALL_ACCESS,&hKey)!=ERROR_SUCCE SS) + DPRINT("NetAdapterCallback: %S\n", tpszSubKey); + if(RegOpenKeyEx(hBaseKey,tpszSubKey,0,KEY_QUERY_VALUE,&hKey)!=ERROR_SUCC ESS) return; - OutputDebugString(_T("NetAdapterCallback: Reading Characteristics\r\n")); + DPRINT("NetAdapterCallback: Reading Characteristics\n"); dwType = REG_DWORD; dwSize = sizeof(dwCharacteristics); if(RegQueryValueEx(hKey,_T("Characteristics"),NULL,&dwType,(BYTE*)&dwCha racteristics,&dwSize)!=ERROR_SUCCESS) @@ -550,7 +539,7 @@ // if (!(dwCharacteristics & NCF_HAS_UI)) // return; - OutputDebugString(_T("NetAdapterCallback: Reading DriverDesc\r\n")); + DPRINT("NetAdapterCallback: Reading DriverDesc\n"); dwType = REG_SZ; dwSize = sizeof(tpszDisplayName); if (RegQueryValueEx(hKey,_T("DriverDesc"),NULL,&dwType,(BYTE*)tpszDisplayNa me,&dwSize)!= ERROR_SUCCESS) _____ Modified: trunk/reactos/lib/cpl/ncpa/ncpa.h --- trunk/reactos/lib/cpl/ncpa/ncpa.h 2005-11-27 20:18:33 UTC (rev 19697) +++ trunk/reactos/lib/cpl/ncpa/ncpa.h 2005-11-27 20:59:09 UTC (rev 19698) @@ -13,8 +13,8 @@ extern HINSTANCE hApplet; +extern DWORD DbgPrint(PCHAR Fmt, ...); - #endif // __NCPA_H /* EOF */
19 years
1
0
0
0
[ion] 19697: - Add the real NT Object Callbacks and #ifdef out the ReactOS ones.
by ion@svn.reactos.com
- Add the real NT Object Callbacks and #ifdef out the ReactOS ones. - Add the real NT Loader Parameter Block structures & friends and #ifdef out the ReactOS ones (thanks to Filip Navara for some work on these). Modified: trunk/reactos/include/ndk/fixmes.txt Modified: trunk/reactos/include/ndk/halfuncs.h Modified: trunk/reactos/include/ndk/haltypes.h Modified: trunk/reactos/include/ndk/obtypes.h _____ Modified: trunk/reactos/include/ndk/fixmes.txt --- trunk/reactos/include/ndk/fixmes.txt 2005-11-27 20:01:57 UTC (rev 19696) +++ trunk/reactos/include/ndk/fixmes.txt 2005-11-27 20:18:33 UTC (rev 19697) @@ -1,15 +1,3 @@ -Complete list of NDK Fixmes before 1.0 Release (Nov 27th 2005) --------------------------------------------------------------- -_______________________________________________________________________ _______________ -[CRITICAL] - Breaking compatibility with official structures. -|obtypes.h - Object callbacks are ReactOS only definitions. IFDEF-OUT ADDREAL -|haltypes.h - Loader Parameter Block is ReactOS Version, not NT. IFDEF-OUT ADDREAL -| -[MAJOR] - Using incorrect, missing, or invalid names or definitions. -|extypes.h - Classes 13, 20, 30, 31, 49, 51, 52, 54+ are undefined. WONTFIX -|______________________________________________________________________ _______________ - - List of ReactOS Applications compiling with the NDK (verify, fix, and optimize their usage) -------------------------------------------------------------- _____ Modified: trunk/reactos/include/ndk/halfuncs.h --- trunk/reactos/include/ndk/halfuncs.h 2005-11-27 20:01:57 UTC (rev 19696) +++ trunk/reactos/include/ndk/halfuncs.h 2005-11-27 20:18:33 UTC (rev 19697) @@ -30,24 +30,28 @@ // // Display Functions // +NTHALAPI BOOLEAN NTAPI HalQueryDisplayOwnership( VOID ); +NTHALAPI VOID NTAPI HalDisplayString( IN PCHAR String ); +NTHALAPI BOOLEAN NTAPI HalQueryDisplayOwnership( VOID ); +NTHALAPI VOID NTAPI HalReleaseDisplayOwnership( @@ -57,12 +61,14 @@ // // Initialization Functions // +NTHALAPI BOOLEAN NTAPI HalAllProcessorsStarted( VOID ); +NTHALAPI VOID NTAPI HalInitializeProcessor( @@ -70,6 +76,7 @@ PVOID ProcessorStack ); +NTHALAPI BOOLEAN NTAPI HalInitSystem( @@ -77,12 +84,14 @@ PLOADER_PARAMETER_BLOCK LoaderBlock ); +NTHALAPI VOID NTAPI HalReturnToFirmware( FIRMWARE_REENTRY Action ); +NTHALAPI BOOLEAN NTAPI HalStartNextProcessor( @@ -93,6 +102,7 @@ // // Interrupt Functions // +NTHALAPI BOOLEAN NTAPI HalBeginSystemInterrupt( @@ -101,6 +111,7 @@ PKIRQL OldIrql ); +NTHALAPI BOOLEAN NTAPI HalDisableSystemInterrupt( @@ -108,6 +119,7 @@ KIRQL Irql ); +NTHALAPI BOOLEAN NTAPI HalEnableSystemInterrupt( @@ -116,6 +128,7 @@ KINTERRUPT_MODE InterruptMode ); +NTHALAPI VOID NTAPI HalEndSystemInterrupt( @@ -123,6 +136,7 @@ ULONG Vector ); +NTHALAPI BOOLEAN NTAPI HalGetEnvironmentVariable( @@ -131,18 +145,21 @@ USHORT ValueLength ); +NTHALAPI VOID NTAPI HalReportResourceUsage( VOID ); +NTHALAPI VOID FASTCALL HalRequestSoftwareInterrupt( KIRQL SoftwareInterruptRequested ); +NTHALAPI VOID NTAPI HalRequestIpi( @@ -152,6 +169,7 @@ // // I/O Functions // +NTHALAPI VOID NTAPI IoAssignDriveLetters( @@ -164,6 +182,7 @@ // // Environment Functions // +NTHALAPI BOOLEAN NTAPI HalSetEnvironmentVariable( _____ Modified: trunk/reactos/include/ndk/haltypes.h --- trunk/reactos/include/ndk/haltypes.h 2005-11-27 20:01:57 UTC (rev 19696) +++ trunk/reactos/include/ndk/haltypes.h 2005-11-27 20:18:33 UTC (rev 19697) @@ -67,9 +67,125 @@ ULONG Version; } HAL_PRIVATE_DISPATCH, *PHAL_PRIVATE_DISPATCH; +#ifndef _REACTOS_ // -// Loader Parameter Block Structures (FIXME) +// NLS Data Block // +typedef struct _NLS_TABLE_DATA +{ + PVOID AnsiCodePageData; + PVOID OemCodePageData; + PVOID UnicodeCodePageData; +} NLS_TABLE_DATA, *PNLS_TABLE_DATA; + +// +// Subsystem Specific Loader Blocks +// +typedef struct _PROFILE_PARAMETER_BLOCK +{ + USHORT DockData0; + USHORT DockData1; + USHORT DockData2; + USHORT DockData3; + ULONG DockData3; + ULONG DockData4; +} PROFILE_PARAMETER_BLOCK, *PPROFILE_PARAMETER_BLOCK; + +typedef struct _HEADLESS_LOADER_BLOCK +{ + UCHAR Unknown[0xC]; +} HEADLESS_LOADER_BLOCK, *PHEADLESS_LOADER_BLOCK; + +typedef struct _NETWORK_LOADER_BLOCK +{ + UCHAR Unknown[0xC]; +} NETWORK_LOADER_BLOCK, *PNETWORK_LOADER_BLOCK; + +// +// Extended Loader Parameter Block +// +typedef struct _LOADER_PARAMETER_EXTENSION +{ + ULONG Size; + PROFILE_PARAMETER_BLOCK ProfileParameterBlock; + ULONG MajorVersion; + ULONG MinorVersion; + PVOID SpecialConfigInfFile; + ULONG SpecialConfigInfSize; + PVOID TriageDumpData; + // + // NT 5.1 + // + ULONG NumberOfPages; + PHEADLESS_LOADER_BLOCK HeadlessLoaderBlock; + PVOID Unknown1; + PVOID PrefetchDatabaseBase; + ULONG PrefetchDatabaseSize; + PNETWORK_LOADER_BLOCK NetworkLoaderBlock; + // + // NT 5.2+ + // + PVOID Reserved[2]; + LIST_ENTRY FirmwareListEntry; + PVOID AcpiTableBase; + ULONG AcpiTableSize; +} LOADER_PARAMETER_EXTENSION, *PLOADER_PARAMETER_EXTENSION; + +// +// Architecture specific Loader Parameter Blocks +// +typedef struct _I386_LOADER_BLOCK +{ + PVOID CommonDataArea; + ULONG MachineType; + ULONG Reserved; +} I386_LOADER_BLOCK, *PI386_LOADER_BLOCK; + +// +// Setup Loader Parameter Block +// +typedef struct _SETUP_LOADER_BLOCK +{ + ULONG Unknown[139]; + ULONG Flags; +} SETUP_LOADER_BLOCK, *PSETUP_LOADER_BLOCK; + +// +// Loader Parameter Block +// +typedef struct _LOADER_PARAMETER_BLOCK +{ + LIST_ENTRY LoadOrderListHead; + LIST_ENTRY MemoryDescriptorListHead; + LIST_ENTRY DriverList; + PVOID KernelStack; + PVOID Prcb; + PVOID Process; + PVOID Thread; + ULONG RegistryLength; + PVOID RegistryBase; + PCONFIGURATION_COMPONENT_DATA ConfigurationRoot; + LPSTR ArcBootDeviceName; + LPSTR ArcHalDeviceName; + LPSTR SystemRoot; + LPSTR BootRoot; + LPSTR CommandLine; + PNLS_TABLE_DATA NlsTables; + PARC_DISK_INFORMATION ArcDevices; + PVOID OEMFont; + PSETUP_LOADER_BLOCK SetupLdrBlock; + PLOADER_PARAMETER_EXTENSION LpbExtension; + union + { + I386_LOADER_BLOCK I386; + } u; +} LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK; + +#else + +// +// FIXME: ReactOS ONLY +// typedef struct _LOADER_MODULE { ULONG ModStart; @@ -77,7 +193,6 @@ ULONG String; ULONG Reserved; } LOADER_MODULE, *PLOADER_MODULE; - typedef struct _LOADER_PARAMETER_BLOCK { ULONG Flags; @@ -98,6 +213,7 @@ ULONG PageDirectoryEnd; ULONG KernelBase; } LOADER_PARAMETER_BLOCK, *PLOADER_PARAMETER_BLOCK; +#endif // // Kernel Exports _____ Modified: trunk/reactos/include/ndk/obtypes.h --- trunk/reactos/include/ndk/obtypes.h 2005-11-27 20:01:57 UTC (rev 19696) +++ trunk/reactos/include/ndk/obtypes.h 2005-11-27 20:18:33 UTC (rev 19697) @@ -117,15 +117,92 @@ ObjectHandleInformation } OBJECT_INFORMATION_CLASS; -/* FUNCTION TYPES ************************************************************/ +// +// Dump Control Structure for Object Debugging +// +typedef struct _OBJECT_DUMP_CONTROL +{ + PVOID Stream; + ULONG Detail; +} OBJECT_DUMP_CONTROL, *POBJECT_DUMP_CONTROL; #ifndef NTOS_MODE_USER +#ifndef _REACTOS_ // -// FIXME: Object Callbacks +// Object Type Callbacks // +typedef VOID +(NTAPI *OB_DUMP_METHOD)( + IN PVOID Object, + IN POB_DUMP_CONTROL Control OPTIONAL +); + typedef NTSTATUS (NTAPI *OB_OPEN_METHOD)( + IN OB_OPEN_REASON Reason, + IN PEPROCESS Process OPTIONAL, + IN PVOID ObjectBody, + IN ACCESS_MASK GrantedAccess, + IN ULONG HandleCount +); + +typedef VOID +(NTAPI *OB_CLOSE_METHOD)( + IN PEPROCESS Process OPTIONAL, + IN PVOID Object, + IN ACCESS_MASK GrantedAccess, + IN ULONG ProcessHandleCount, + IN ULONG SystemHandleCount +); + +typedef VOID +(NTAPI *OB_DELETE_METHOD)( + IN PVOID Object +); + +typedef NTSTATUS +(NTAPI *OB_PARSE_METHOD)( + IN PVOID ParseObject, + IN PVOID ObjectType, + IN OUT PACCESS_STATE AccessState, + IN KPROCESSOR_MODE AccessMode, + IN ULONG Attributes, + IN OUT PUNICODE_STRING CompleteName, + IN OUT PUNICODE_STRING RemainingName, + IN OUT PVOID Context OPTIONAL, + IN PSECURITY_QUALITY_OF_SERVICE SecurityQos OPTIONAL, + OUT PVOID *Object +); + +typedef NTSTATUS +(NTAPI *OB_SECURITY_METHOD)( + IN PVOID Object, + IN SECURITY_OPERATION_CODE OperationType, + IN SECURITY_INFORMATION SecurityInformation, + IN PSECURITY_DESCRIPTOR SecurityDescriptor, + IN OUT PULONG CapturedLength, + IN OUT PSECURITY_DESCRIPTOR *ObjectSecurityDescriptor, + IN POOL_TYPE PoolType, + IN PGENERIC_MAPPING GenericMapping +); + +typedef NTSTATUS +(NTAPI *OB_QUERYNAME_METHOD)( + IN PVOID Object, + IN BOOLEAN HasObjectName, + OUT POBJECT_NAME_INFORMATION ObjectNameInfo, + IN ULONG Length, + OUT PULONG ReturnLength +); + +#else + +// +// FIXME: ReactOS ONLY Object Callbacks +// +typedef NTSTATUS +(NTAPI *OB_OPEN_METHOD)( OB_OPEN_REASON Reason, PVOID ObjectBody, PEPROCESS Process, @@ -198,6 +275,8 @@ struct _OBJECT_ATTRIBUTES* ObjectAttributes ); +#endif + #else //
19 years
1
0
0
0
[ion] 19696: - Forgot to add the define which enables _REACTOS_
by ion@svn.reactos.com
- Forgot to add the define which enables _REACTOS_ Modified: trunk/reactos/ReactOS.xml _____ Modified: trunk/reactos/ReactOS.xml --- trunk/reactos/ReactOS.xml 2005-11-27 19:40:46 UTC (rev 19695) +++ trunk/reactos/ReactOS.xml 2005-11-27 20:01:57 UTC (rev 19696) @@ -12,6 +12,7 @@ <define name="_M_IX86" /> <define name="_X86_" /> <define name="__i386__" /> + <define name="_REACTOS_" /> <if property="MP" value="1"> <define name="CONFIG_SMP" value="1" /> </if>
19 years
1
0
0
0
[hpoussin] 19695: Implement most of SetupDiGetClassDevPropertySheetsW
by hpoussin@svn.reactos.com
Implement most of SetupDiGetClassDevPropertySheetsW Modified: trunk/reactos/lib/setupapi/devinst.c Modified: trunk/reactos/lib/setupapi/stubs.c _____ Modified: trunk/reactos/lib/setupapi/devinst.c --- trunk/reactos/lib/setupapi/devinst.c 2005-11-27 19:21:19 UTC (rev 19694) +++ trunk/reactos/lib/setupapi/devinst.c 2005-11-27 19:40:46 UTC (rev 19695) @@ -66,12 +66,17 @@ (WINAPI* DEFAULT_CLASS_INSTALL_PROC) ( IN HDEVINFO DeviceInfoSet, IN OUT PSP_DEVINFO_DATA DeviceInfoData); -typedef DWORD +typedef DWORD (CALLBACK* COINSTALLER_PROC) ( IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN OUT PCOINSTALLER_CONTEXT_DATA Context); +typedef BOOL +(WINAPI* PROPERTY_PAGE_PROVIDER) ( + IN PSP_PROPSHEETPAGE_REQUEST PropPageRequest, + IN LPFNADDPROPSHEETPAGE fAddFunc, + IN LPARAM lParam); struct CoInstallerElement { @@ -3468,9 +3473,9 @@ BOOL WINAPI SetupDiGetDeviceInstanceIdA( IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, - OUT PSTR DeviceInstanceId, + OUT PSTR DeviceInstanceId OPTIONAL, IN DWORD DeviceInstanceIdSize, - OUT PDWORD RequiredSize) + OUT PDWORD RequiredSize OPTIONAL) { PWSTR DeviceInstanceIdW = NULL; BOOL ret = FALSE; @@ -3504,7 +3509,7 @@ } } - TRACE("Returning 0x%p\n", ret); + TRACE("Returning %d\n", ret); return ret; } @@ -3514,9 +3519,9 @@ BOOL WINAPI SetupDiGetDeviceInstanceIdW( IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, - OUT PWSTR DeviceInstanceId, + OUT PWSTR DeviceInstanceId OPTIONAL, IN DWORD DeviceInstanceIdSize, - OUT PDWORD RequiredSize) + OUT PDWORD RequiredSize OPTIONAL) { BOOL ret = FALSE; @@ -3553,11 +3558,150 @@ SetLastError(ERROR_INSUFFICIENT_BUFFER); } - TRACE("Returning 0x%p\n", ret); + TRACE("Returning %d\n", ret); return ret; } /*********************************************************************** + * SetupDiGetClassDevPropertySheetsA(SETUPAPI.@) + */ +BOOL WINAPI SetupDiGetClassDevPropertySheetsA( + IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, + IN LPPROPSHEETHEADERA PropertySheetHeader, + IN DWORD PropertySheetHeaderPageListSize, + OUT PDWORD RequiredSize OPTIONAL, + IN DWORD PropertySheetType) +{ + FIXME ("Stub %p %p %p %d %p %d\n", + DeviceInfoSet, DeviceInfoData, PropertySheetHeader, PropertySheetHeaderPageListSize, + RequiredSize, PropertySheetType); + SetLastError(ERROR_CALL_NOT_IMPLEMENTED); + return FALSE; +} + +static BOOL WINAPI GetClassDevPropertySheetsCallback( + IN HPROPSHEETPAGE hPropSheetPage, + LPARAM lParam) +{ + FIXME("Need to add a property page!\n"); + return TRUE; +} + +/********************************************************************** * + * SetupDiGetClassDevPropertySheetsW(SETUPAPI.@) + */ +BOOL WINAPI SetupDiGetClassDevPropertySheetsW( + IN HDEVINFO DeviceInfoSet, + IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, + IN LPPROPSHEETHEADERW PropertySheetHeader, + IN DWORD PropertySheetHeaderPageListSize, + OUT PDWORD RequiredSize OPTIONAL, + IN DWORD PropertySheetType) +{ + struct DeviceInfoSet *list; + BOOL ret = FALSE; + + TRACE("%p %p %p 0%lx %p 0x%lx\n", DeviceInfoSet, DeviceInfoData, + PropertySheetHeader, PropertySheetHeaderPageListSize, + RequiredSize, PropertySheetType); + + if (!DeviceInfoSet) + SetLastError(ERROR_INVALID_HANDLE); + else if (((struct DeviceInfoSet *)DeviceInfoSet)->magic != SETUP_DEV_INFO_SET_MAGIC) + SetLastError(ERROR_INVALID_HANDLE); + else if ((list = (struct DeviceInfoSet *)DeviceInfoSet)->magic != SETUP_DEV_INFO_SET_MAGIC) + SetLastError(ERROR_INVALID_HANDLE); + else if (!PropertySheetHeader) + SetLastError(ERROR_INVALID_PARAMETER); + else if (DeviceInfoData && DeviceInfoData->cbSize != sizeof(SP_DEVINFO_DATA)) + SetLastError(ERROR_INVALID_USER_BUFFER); + else if (!DeviceInfoData && IsEqualIID(&list->ClassGuid, &GUID_NULL)) + SetLastError(ERROR_INVALID_PARAMETER); + else if (!PropertySheetHeader) + SetLastError(ERROR_INVALID_PARAMETER); + else if (PropertySheetType != DIGCDP_FLAG_ADVANCED + && PropertySheetType != DIGCDP_FLAG_BASIC + /* FIXME: && PropertySheetType != DIGCDP_FLAG_REMOTE_ADVANCED + && PropertySheetType != DIGCDP_FLAG_REMOTE_BASIC*/) + SetLastError(ERROR_INVALID_PARAMETER); + else + { + HKEY hKey = INVALID_HANDLE_VALUE; + SP_PROPSHEETPAGE_REQUEST Request; + LPWSTR PropPageProvider = NULL; + HMODULE hModule = NULL; + PROPERTY_PAGE_PROVIDER pPropPageProvider = NULL; + DWORD dwLength, dwRegType; + DWORD rc; + + if (DeviceInfoData) + hKey = SetupDiOpenDevRegKey(DeviceInfoSet, DeviceInfoData, DICS_FLAG_GLOBAL, 0, DIREG_DRV, KEY_QUERY_VALUE); + else + { + /* FIXME: what if DeviceInfoSet is a remote device info set? */ + hKey = SetupDiOpenClassRegKey(&list->ClassGuid, KEY_QUERY_VALUE); + } + if (hKey == INVALID_HANDLE_VALUE) + goto cleanup; + + rc = RegQueryValueExW(hKey, L"EnumPropPages32", NULL, &dwRegType, NULL, &dwLength); + if (rc == ERROR_FILE_NOT_FOUND) + { + /* No registry key. As it is optional, don't say it's a bad error */ + if (RequiredSize) + *RequiredSize = 0; + ret = TRUE; + goto cleanup; + } + else if (rc != ERROR_SUCCESS && dwRegType != REG_SZ) + { + SetLastError(rc); + goto cleanup; + } + + PropPageProvider = HeapAlloc(GetProcessHeap(), 0, dwLength + sizeof(WCHAR)); + if (!PropPageProvider) + { + SetLastError(ERROR_NOT_ENOUGH_MEMORY); + goto cleanup; + } + rc = RegQueryValueExW(hKey, L"EnumPropPages32", NULL, NULL, (LPBYTE)PropPageProvider, &dwLength); + if (rc != ERROR_SUCCESS) + { + SetLastError(rc); + goto cleanup; + } + PropPageProvider[dwLength / sizeof(WCHAR)] = 0; + + rc = GetFunctionPointer(PropPageProvider, &hModule, (PVOID*)&pPropPageProvider); + if (rc != ERROR_SUCCESS) + { + SetLastError(rc); + goto cleanup; + } + + Request.cbSize = sizeof(SP_PROPSHEETPAGE_REQUEST); + Request.PageRequested = SPPSR_ENUM_ADV_DEVICE_PROPERTIES; + Request.DeviceInfoSet = DeviceInfoSet; + Request.DeviceInfoData = DeviceInfoData; + if (RequiredSize) + *RequiredSize = 0; /* FIXME */ + pPropPageProvider(&Request, GetClassDevPropertySheetsCallback, (LPARAM)0); + ret = TRUE; + +cleanup: + if (hKey != INVALID_HANDLE_VALUE) + RegCloseKey(hKey); + HeapFree(GetProcessHeap(), 0, PropPageProvider); + FreeFunctionPointer(hModule, pPropPageProvider); + } + + TRACE("Returning %d\n", ret); + return ret; +} + +/********************************************************************** * * SetupDiCreateDevRegKeyA (SETUPAPI.@) */ HKEY WINAPI SetupDiCreateDevRegKeyA( @@ -4289,7 +4433,6 @@ HeapFree(GetProcessHeap(), 0, ProviderName); HeapFree(GetProcessHeap(), 0, DriverVer); - TRACE("Returning %d\n", ret); return ret; } @@ -5719,7 +5862,7 @@ DWORD DoAction; WCHAR SectionName[MAX_PATH]; DWORD SectionNameLength = 0; - HKEY hKey = INVALID_HANDLE_VALUE;; + HKEY hKey = INVALID_HANDLE_VALUE; InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS_W); Result = SetupDiGetDeviceInstallParamsW(DeviceInfoSet, DeviceInfoData, &InstallParams); _____ Modified: trunk/reactos/lib/setupapi/stubs.c --- trunk/reactos/lib/setupapi/stubs.c 2005-11-27 19:21:19 UTC (rev 19694) +++ trunk/reactos/lib/setupapi/stubs.c 2005-11-27 19:40:46 UTC (rev 19695) @@ -227,36 +227,6 @@ /*********************************************************************** - * SetupDiGetClassDevPropertySheetsA(SETUPAPI.@) - */ -BOOL WINAPI SetupDiGetClassDevPropertySheetsA(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, - LPPROPSHEETHEADERA PropertySheetHeader, - DWORD PropertySheetHeaderPageListSize, PDWORD RequiredSize, - DWORD PropertySheetType) -{ - FIXME ("Stub %p %p %p %d %p %d\n", - DeviceInfoSet, DeviceInfoData, PropertySheetHeader, PropertySheetHeaderPageListSize, - RequiredSize, PropertySheetType); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/********************************************************************** * - * SetupDiGetClassDevPropertySheetsW(SETUPAPI.@) - */ -BOOL WINAPI SetupDiGetClassDevPropertySheetsW(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, - LPPROPSHEETHEADERW PropertySheetHeader, - DWORD PropertySheetHeaderPageListSize, PDWORD RequiredSize, - DWORD PropertySheetType) -{ - FIXME ("Stub %p %p %p %d %p %d\n", - DeviceInfoSet, DeviceInfoData, PropertySheetHeader, PropertySheetHeaderPageListSize, - RequiredSize, PropertySheetType); - SetLastError(ERROR_CALL_NOT_IMPLEMENTED); - return FALSE; -} - -/********************************************************************** * * SetupDiLoadClassIcon(SETUPAPI.@) */ BOOL WINAPI SetupDiLoadClassIcon(CONST GUID *ClassGuid, HICON *LargeIcon, PINT MiniIconIndex)
19 years
1
0
0
0
[ion] 19694: - Fix compile issues caused by previous patch.
by ion@svn.reactos.com
- Fix compile issues caused by previous patch. - Fix KPROFILE definition. - Protect ReactOS-only members of EPROCESS, OBJECT_HEADER, W32_CALLOUT_DATA. - Protect MADDRESS_SPACE for ReactOS only. Modified: trunk/reactos/include/ndk/asm.h Modified: trunk/reactos/include/ndk/fixmes.txt Modified: trunk/reactos/include/ndk/ketypes.h Modified: trunk/reactos/include/ndk/mmtypes.h Modified: trunk/reactos/include/ndk/obtypes.h Modified: trunk/reactos/include/ndk/pstypes.h Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c Modified: trunk/reactos/ntoskrnl/ke/i386/fpu.c Modified: trunk/reactos/ntoskrnl/ke/i386/irq.c Modified: trunk/reactos/ntoskrnl/ke/i386/thread.c Modified: trunk/reactos/ntoskrnl/ke/i386/tss.c Modified: trunk/reactos/ntoskrnl/ke/i386/usertrap.c Modified: trunk/reactos/ntoskrnl/ke/i386/v86m.c Modified: trunk/reactos/ntoskrnl/ke/profile.c Modified: trunk/reactos/ntoskrnl/mm/i386/pfault.c _____ Modified: trunk/reactos/include/ndk/asm.h --- trunk/reactos/include/ndk/asm.h 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/include/ndk/asm.h 2005-11-27 19:21:19 UTC (rev 19694) @@ -64,6 +64,7 @@ #define KTSS_CR3 0x1C #define KTSS_EFLAGS 0x24 #define KTSS_IOMAPBASE 0x66 +#define KTSS_IO_MAPS 0x68 // // KTHREAD Offsets _____ Modified: trunk/reactos/include/ndk/fixmes.txt --- trunk/reactos/include/ndk/fixmes.txt 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/include/ndk/fixmes.txt 2005-11-27 19:21:19 UTC (rev 19694) @@ -2,13 +2,7 @@ -------------------------------------------------------------- ________________________________________________________________________ ______________ [CRITICAL] - Breaking compatibility with official structures. -|pstypes.h - EPROCESS has ReactOS only fields. Includes ReactOS Internal header. IFDEF_OUT -|pstypes.h - W32_CALLOUT_DATA has ReactOS only fields. IFDEF-OUT |obtypes.h - Object callbacks are ReactOS only definitions. IFDEF-OUT ADDREAL -|obtypes.h - Object Header includes ReactOS only type. IFDEF-OUT -|mmtypes.h - _MADDRESS_SPACE is ReactOS only field. IFDEF-OUT -|ketypes.h - _KPROFILE needs to be updated with new definitions. FIXFIX -|ketypes.h - _KINTERRUPT needs to be verified with new definitions. FIXFIX |haltypes.h - Loader Parameter Block is ReactOS Version, not NT. IFDEF-OUT ADDREAL | [MAJOR] - Using incorrect, missing, or invalid names or definitions. _____ Modified: trunk/reactos/include/ndk/ketypes.h --- trunk/reactos/include/ndk/ketypes.h 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/include/ndk/ketypes.h 2005-11-27 19:21:19 UTC (rev 19694) @@ -350,7 +350,7 @@ } CONFIGURATION_COMPONENT_DATA, *PCONFIGURATION_COMPONENT_DATA; // -// Kernel Memory Node (FIXME: mmtypes? +// Kernel Memory Node // typedef struct _KNODE { @@ -367,25 +367,26 @@ } KNODE, *PKNODE; // -// Kernel Profile Object (FIXME: Fix with new defs) +// Kernel Profile Object // typedef struct _KPROFILE { CSHORT Type; CSHORT Size; - LIST_ENTRY ListEntry; - PVOID RegionStart; - PVOID RegionEnd; + LIST_ENTRY ProfileListEntry; + PKPROCESS Process; + PVOID RangeBase; + PVOID RangeLimit; ULONG BucketShift; PVOID Buffer; + ULONG Segment; + KAFFINITY Affinity; KPROFILE_SOURCE Source; - ULONG Affinity; - BOOLEAN Active; - struct _KPROCESS *Process; + BOOLEAN Started; } KPROFILE, *PKPROFILE; // -// Kernel Interrupt Object (FIXME: Verify) +// Kernel Interrupt Object // typedef struct _KINTERRUPT { _____ Modified: trunk/reactos/include/ndk/mmtypes.h --- trunk/reactos/include/ndk/mmtypes.h 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/include/ndk/mmtypes.h 2005-11-27 19:21:19 UTC (rev 19694) @@ -202,6 +202,7 @@ // // FIXME: REACTOS SPECIFIC HACK IN EPROCESS // +#ifdef _REACTOS_ typedef struct _MADDRESS_SPACE { struct _MEMORY_AREA *MemoryAreaRoot; @@ -211,6 +212,7 @@ PUSHORT PageTableRefCountTable; ULONG PageTableRefCountTableSize; } MADDRESS_SPACE, *PMADDRESS_SPACE; +#endif // // Generic Address Range Structure _____ Modified: trunk/reactos/include/ndk/obtypes.h --- trunk/reactos/include/ndk/obtypes.h 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/include/ndk/obtypes.h 2005-11-27 19:21:19 UTC (rev 19694) @@ -341,11 +341,13 @@ } OBJECT_HEADER_CREATOR_INFO, *POBJECT_HEADER_CREATOR_INFO; // -// FIXME: Object Header +// Object Header // typedef struct _OBJECT_HEADER { - LIST_ENTRY Entry; +#ifdef _REACTOS_ + LIST_ENTRY Entry; // FIXME: REACTOS ONLY +#endif LONG PointerCount; union { _____ Modified: trunk/reactos/include/ndk/pstypes.h --- trunk/reactos/include/ndk/pstypes.h 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/include/ndk/pstypes.h 2005-11-27 19:21:19 UTC (rev 19694) @@ -529,10 +529,6 @@ } THREAD_BASIC_INFORMATION, *PTHREAD_BASIC_INFORMATION; #ifndef NTOS_MODE_USER -/* FIXME: see note in mmtypes.h */ -#ifdef _NTOSKRNL_ -#include <internal/mm.h> -#endif // // EPROCESS Quota Structures @@ -690,6 +686,10 @@ UCHAR ActiveFaultCount; /* 24E */ } ETHREAD; +#if defined(_NTOSKRNL_) + #include <internal/mm.h> +#endif + // // Executive Process (EPROCESS) // @@ -818,16 +818,15 @@ MM_AVL_TABLE VadRoot; /* 250 */ ULONG Cookie; /* 270 */ -/*************************************************************** - * REACTOS SPECIFIC START - ***************************************************************/ - /* FIXME WILL BE DEPRECATED WITH PUSHLOCK SUPPORT IN 0.3.0 */ +#ifdef _REACTOS_ + /* FIXME: WILL BE DEPRECATED WITH PUSHLOCK SUPPORT IN 0.3.0*/ KEVENT LockEvent; /* 274 */ ULONG LockCount; /* 284 */ struct _KTHREAD *LockOwner; /* 288 */ - /* FIXME MOVE TO AVL TREES */ + /* FIXME: MOVE TO AVL TREES */ MADDRESS_SPACE AddressSpace; /* 28C */ +#endif } EPROCESS; #include <poppack.h> @@ -919,11 +918,12 @@ OB_DELETE_METHOD WinStaDelete; OB_PARSE_METHOD WinStaParse; OB_OPEN_METHOD WinStaOpen; - - /* FIXME: These are ROS-ONLY and are fixed in a future local patch */ +#ifdef _REACTOS_ + /* FIXME: REACTOS ONLY */ OB_FIND_METHOD WinStaFind; OB_OPEN_METHOD WinStaCreate; OB_CREATE_METHOD DesktopCreate; +#endif } W32_CALLOUT_DATA, *PW32_CALLOUT_DATA; #endif // !NTOS_MODE_USER _____ Modified: trunk/reactos/ntoskrnl/ke/i386/exp.c --- trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/ntoskrnl/ke/i386/exp.c 2005-11-27 19:21:19 UTC (rev 19694) @@ -167,7 +167,7 @@ { Er.ExceptionCode = STATUS_ACCESS_VIOLATION; Er.NumberParameters = 2; - Er.ExceptionInformation[0] = Tf->ErrorCode & 0x1; + Er.ExceptionInformation[0] = Tf->ErrCode & 0x1; Er.ExceptionInformation[1] = (ULONG)Cr2; } else @@ -194,6 +194,7 @@ VOID KiDoubleFaultHandler(VOID) { +#if 0 unsigned int cr2; ULONG StackLimit; ULONG StackBase; @@ -212,7 +213,7 @@ #endif OldTss = KeGetCurrentKPCR()->TSS; - Esp0 = OldTss->Esp; + Esp0 = OldTss->Esp0; /* Get CR2 */ cr2 = Ke386GetCr2(); @@ -394,7 +395,7 @@ } #endif } - +#endif DbgPrint("\n"); for(;;); } @@ -406,8 +407,8 @@ ULONG cr3_; ULONG StackLimit; ULONG Esp0; - ULONG ExceptionNr = (ULONG)Tf->DebugArgMark; - ULONG cr2 = (ULONG)Tf->DebugPointer; + ULONG ExceptionNr = (ULONG)Tf->DbgArgMark; + ULONG cr2 = (ULONG)Tf->DbgArgPointer; Esp0 = (ULONG)Tf; @@ -417,14 +418,14 @@ if (ExceptionNr < ARRAY_SIZE(ExceptionTypeStrings)) { DbgPrint("%s Exception: %d(%x)\n", ExceptionTypeStrings[ExceptionNr], - ExceptionNr, Tf->ErrorCode&0xffff); + ExceptionNr, Tf->ErrCode&0xffff); } else { - DbgPrint("Exception: %d(%x)\n", ExceptionNr, Tf->ErrorCode&0xffff); + DbgPrint("Exception: %d(%x)\n", ExceptionNr, Tf->ErrCode&0xffff); } DbgPrint("Processor: %d CS:EIP %x:%x ", KeGetCurrentProcessorNumber(), - Tf->Cs&0xffff, Tf->Eip); + Tf->SegCs&0xffff, Tf->Eip); KeRosPrintAddress((PVOID)Tf->Eip); DbgPrint("\n"); Ke386GetPageTableDirectory(cr3_); @@ -442,13 +443,13 @@ PsGetCurrentThread()->Cid.UniqueThread); } DbgPrint("\n"); - DbgPrint("DS %x ES %x FS %x GS %x\n", Tf->Ds&0xffff, Tf->Es&0xffff, - Tf->Fs&0xffff, Tf->Gs&0xfff); + DbgPrint("DS %x ES %x FS %x GS %x\n", Tf->SegDs&0xffff, Tf->SegEs&0xffff, + Tf->SegFs&0xffff, Tf->SegGs&0xfff); DbgPrint("EAX: %.8x EBX: %.8x ECX: %.8x\n", Tf->Eax, Tf->Ebx, Tf->Ecx); DbgPrint("EDX: %.8x EBP: %.8x ESI: %.8x ESP: %.8x\n", Tf->Edx, Tf->Ebp, Tf->Esi, Esp0); - DbgPrint("EDI: %.8x EFLAGS: %.8x ", Tf->Edi, Tf->Eflags); - if ((Tf->Cs&0xffff) == KGDT_R0_CODE) + DbgPrint("EDI: %.8x EFLAGS: %.8x ", Tf->Edi, Tf->EFlags); + if ((Tf->SegCs&0xffff) == KGDT_R0_CODE) { DbgPrint("kESP %.8x ", Esp0); if (PsGetCurrentThread() != NULL) @@ -490,21 +491,21 @@ ASSERT(ExceptionNr != 14); /* Store the exception number in an unused field in the trap frame. */ - Tf->DebugArgMark = ExceptionNr; + Tf->DbgArgMark = ExceptionNr; /* Use the address of the trap frame as approximation to the ring0 esp */ Esp0 = (ULONG)&Tf->Eip; /* Get CR2 */ cr2 = Ke386GetCr2(); - Tf->DebugPointer = cr2; + Tf->DbgArgPointer = cr2; /* * If this was a V86 mode exception then handle it specially */ - if (Tf->Eflags & (1 << 17)) + if (Tf->EFlags & (1 << 17)) { - DPRINT("Tf->Eflags, %x, Tf->Eip %x, ExceptionNr: %d\n", Tf->Eflags, Tf->Eip, ExceptionNr); + DPRINT("Tf->Eflags, %x, Tf->Eip %x, ExceptionNr: %d\n", Tf->EFlags, Tf->Eip, ExceptionNr); return(KeV86Exception(ExceptionNr, Tf, cr2)); } @@ -561,7 +562,7 @@ /* * Handle user exceptions differently */ - if ((Tf->Cs & 0xFFFF) == (KGDT_R3_CODE | RPL_MASK)) + if ((Tf->SegCs & 0xFFFF) == (KGDT_R3_CODE | RPL_MASK)) { return(KiUserTrapHandler(Tf, ExceptionNr, (PVOID)cr2)); } @@ -576,15 +577,15 @@ KiEspFromTrapFrame(IN PKTRAP_FRAME TrapFrame) { /* Check if this is user-mode or V86 */ - if ((TrapFrame->Cs & 1) || (TrapFrame->Eflags & X86_EFLAGS_VM)) + if ((TrapFrame->SegCs & MODE_MASK) || (TrapFrame->EFlags & X86_EFLAGS_VM)) { /* Return it directly */ - return TrapFrame->Esp; + return TrapFrame->HardwareEsp; } else { /* Edited frame */ - if (!(TrapFrame->Cs & FRAME_EDITED)) + if (!(TrapFrame->SegCs & FRAME_EDITED)) { /* Return edited value */ return TrapFrame->TempEsp; @@ -592,7 +593,7 @@ else { /* Virgin frame, calculate */ - return (ULONG)&TrapFrame->Esp; + return (ULONG)&TrapFrame->HardwareEsp; } } } @@ -605,10 +606,10 @@ ULONG Previous = KiEspFromTrapFrame(TrapFrame); /* Check if this is user-mode or V86 */ - if ((TrapFrame->Cs & MODE_MASK) || (TrapFrame->Eflags & X86_EFLAGS_VM)) + if ((TrapFrame->SegCs & MODE_MASK) || (TrapFrame->EFlags & X86_EFLAGS_VM)) { /* Write it directly */ - TrapFrame->Esp = Esp; + TrapFrame->HardwareEsp = Esp; } else { @@ -619,7 +620,7 @@ } /* Create an edit frame, check if it was alrady */ - if (!(TrapFrame->Cs & FRAME_EDITED)) + if (!(TrapFrame->SegCs & FRAME_EDITED)) { /* Update the value */ TrapFrame->TempEsp = Esp; @@ -630,8 +631,8 @@ if (Previous != Esp) { /* Save CS */ - TrapFrame->TempCs = TrapFrame->Cs; - TrapFrame->Cs &= ~FRAME_EDITED; + TrapFrame->TempSegCs = TrapFrame->SegCs; + TrapFrame->SegCs &= ~FRAME_EDITED; /* Save ESP */ TrapFrame->TempEsp = Esp; @@ -645,15 +646,15 @@ KiSsFromTrapFrame(IN PKTRAP_FRAME TrapFrame) { /* If this was V86 Mode */ - if (TrapFrame->Eflags & X86_EFLAGS_VM) + if (TrapFrame->EFlags & X86_EFLAGS_VM) { /* Just return it */ - return TrapFrame->Ss; + return TrapFrame->HardwareSegSs; } - else if (TrapFrame->Cs & MODE_MASK) + else if (TrapFrame->SegCs & MODE_MASK) { /* Usermode, return the User SS */ - return TrapFrame->Ss | RPL_MASK; + return TrapFrame->HardwareSegSs | RPL_MASK; } else { @@ -671,15 +672,15 @@ Ss &= 0xFFFF; /* If this was V86 Mode */ - if (TrapFrame->Eflags & X86_EFLAGS_VM) + if (TrapFrame->EFlags & X86_EFLAGS_VM) { /* Just write it */ - TrapFrame->Ss = Ss; + TrapFrame->HardwareSegSs = Ss; } - else if (TrapFrame->Cs & MODE_MASK) + else if (TrapFrame->SegCs & MODE_MASK) { /* Usermode, save the User SS */ - TrapFrame->Ss = Ss | RPL_MASK; + TrapFrame->HardwareSegSs = Ss | RPL_MASK; } } @@ -697,35 +698,35 @@ { /* Check if we went through a V86 switch */ if ((Context->EFlags & X86_EFLAGS_VM) != - (TrapFrame->Eflags & X86_EFLAGS_VM)) + (TrapFrame->EFlags & X86_EFLAGS_VM)) { /* We did, remember this for later */ V86Switch = TRUE; } /* Copy EFLAGS. FIXME: Needs to be sanitized */ - TrapFrame->Eflags = Context->EFlags; + TrapFrame->EFlags = Context->EFlags; /* Copy EBP and EIP */ TrapFrame->Ebp = Context->Ebp; TrapFrame->Eip = Context->Eip; /* Check if we were in V86 Mode */ - if (TrapFrame->Eflags & X86_EFLAGS_VM) + if (TrapFrame->EFlags & X86_EFLAGS_VM) { /* Simply copy the CS value */ - TrapFrame->Cs = Context->SegCs; + TrapFrame->SegCs = Context->SegCs; } else { /* We weren't in V86, so sanitize the CS (FIXME!) */ - TrapFrame->Cs = Context->SegCs; + TrapFrame->SegCs = Context->SegCs; /* Don't let it under 8, that's invalid */ - if ((PreviousMode != KernelMode) && (TrapFrame->Cs < 8)) + if ((PreviousMode != KernelMode) && (TrapFrame->SegCs < 8)) { /* Force it to User CS */ - TrapFrame->Cs = (KGDT_R3_CODE | RPL_MASK); + TrapFrame->SegCs = (KGDT_R3_CODE | RPL_MASK); } } @@ -754,39 +755,39 @@ if ((Context->ContextFlags & CONTEXT_SEGMENTS) == CONTEXT_SEGMENTS) { /* Check if we were in V86 Mode */ - if (TrapFrame->Eflags & X86_EFLAGS_VM) + if (TrapFrame->EFlags & X86_EFLAGS_VM) { /* Copy the V86 Segments directlry */ - TrapFrame->V86_Ds = Context->SegDs; - TrapFrame->V86_Es = Context->SegEs; - TrapFrame->V86_Fs = Context->SegFs; - TrapFrame->V86_Gs = Context->SegGs; + TrapFrame->V86Ds = Context->SegDs; + TrapFrame->V86Es = Context->SegEs; + TrapFrame->V86Fs = Context->SegFs; + TrapFrame->V86Gs = Context->SegGs; } - else if (!(TrapFrame->Cs & MODE_MASK)) + else if (!(TrapFrame->SegCs & MODE_MASK)) { /* For user mode, write the values directly */ - TrapFrame->Ds = KGDT_R3_DATA | RPL_MASK; - TrapFrame->Es = KGDT_R3_DATA | RPL_MASK; - TrapFrame->Fs = Context->SegFs; - TrapFrame->Gs = 0; + TrapFrame->SegDs = KGDT_R3_DATA | RPL_MASK; + TrapFrame->SegEs = KGDT_R3_DATA | RPL_MASK; + TrapFrame->SegFs = Context->SegFs; + TrapFrame->SegGs = 0; } else { /* For kernel-mode, return the values */ - TrapFrame->Ds = Context->SegDs; - TrapFrame->Es = Context->SegEs; - TrapFrame->Fs = Context->SegFs; + TrapFrame->SegDs = Context->SegDs; + TrapFrame->SegEs = Context->SegEs; + TrapFrame->SegFs = Context->SegFs; /* Handle GS specially */ - if (TrapFrame->Cs == (KGDT_R3_CODE | RPL_MASK)) + if (TrapFrame->SegCs == (KGDT_R3_CODE | RPL_MASK)) { /* Don't use it, if user */ - TrapFrame->Gs = 0; + TrapFrame->SegGs = 0; } else { /* Copy it if kernel */ - TrapFrame->Gs = Context->SegGs; + TrapFrame->SegGs = Context->SegGs; } } } @@ -828,19 +829,19 @@ /* EBP, EIP and EFLAGS */ Context->Ebp = TrapFrame->Ebp; Context->Eip = TrapFrame->Eip; - Context->EFlags = TrapFrame->Eflags; + Context->EFlags = TrapFrame->EFlags; /* Return the correct CS */ - if (!(TrapFrame->Cs & FRAME_EDITED) && - !(TrapFrame->Eflags & X86_EFLAGS_VM)) + if (!(TrapFrame->SegCs & FRAME_EDITED) && + !(TrapFrame->EFlags & X86_EFLAGS_VM)) { /* Get it from the Temp location */ - Context->SegCs = TrapFrame->TempCs & 0xFFFF; + Context->SegCs = TrapFrame->TempSegCs & 0xFFFF; } else { /* Return it directly */ - Context->SegCs = TrapFrame->Cs & 0xFFFF; + Context->SegCs = TrapFrame->SegCs & 0xFFFF; } /* Get the Ss and ESP */ @@ -852,31 +853,31 @@ if ((Context->ContextFlags & CONTEXT_SEGMENTS) == CONTEXT_SEGMENTS) { /* Do V86 Mode first */ - if (TrapFrame->Eflags & X86_EFLAGS_VM) + if (TrapFrame->EFlags & X86_EFLAGS_VM) { /* Return from the V86 location */ - Context->SegGs = TrapFrame->V86_Gs & 0xFFFF; - Context->SegFs = TrapFrame->V86_Fs & 0xFFFF; - Context->SegEs = TrapFrame->V86_Es & 0xFFFF; - Context->SegDs = TrapFrame->V86_Ds & 0xFFFF; + Context->SegGs = TrapFrame->V86Gs & 0xFFFF; + Context->SegFs = TrapFrame->V86Fs & 0xFFFF; + Context->SegEs = TrapFrame->V86Es & 0xFFFF; + Context->SegDs = TrapFrame->V86Ds & 0xFFFF; } else { /* Check if this was a Kernel Trap */ - if (TrapFrame->Cs == KGDT_R0_CODE) + if (TrapFrame->SegCs == KGDT_R0_CODE) { /* Set valid selectors */ - TrapFrame->Gs = 0; - TrapFrame->Fs = KGDT_R0_PCR; - TrapFrame->Es = KGDT_R3_DATA | RPL_MASK; - TrapFrame->Ds = KGDT_R3_DATA | RPL_MASK; + TrapFrame->SegGs = 0; + TrapFrame->SegFs = KGDT_R0_PCR; + TrapFrame->SegEs = KGDT_R3_DATA | RPL_MASK; + TrapFrame->SegDs = KGDT_R3_DATA | RPL_MASK; } /* Return the segments */ - Context->SegGs = TrapFrame->Gs & 0xFFFF; - Context->SegFs = TrapFrame->Fs & 0xFFFF; - Context->SegEs = TrapFrame->Es & 0xFFFF; - Context->SegDs = TrapFrame->Ds & 0xFFFF; + Context->SegGs = TrapFrame->SegGs & 0xFFFF; + Context->SegFs = TrapFrame->SegFs & 0xFFFF; + Context->SegEs = TrapFrame->SegEs & 0xFFFF; + Context->SegDs = TrapFrame->SegDs & 0xFFFF; } } _____ Modified: trunk/reactos/ntoskrnl/ke/i386/fpu.c --- trunk/reactos/ntoskrnl/ke/i386/fpu.c 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/ntoskrnl/ke/i386/fpu.c 2005-11-27 19:21:19 UTC (rev 19694) @@ -373,7 +373,7 @@ (void) cr0; ASSERT((cr0 & X86_CR0_TS) == X86_CR0_TS); - ASSERT((Tf->Eflags & X86_EFLAGS_VM) == 0); + ASSERT((Tf->EFlags & X86_EFLAGS_VM) == 0); ASSERT((cr0 & X86_CR0_EM) == 0); /* disable scheduler, clear TS in cr0 */ @@ -485,7 +485,7 @@ } KeLowerIrql(OldIrql); - PreviousMode = ((Tf->Cs & 0xffff) == (KGDT_R3_CODE | RPL_MASK)) ? (UserMode) : (KernelMode); + PreviousMode = ((Tf->SegCs & 0xffff) == (KGDT_R3_CODE | RPL_MASK)) ? (UserMode) : (KernelMode); DPRINT("Math/Xmm fault happened! (PreviousMode = %s)\n", (PreviousMode != KernelMode) ? ("UserMode") : ("KernelMode")); _____ Modified: trunk/reactos/ntoskrnl/ke/i386/irq.c --- trunk/reactos/ntoskrnl/ke/i386/irq.c 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/ntoskrnl/ke/i386/irq.c 2005-11-27 19:21:19 UTC (rev 19694) @@ -170,42 +170,42 @@ KeIRQTrapFrameToTrapFrame(PKIRQ_TRAPFRAME IrqTrapFrame, PKTRAP_FRAME TrapFrame) { - TrapFrame->Gs = (USHORT)IrqTrapFrame->Gs; - TrapFrame->Fs = (USHORT)IrqTrapFrame->Fs; - TrapFrame->Es = (USHORT)IrqTrapFrame->Es; - TrapFrame->Ds = (USHORT)IrqTrapFrame->Ds; + TrapFrame->SegGs = (USHORT)IrqTrapFrame->Gs; + TrapFrame->SegFs = (USHORT)IrqTrapFrame->Fs; + TrapFrame->SegEs = (USHORT)IrqTrapFrame->Es; + TrapFrame->SegDs = (USHORT)IrqTrapFrame->Ds; TrapFrame->Eax = IrqTrapFrame->Eax; TrapFrame->Ecx = IrqTrapFrame->Ecx; TrapFrame->Edx = IrqTrapFrame->Edx; TrapFrame->Ebx = IrqTrapFrame->Ebx; - TrapFrame->Esp = IrqTrapFrame->Esp; + TrapFrame->HardwareEsp = IrqTrapFrame->Esp; TrapFrame->Ebp = IrqTrapFrame->Ebp; TrapFrame->Esi = IrqTrapFrame->Esi; TrapFrame->Edi = IrqTrapFrame->Edi; TrapFrame->Eip = IrqTrapFrame->Eip; - TrapFrame->Cs = IrqTrapFrame->Cs; - TrapFrame->Eflags = IrqTrapFrame->Eflags; + TrapFrame->SegCs = IrqTrapFrame->Cs; + TrapFrame->EFlags = IrqTrapFrame->Eflags; } STATIC VOID KeTrapFrameToIRQTrapFrame(PKTRAP_FRAME TrapFrame, PKIRQ_TRAPFRAME IrqTrapFrame) { - IrqTrapFrame->Gs = TrapFrame->Gs; - IrqTrapFrame->Fs = TrapFrame->Fs; - IrqTrapFrame->Es = TrapFrame->Es; - IrqTrapFrame->Ds = TrapFrame->Ds; + IrqTrapFrame->Gs = TrapFrame->SegGs; + IrqTrapFrame->Fs = TrapFrame->SegFs; + IrqTrapFrame->Es = TrapFrame->SegEs; + IrqTrapFrame->Ds = TrapFrame->SegDs; IrqTrapFrame->Eax = TrapFrame->Eax; IrqTrapFrame->Ecx = TrapFrame->Ecx; IrqTrapFrame->Edx = TrapFrame->Edx; IrqTrapFrame->Ebx = TrapFrame->Ebx; - IrqTrapFrame->Esp = TrapFrame->Esp; + IrqTrapFrame->Esp = TrapFrame->HardwareEsp; IrqTrapFrame->Ebp = TrapFrame->Ebp; IrqTrapFrame->Esi = TrapFrame->Esi; IrqTrapFrame->Edi = TrapFrame->Edi; IrqTrapFrame->Eip = TrapFrame->Eip; - IrqTrapFrame->Cs = TrapFrame->Cs; - IrqTrapFrame->Eflags = TrapFrame->Eflags; + IrqTrapFrame->Cs = TrapFrame->SegCs; + IrqTrapFrame->Eflags = TrapFrame->EFlags; } VOID STDCALL _____ Modified: trunk/reactos/ntoskrnl/ke/i386/thread.c --- trunk/reactos/ntoskrnl/ke/i386/thread.c 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/ntoskrnl/ke/i386/thread.c 2005-11-27 19:21:19 UTC (rev 19694) @@ -95,11 +95,11 @@ } /* Enable Interrupts and disable some unsupported flags right now */ - TrapFrame->Eflags = Context->EFlags | X86_EFLAGS_IF; - TrapFrame->Eflags &= ~(X86_EFLAGS_VM | X86_EFLAGS_NT | X86_EFLAGS_IOPL); + TrapFrame->EFlags = Context->EFlags | X86_EFLAGS_IF; + TrapFrame->EFlags &= ~(X86_EFLAGS_VM | X86_EFLAGS_NT | X86_EFLAGS_IOPL); /* Set the previous mode as user */ - TrapFrame->PreviousMode = UserMode; + TrapFrame->PreviousPreviousMode = UserMode; /* Terminate the Exception Handler List */ TrapFrame->ExceptionList = (PVOID)0xFFFFFFFF; _____ Modified: trunk/reactos/ntoskrnl/ke/i386/tss.c --- trunk/reactos/ntoskrnl/ke/i386/tss.c 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/ntoskrnl/ke/i386/tss.c 2005-11-27 19:21:19 UTC (rev 19694) @@ -16,6 +16,11 @@ /* GLOBALS *******************************************************************/ +typedef struct _KTSSNOIOPM +{ + UCHAR TssData[KTSS_IO_MAPS]; +} KTSSNOIOPM; + static KTSS* Ki386TssArray[MAXIMUM_PROCESSORS]; PVOID Ki386InitialStackArray[MAXIMUM_PROCESSORS]; static KTSSNOIOPM* Ki386TrapTssArray[MAXIMUM_PROCESSORS]; @@ -38,7 +43,7 @@ USHORT Offset; if(EnableDisable > 1) return FALSE; - Offset = (EnableDisable) ? (USHORT) FIELD_OFFSET(KTSS, IoBitmap) : 0xffff; + Offset = (EnableDisable) ? (USHORT) FIELD_OFFSET(KTSS, IoMaps) : 0xffff; oldIrql = KeRaiseIrqlToSynchLevel(); Process->Pcb.IopmOffset = Offset; @@ -62,7 +67,7 @@ oldIrql = KeRaiseIrqlToSynchLevel(); - memcpy(&KeGetCurrentKPCR()->TSS->IoBitmap[0], + memcpy(&KeGetCurrentKPCR()->TSS->IoMaps[0], IOMapStart, 0x2000); @@ -85,7 +90,7 @@ oldIrql = KeRaiseIrqlToSynchLevel(); memcpy(IOMapStart, - &KeGetCurrentKPCR()->TSS->IoBitmap[0], + &KeGetCurrentKPCR()->TSS->IoMaps[0], 0x2000); KeLowerIrql(oldIrql); @@ -96,8 +101,8 @@ Ki386ApplicationProcessorInitializeTSS(VOID) { ULONG cr3_; - KTSS* Tss; - KTSSNOIOPM* TrapTss; + PKTSS Tss; + PKTSS TrapTss; PVOID TrapStack; ULONG Id; PUSHORT Gdt; @@ -113,7 +118,7 @@ TrapStack = ExAllocatePool(NonPagedPool, MM_STACK_SIZE); Ki386TssArray[Id] = Tss; - Ki386TrapTssArray[Id] = TrapTss; + Ki386TrapTssArray[Id] = (KTSSNOIOPM*)TrapTss; Ki386TrapStackArray[Id] = TrapStack; KeGetCurrentKPCR()->TSS = Tss; @@ -121,8 +126,7 @@ Tss->Esp0 = (ULONG)Ki386InitialStackArray[Id] + MM_STACK_SIZE; /* FIXME: - sizeof(FX_SAVE_AREA)? */ Tss->Ss0 = KGDT_R0_DATA; Tss->IoMapBase = 0xFFFF; /* No i/o bitmap */ - Tss->IoBitmap[8192] = 0xFF; - Tss->Ldt = 0; + Tss->LDT = 0; /* * Initialize a descriptor for the TSS @@ -137,20 +141,16 @@ ((base & 0xFF000000) >> 16)); /* Initialize the TSS used for handling double faults. */ - TrapTss->Eflags = 0; + TrapTss->Flags = 0; TrapTss->Esp0 = ((ULONG)TrapStack + MM_STACK_SIZE); /* FIXME: - sizeof(FX_SAVE_AREA)? */ TrapTss->Ss0 = KGDT_R0_DATA; - TrapTss->Esp = ((ULONG)TrapStack + MM_STACK_SIZE); /* FIXME: - sizeof(FX_SAVE_AREA)? */ TrapTss->Cs = KGDT_R0_CODE; TrapTss->Eip = (ULONG)KiTrap8; - TrapTss->Ss = KGDT_R0_DATA; TrapTss->Ds = KGDT_R0_DATA; TrapTss->Es = KGDT_R0_DATA; TrapTss->Fs = KGDT_R0_PCR; TrapTss->IoMapBase = 0xFFFF; /* No i/o bitmap */ - TrapTss->IoBitmap[0] = 0xFF; - TrapTss->Ldt = 0; - TrapTss->Cr3 = cr3_; + TrapTss->LDT = 0; /* * Initialize a descriptor for the trap TSS. @@ -185,6 +185,7 @@ ULONG cr3_; extern unsigned int trap_stack, trap_stack_top; unsigned int base, length; + PKTSS Tss; Ke386GetPageTableDirectory(cr3_); @@ -196,10 +197,8 @@ /* Initialize the boot TSS. */ KiBootTss.Esp0 = (ULONG)init_stack_top - sizeof(FX_SAVE_AREA); KiBootTss.Ss0 = KGDT_R0_DATA; - // KiBootTss.IoMapBase = FIELD_OFFSET(KTSS, IoBitmap); KiBootTss.IoMapBase = 0xFFFF; /* No i/o bitmap */ - KiBootTss.IoBitmap[8192] = 0xFF; - KiBootTss.Ldt = KGDT_LDT; + KiBootTss.LDT = KGDT_LDT; /* * Initialize a descriptor for the TSS @@ -214,20 +213,17 @@ ((base & 0xFF000000) >> 16); /* Initialize the TSS used for handling double faults. */ - KiBootTrapTss.Eflags = 0; - KiBootTrapTss.Esp0 = (ULONG)trap_stack_top; /* FIXME: - sizeof(FX_SAVE_AREA)? */ - KiBootTrapTss.Ss0 = KGDT_R0_DATA; - KiBootTrapTss.Esp = (ULONG)trap_stack_top; /* FIXME: - sizeof(FX_SAVE_AREA)? */ - KiBootTrapTss.Cs = KGDT_R0_CODE; - KiBootTrapTss.Eip = (ULONG)KiTrap8; - KiBootTrapTss.Ss = KGDT_R0_DATA; - KiBootTrapTss.Ds = KGDT_R0_DATA; - KiBootTrapTss.Es = KGDT_R0_DATA; - KiBootTrapTss.Fs = KGDT_R0_PCR; - KiBootTrapTss.IoMapBase = 0xFFFF; /* No i/o bitmap */ - KiBootTrapTss.IoBitmap[0] = 0xFF; - KiBootTrapTss.Ldt = 0x0; - KiBootTrapTss.Cr3 = cr3_; + Tss = (PKTSS)&KiBootTrapTss; + Tss->Flags = 0; + Tss->Esp0 = (ULONG)trap_stack_top; /* FIXME: - sizeof(FX_SAVE_AREA)? */ + Tss->Ss0 = KGDT_R0_DATA; + Tss->Cs = KGDT_R0_CODE; + Tss->Eip = (ULONG)KiTrap8; + Tss->Ds = KGDT_R0_DATA; + Tss->Es = KGDT_R0_DATA; + Tss->Fs = KGDT_R0_PCR; + Tss->IoMapBase = 0xFFFF; /* No i/o bitmap */ + Tss->LDT = 0x0; /* * Initialize a descriptor for the trap TSS. _____ Modified: trunk/reactos/ntoskrnl/ke/i386/usertrap.c --- trunk/reactos/ntoskrnl/ke/i386/usertrap.c 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/ntoskrnl/ke/i386/usertrap.c 2005-11-27 19:21:19 UTC (rev 19694) @@ -117,7 +117,7 @@ if (ExceptionNr == 14) { Er.NumberParameters = 2; - Er.ExceptionInformation[0] = Tf->ErrorCode & 0x1; + Er.ExceptionInformation[0] = Tf->ErrCode & 0x1; Er.ExceptionInformation[1] = (ULONG)Cr2; } else _____ Modified: trunk/reactos/ntoskrnl/ke/i386/v86m.c --- trunk/reactos/ntoskrnl/ke/i386/v86m.c 2005-11-27 18:24:32 UTC (rev 19693) +++ trunk/reactos/ntoskrnl/ke/i386/v86m.c 2005-11-27 19:21:19 UTC (rev 19694) @@ -37,12 +37,12 @@ ULONG i = 0; BOOL Exit = FALSE; - ip = (PUCHAR)((Tf->Cs & 0xFFFF) * 16 + (Tf->Eip & 0xFFFF)); - sp = (PUSHORT)((Tf->Ss & 0xFFFF) * 16 + (Tf->Esp & 0xFFFF)); + ip = (PUCHAR)((Tf->SegCs & 0xFFFF) * 16 + (Tf->Eip & 0xFFFF)); + sp = (PUSHORT)((Tf->HardwareSegSs & 0xFFFF) * 16 + (Tf->HardwareEsp & 0xFFFF)); dsp = (PULONG)sp; DPRINT("KeV86GPF handling %x at %x:%x ss:sp %x:%x Flags %x\n", - ip[0], Tf->Cs, Tf->Eip, Tf->Ss, Tf->Esp, VTf->regs->Flags); + ip[0], Tf->SegCs, Tf->Eip, Tf->Ss, Tf->HardwareEsp, VTf->regs->Flags); while (!Exit) { @@ -113,9 +113,9 @@ Tf->Eip++; if (!BigAddressPrefix) { - Tf->Esp = Tf->Esp - 2; + Tf->HardwareEsp = Tf->HardwareEsp - 2; sp = sp - 1; - sp[0] = (USHORT)(Tf->Eflags & 0xFFFF); + sp[0] = (USHORT)(Tf->EFlags & 0xFFFF); if (VTf->regs->Vif == 1) { sp[0] = (USHORT)(sp[0] | INTERRUPT_FLAG); @@ -127,9 +127,9 @@ } else { - Tf->Esp = Tf->Esp - 4; + Tf->HardwareEsp = Tf->HardwareEsp - 4; dsp = dsp - 1; - dsp[0] = Tf->Eflags; + dsp[0] = Tf->EFlags; dsp[0] = dsp[0] & VALID_FLAGS; if (VTf->regs->Vif == 1) { @@ -157,9 +157,9 @@ Tf->Eip++; if (!BigAddressPrefix) { - Tf->Eflags = Tf->Eflags & (~0xFFFF); - Tf->Eflags = Tf->Eflags | (sp[0] & VALID_FLAGS); - if (Tf->Eflags & INTERRUPT_FLAG) + Tf->EFlags = Tf->EFlags & (~0xFFFF); + Tf->EFlags = Tf->EFlags | (sp[0] & VALID_FLAGS); + if (Tf->EFlags & INTERRUPT_FLAG) { VTf->regs->Vif = 1; } @@ -167,12 +167,12 @@ { VTf->regs->Vif = 0; } - Tf->Eflags = Tf->Eflags | INTERRUPT_FLAG; - Tf->Esp = Tf->Esp + 2; + Tf->EFlags = Tf->EFlags | INTERRUPT_FLAG; + Tf->HardwareEsp = Tf->HardwareEsp + 2; } else { - Tf->Eflags = Tf->Eflags | (dsp[0] & VALID_FLAGS); + Tf->EFlags = Tf->EFlags | (dsp[0] & VALID_FLAGS); if (dsp[0] & INTERRUPT_FLAG) { VTf->regs->Vif = 1; @@ -181,8 +181,8 @@ { VTf->regs->Vif = 0; } - Tf->Eflags = Tf->Eflags | INTERRUPT_FLAG; - Tf->Esp = Tf->Esp + 2; + Tf->EFlags = Tf->EFlags | INTERRUPT_FLAG; + Tf->HardwareEsp = Tf->HardwareEsp + 2; } return(0); } @@ -199,10 +199,10 @@ if (VTf->regs->Flags & KV86M_EMULATE_CLI_STI) { Tf->Eip = sp[0]; - Tf->Cs = sp[1]; - Tf->Eflags = Tf->Eflags & (~0xFFFF); - Tf->Eflags = Tf->Eflags | sp[2]; - if (Tf->Eflags & INTERRUPT_FLAG) + Tf->SegCs = sp[1]; + Tf->EFlags = Tf->EFlags & (~0xFFFF); + Tf->EFlags = Tf->EFlags | sp[2]; + if (Tf->EFlags & INTERRUPT_FLAG) { VTf->regs->Vif = 1; } @@ -210,8 +210,8 @@ { VTf->regs->Vif = 0; } - Tf->Eflags = Tf->Eflags & (~INTERRUPT_FLAG); - Tf->Esp = Tf->Esp + 6; + Tf->EFlags = Tf->EFlags & (~INTERRUPT_FLAG); + Tf->HardwareEsp = Tf->HardwareEsp + 6; return(0); } Exit = TRUE; @@ -433,11 +433,11 @@ { Offset = Offset & 0xFFFF; } - Buffer = (PUCHAR)((Tf->Es * 16) + Offset); + Buffer = (PUCHAR)((Tf->SegEs * 16) + Offset); for (; Count > 0; Count--) { WRITE_PORT_UCHAR(Port, *Buffer); - if (Tf->Eflags & DIRECTION_FLAG) + if (Tf->EFlags & DIRECTION_FLAG) { Buffer++; } @@ -480,11 +480,11 @@ } if (BigDataPrefix) { - BufferL = (PULONG)((Tf->Es * 16) + Offset); + BufferL = (PULONG)((Tf->SegEs * 16) + Offset); } else { - BufferS = (PUSHORT)((Tf->Es * 16) + Offset); + BufferS = (PUSHORT)((Tf->SegEs * 16) + Offset); } for (; Count > 0; Count--) { @@ -496,7 +496,7 @@ { WRITE_PORT_USHORT((PUSHORT)Port, *BufferS); } - if (Tf->Eflags & DIRECTION_FLAG) + if (Tf->EFlags & DIRECTION_FLAG) { if (BigDataPrefix) { @@ -550,11 +550,11 @@ { Offset = Offset & 0xFFFF; } - Buffer = (PUCHAR)((Tf->Es * 16) + Offset); + Buffer = (PUCHAR)((Tf->SegEs * 16) + Offset); for (; Count > 0; Count--) { *Buffer = READ_PORT_UCHAR(Port); - if (Tf->Eflags & DIRECTION_FLAG) + if (Tf->EFlags & DIRECTION_FLAG) { Buffer++; } @@ -597,11 +597,11 @@ } if (BigDataPrefix) { [truncated at 1000 lines; 210 more skipped]
19 years
1
0
0
0
[ion] 19693: - Remove KTSS_NOIOMP from NDK.
by ion@svn.reactos.com
- Remove KTSS_NOIOMP from NDK. - Fix KTSS definition. - Fix KTRAP_FRAME definition. - Fix RTL_PROCESS_BACKTRACE_INFORMATION and RTL_PROCESS_BACKTRACES definitions. - Fix/rename RUNDOWN_DESCRIPTOR definition. - Rename PPF_ definitions to RTL_USER_PROCESS_PARAMETERS_ - Setup a global _REACTOS_ define when code is compiled. - #ifdef out the multiboot flags from the NDK so they'll only be available for ReactOS. Dirty 'hack' until we stop using them. - Update NDK Fixme list, since all major bugs are fixed now. Modified: trunk/reactos/hal/halx86/mp/apic.c Modified: trunk/reactos/include/ndk/extypes.h Modified: trunk/reactos/include/ndk/fixmes.txt Modified: trunk/reactos/include/ndk/haltypes.h Modified: trunk/reactos/include/ndk/i386/ketypes.h Modified: trunk/reactos/include/ndk/lpctypes.h Modified: trunk/reactos/include/ndk/rtltypes.h Modified: trunk/reactos/lib/kernel32/process/create.c Modified: trunk/reactos/lib/rtl/ppb.c Modified: trunk/reactos/lib/rtl/process.c Modified: trunk/reactos/ntoskrnl/ex/init.c Modified: trunk/reactos/ntoskrnl/ex/rundown.c Modified: trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c Modified: trunk/reactos/ntoskrnl/ke/apc.c Modified: trunk/reactos/ntoskrnl/ke/clock.c Modified: trunk/reactos/ntoskrnl/ke/usercall.c Modified: trunk/reactos/ntoskrnl/mm/pagefile.c Modified: trunk/reactos/ntoskrnl/ps/debug.c _____ Modified: trunk/reactos/hal/halx86/mp/apic.c --- trunk/reactos/hal/halx86/mp/apic.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/hal/halx86/mp/apic.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -772,21 +772,21 @@ MpsIRQTrapFrameToTrapFrame(PKIRQ_TRAPFRAME IrqTrapFrame, PKTRAP_FRAME TrapFrame) { - TrapFrame->Gs = (USHORT)IrqTrapFrame->Gs; - TrapFrame->Fs = (USHORT)IrqTrapFrame->Fs; - TrapFrame->Es = (USHORT)IrqTrapFrame->Es; - TrapFrame->Ds = (USHORT)IrqTrapFrame->Ds; + TrapFrame->SegGs = (USHORT)IrqTrapFrame->Gs; + TrapFrame->SegFs = (USHORT)IrqTrapFrame->Fs; + TrapFrame->SegEs = (USHORT)IrqTrapFrame->Es; + TrapFrame->SegDs = (USHORT)IrqTrapFrame->Ds; TrapFrame->Eax = IrqTrapFrame->Eax; TrapFrame->Ecx = IrqTrapFrame->Ecx; TrapFrame->Edx = IrqTrapFrame->Edx; TrapFrame->Ebx = IrqTrapFrame->Ebx; - TrapFrame->Esp = IrqTrapFrame->Esp; + TrapFrame->HardwareEsp = IrqTrapFrame->Esp; TrapFrame->Ebp = IrqTrapFrame->Ebp; TrapFrame->Esi = IrqTrapFrame->Esi; TrapFrame->Edi = IrqTrapFrame->Edi; TrapFrame->Eip = IrqTrapFrame->Eip; - TrapFrame->Cs = IrqTrapFrame->Cs; - TrapFrame->Eflags = IrqTrapFrame->Eflags; + TrapFrame->SegCs = IrqTrapFrame->Cs; + TrapFrame->EFlags = IrqTrapFrame->Eflags; } VOID _____ Modified: trunk/reactos/include/ndk/extypes.h --- trunk/reactos/include/ndk/extypes.h 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/include/ndk/extypes.h 2005-11-27 18:24:32 UTC (rev 19693) @@ -271,13 +271,13 @@ } EX_FAST_REF, *PEX_FAST_REF; // -// FIXME +// Executive Fast Reference Wait Block // -typedef struct _RUNDOWN_DESCRIPTOR +typedef struct _EX_RUNDOWN_WAIT_BLOCK { - ULONG_PTR References; + ULONG_PTR Count; KEVENT RundownEvent; -} RUNDOWN_DESCRIPTOR, *PRUNDOWN_DESCRIPTOR; +} EX_RUNDOWN_WAIT_BLOCK, *PEX_RUNDOWN_WAIT_BLOCK; // // Callback Object _____ Modified: trunk/reactos/include/ndk/fixmes.txt --- trunk/reactos/include/ndk/fixmes.txt 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/include/ndk/fixmes.txt 2005-11-27 18:24:32 UTC (rev 19693) @@ -2,23 +2,17 @@ -------------------------------------------------------------- ________________________________________________________________________ ______________ [CRITICAL] - Breaking compatibility with official structures. -|pstypes.h - EPROCESS has ReactOS only fields. Includes ReactOS Internal header. -|pstypes.h - W32_CALLOUT_DATA has ReactOS only fields. -|obtypes.h - Object callbacks are ReactOS only definitions. -|obtypes.h - Object Header includes ReactOS only type. -|mmtypes.h - _MADDRESS_SPACE is ReactOS only field. -|ketypes.h - _KPROFILE needs to be updated with new definitions. -|ketypes.h - _KINTERRUPT needs to be verified with new definitions. -|haltypes.h - Loader Parameter Block is ReactOS Version, not NT. +|pstypes.h - EPROCESS has ReactOS only fields. Includes ReactOS Internal header. IFDEF_OUT +|pstypes.h - W32_CALLOUT_DATA has ReactOS only fields. IFDEF-OUT +|obtypes.h - Object callbacks are ReactOS only definitions. IFDEF-OUT ADDREAL +|obtypes.h - Object Header includes ReactOS only type. IFDEF-OUT +|mmtypes.h - _MADDRESS_SPACE is ReactOS only field. IFDEF-OUT +|ketypes.h - _KPROFILE needs to be updated with new definitions. FIXFIX +|ketypes.h - _KINTERRUPT needs to be verified with new definitions. FIXFIX +|haltypes.h - Loader Parameter Block is ReactOS Version, not NT. IFDEF-OUT ADDREAL | [MAJOR] - Using incorrect, missing, or invalid names or definitions. -|i386/ketypes.h - _KTRAP_FRAME definition is broken. -|i386/ketypes.h - _KTSSNOIOPM is not an official type. -|rtltypes.h - PPF_ Defines don't seem to be the real names (try to find them). -|rtltypes.h - _RTL_PROCESS_BACKTRACE_INFORMATION isn't done. -|haltypes.h - Multi-Boot flags are ReactOS Only. -|extypes.h - _RUNDOWN_DESCRIPTOR is possibly incorrect/unofficial. -|extypes.h - Classes 13, 20, 30, 31, 49, 51, 52, 54+ are undefined. +|extypes.h - Classes 13, 20, 30, 31, 49, 51, 52, 54+ are undefined. WONTFIX |_______________________________________________________________________ ______________ _____ Modified: trunk/reactos/include/ndk/haltypes.h --- trunk/reactos/include/ndk/haltypes.h 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/include/ndk/haltypes.h 2005-11-27 18:24:32 UTC (rev 19693) @@ -27,8 +27,9 @@ #ifndef NTOS_MODE_USER // -// Multi-Boot Flags (FIXME) +// Multi-Boot Flags (REMOVE ME) // +#ifdef _REACTOS_ #define MB_FLAGS_MEM_INFO (0x1) #define MB_FLAGS_BOOT_DEVICE (0x2) #define MB_FLAGS_COMMAND_LINE (0x4) @@ -42,6 +43,7 @@ #define MB_FLAGS_APM_TABLE (0x400) #define MB_FLAGS_GRAPHICS_TABLE (0x800) #define MB_FLAGS_ACPI_TABLE (0x1000) +#endif // // HalShutdownSystem Types _____ Modified: trunk/reactos/include/ndk/i386/ketypes.h --- trunk/reactos/include/ndk/i386/ketypes.h 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/include/ndk/i386/ketypes.h 2005-11-27 18:24:32 UTC (rev 19693) @@ -90,11 +90,11 @@ // typedef struct _KTRAP_FRAME { - ULONG DebugEbp; - ULONG DebugEip; - ULONG DebugArgMark; - ULONG DebugPointer; - ULONG TempCs; + ULONG DbgEbp; + ULONG DbgEip; + ULONG DbgArgMark; + ULONG DbgArgPointer; + ULONG TempSegCs; ULONG TempEsp; ULONG Dr0; ULONG Dr1; @@ -102,29 +102,29 @@ ULONG Dr3; ULONG Dr6; ULONG Dr7; - ULONG Gs; - ULONG Es; - ULONG Ds; + ULONG SegGs; + ULONG SegEs; + ULONG SegDs; ULONG Edx; ULONG Ecx; ULONG Eax; - ULONG PreviousMode; - PVOID ExceptionList; - ULONG Fs; + ULONG PreviousPreviousMode; + struct _EXCEPTION_REGISTRATION_RECORD *ExceptionList; + ULONG SegFs; ULONG Edi; ULONG Esi; ULONG Ebx; ULONG Ebp; - ULONG ErrorCode; + ULONG ErrCode; ULONG Eip; - ULONG Cs; - ULONG Eflags; - ULONG Esp; - ULONG Ss; - ULONG V86_Es; - ULONG V86_Ds; - ULONG V86_Fs; - ULONG V86_Gs; + ULONG SegCs; + ULONG EFlags; + ULONG HardwareEsp; + ULONG HardwareSegSs; + ULONG V86Es; + ULONG V86Ds; + ULONG V86Fs; + ULONG V86Gs; } KTRAP_FRAME, *PKTRAP_FRAME; // @@ -461,99 +461,45 @@ #pragma pack(pop) // -// FIXME: TSS without I/O Privilege Map +// TSS Definition // -#include <pshpack1.h> -typedef struct _KTSSNOIOPM +typedef struct _KiIoAccessMap { - USHORT PreviousTask; - USHORT Reserved1; - ULONG Esp0; - USHORT Ss0; - USHORT Reserved2; - ULONG Esp1; - USHORT Ss1; - USHORT Reserved3; - ULONG Esp2; - USHORT Ss2; - USHORT Reserved4; - ULONG Cr3; - ULONG Eip; - ULONG Eflags; - ULONG Eax; - ULONG Ecx; - ULONG Edx; - ULONG Ebx; - ULONG Esp; - ULONG Ebp; - ULONG Esi; - ULONG Edi; - USHORT Es; - USHORT Reserved5; - USHORT Cs; - USHORT Reserved6; - USHORT Ss; - USHORT Reserved7; - USHORT Ds; - USHORT Reserved8; - USHORT Fs; - USHORT Reserved9; - USHORT Gs; - USHORT Reserved10; - USHORT Ldt; - USHORT Reserved11; - USHORT Trap; - USHORT IoMapBase; - /* no interrupt redirection map */ - UCHAR IoBitmap[1]; -} KTSSNOIOPM; + UCHAR DirectionMap[32]; + UCHAR IoMap[8196]; +} KIIO_ACCESS_MAP; -// -// TSS Definition -// +#include <pshpack1.h> typedef struct _KTSS { - USHORT PreviousTask; - USHORT Reserved1; + USHORT Backlink; + USHORT Reserved0; ULONG Esp0; USHORT Ss0; - USHORT Reserved2; - ULONG Esp1; - USHORT Ss1; - USHORT Reserved3; - ULONG Esp2; - USHORT Ss2; - USHORT Reserved4; - ULONG Cr3; + USHORT Reserved1; + ULONG NotUsed1[4]; + ULONG CR3; ULONG Eip; - ULONG Eflags; - ULONG Eax; - ULONG Ecx; - ULONG Edx; - ULONG Ebx; - ULONG Esp; - ULONG Ebp; - ULONG Esi; - ULONG Edi; + ULONG NotUsed2[9]; USHORT Es; - USHORT Reserved5; + USHORT Reserved2; USHORT Cs; - USHORT Reserved6; + USHORT Reserved3; USHORT Ss; - USHORT Reserved7; + USHORT Reserved4; USHORT Ds; - USHORT Reserved8; + USHORT Reserved5; USHORT Fs; - USHORT Reserved9; + USHORT Reserved6; USHORT Gs; - USHORT Reserved10; - USHORT Ldt; - USHORT Reserved11; - USHORT Trap; + USHORT Reserved7; + USHORT LDT; + USHORT Reserved8; + USHORT Flags; USHORT IoMapBase; - /* no interrupt redirection map */ - UCHAR IoBitmap[8193]; -} KTSS; + KIIO_ACCESS_MAP IoMaps[1]; + UCHAR IntDirectionMap[32]; +} KTSS, *PKTSS; #include <poppack.h> // _____ Modified: trunk/reactos/include/ndk/lpctypes.h --- trunk/reactos/include/ndk/lpctypes.h 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/include/ndk/lpctypes.h 2005-11-27 18:24:32 UTC (rev 19693) @@ -26,6 +26,12 @@ #include <pstypes.h> // +// Internal helper macro +// +#define N_ROUND_UP(x,s) \ + (((ULONG)(x)+(s)-1) & ~((ULONG)(s)-1)) + +// // Maximum message size that can be sent through an LPC Port without a section // #define PORT_MAXIMUM_MESSAGE_LENGTH 256 @@ -234,9 +240,9 @@ // Maximum total Kernel-Mode LPC Message Structure Size // #define LPCP_MAX_MESSAGE_SIZE \ - ALIGN_UP(PORT_MAXIMUM_MESSAGE_LENGTH + \ + N_ROUND_UP(PORT_MAXIMUM_MESSAGE_LENGTH + \ sizeof(LPCP_MESSAGE) + \ - sizeof(LPCP_CONNECTION_MESSAGE), sizeof(ULONGLONG) * 2) + sizeof(LPCP_CONNECTION_MESSAGE), 16) // // Maximum actual LPC Message Length _____ Modified: trunk/reactos/include/ndk/rtltypes.h --- trunk/reactos/include/ndk/rtltypes.h 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/include/ndk/rtltypes.h 2005-11-27 18:24:32 UTC (rev 19693) @@ -31,17 +31,17 @@ #define RTL_MAXIMUM_ATOM_LENGTH 255 // -// Process Parameters Flags (FIXME: Rename) +// Process Parameters Flags // -#define PPF_NORMALIZED 0x01 -#define PPF_PROFILE_USER 0x02 -#define PPF_PROFILE_SERVER 0x04 -#define PPF_PROFILE_KERNEL 0x08 -#define PPF_UNKNOWN 0x10 -#define PPF_RESERVE_1MB 0x20 -#define PPF_DISABLE_HEAP_CHECKS 0x100 -#define PPF_PROCESS_OR_1 0x200 -#define PPF_PROCESS_OR_2 0x400 +#define RTL_USER_PROCESS_PARAMETERS_NORMALIZED 0x01 +#define RTL_USER_PROCESS_PARAMETERS_PROFILE_USER 0x02 +#define RTL_USER_PROCESS_PARAMETERS_PROFILE_SERVER 0x04 +#define RTL_USER_PROCESS_PARAMETERS_PROFILE_KERNEL 0x08 +#define RTL_USER_PROCESS_PARAMETERS_UNKNOWN 0x10 +#define RTL_USER_PROCESS_PARAMETERS_RESERVE_1MB 0x20 +#define RTL_USER_PROCESS_PARAMETERS_DISABLE_HEAP_CHECKS 0x100 +#define RTL_USER_PROCESS_PARAMETERS_PROCESS_OR_1 0x200 +#define RTL_USER_PROCESS_PARAMETERS_PROCESS_OR_2 0x400 // // Exception Flags @@ -613,14 +613,20 @@ typedef struct _RTL_PROCESS_BACKTRACE_INFORMATION { - /* FIXME */ - ULONG Unknown; + PVOID SymbolicBackTrace; + ULONG TraceCount; + USHORT Index; + USHORT Depth; + PVOID BackTrace[16]; } RTL_PROCESS_BACKTRACE_INFORMATION, *PRTL_PROCESS_BACKTRACE_INFORMATION; typedef struct _RTL_PROCESS_BACKTRACES { - ULONG BackTraceCount; - RTL_PROCESS_BACKTRACE_INFORMATION BackTraceEntry[1]; + ULONG CommittedMemory; + ULONG ReservedMemory; + ULONG NumberOfBackTraceLookups; + ULONG NumberOfBackTraces; + RTL_PROCESS_BACKTRACE_INFORMATION BackTraces[1]; } RTL_PROCESS_BACKTRACES, *PRTL_PROCESS_BACKTRACES; typedef struct _RTL_DEBUG_BUFFER _____ Modified: trunk/reactos/lib/kernel32/process/create.c --- trunk/reactos/lib/kernel32/process/create.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/lib/kernel32/process/create.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -580,13 +580,13 @@ /* Handle some Parameter Flags */ ProcessParameters->ConsoleFlags = (CreationFlags & CREATE_NEW_PROCESS_GROUP); ProcessParameters->Flags |= (CreationFlags & PROFILE_USER) ? - PPF_PROFILE_USER : 0; + RTL_USER_PROCESS_PARAMETERS_PROFILE_USER : 0; ProcessParameters->Flags |= (CreationFlags & PROFILE_KERNEL) ? - PPF_PROFILE_KERNEL : 0; + RTL_USER_PROCESS_PARAMETERS_PROFILE_KERNEL : 0; ProcessParameters->Flags |= (CreationFlags & PROFILE_SERVER) ? - PPF_PROFILE_SERVER : 0; + RTL_USER_PROCESS_PARAMETERS_PROFILE_SERVER : 0; ProcessParameters->Flags |= (NtCurrentPeb()->ProcessParameters->Flags & - PPF_DISABLE_HEAP_CHECKS); + RTL_USER_PROCESS_PARAMETERS_DISABLE_HEAP_CHECKS); /* Write the Parameter Block */ Status = NtWriteVirtualMemory(ProcessHandle, _____ Modified: trunk/reactos/lib/rtl/ppb.c --- trunk/reactos/lib/rtl/ppb.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/lib/rtl/ppb.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -139,7 +139,7 @@ Param->MaximumLength = RegionSize; Param->Length = Length; - Param->Flags = PPF_NORMALIZED; + Param->Flags = RTL_USER_PROCESS_PARAMETERS_NORMALIZED; Param->Environment = Environment; Param->CurrentDirectory.Handle = CurrentDirectoryHandle; Param->ConsoleHandle = ConsoleHandle; @@ -238,7 +238,7 @@ PRTL_USER_PROCESS_PARAMETERS NTAPI RtlDeNormalizeProcessParams(PRTL_USER_PROCESS_PARAMETERS Params) { - if (Params && (Params->Flags & PPF_NORMALIZED)) + if (Params && (Params->Flags & RTL_USER_PROCESS_PARAMETERS_NORMALIZED)) { DENORMALIZE(Params->CurrentDirectory.DosPath.Buffer, Params); DENORMALIZE(Params->DllPath.Buffer, Params); @@ -249,7 +249,7 @@ DENORMALIZE(Params->ShellInfo.Buffer, Params); DENORMALIZE(Params->RuntimeData.Buffer, Params); - Params->Flags &= ~PPF_NORMALIZED; + Params->Flags &= ~RTL_USER_PROCESS_PARAMETERS_NORMALIZED; } return Params; @@ -263,7 +263,7 @@ PRTL_USER_PROCESS_PARAMETERS NTAPI RtlNormalizeProcessParams(PRTL_USER_PROCESS_PARAMETERS Params) { - if (Params && !(Params->Flags & PPF_NORMALIZED)) + if (Params && !(Params->Flags & RTL_USER_PROCESS_PARAMETERS_NORMALIZED)) { NORMALIZE(Params->CurrentDirectory.DosPath.Buffer, Params); NORMALIZE(Params->DllPath.Buffer, Params); @@ -274,7 +274,7 @@ NORMALIZE(Params->ShellInfo.Buffer, Params); NORMALIZE(Params->RuntimeData.Buffer, Params); - Params->Flags |= PPF_NORMALIZED; + Params->Flags |= RTL_USER_PROCESS_PARAMETERS_NORMALIZED; } return Params; _____ Modified: trunk/reactos/lib/rtl/process.c --- trunk/reactos/lib/rtl/process.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/lib/rtl/process.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -80,7 +80,7 @@ ProcessHandle, Peb, ProcessParameters); /* Give the caller 1MB if he requested it */ - if (ProcessParameters->Flags & PPF_RESERVE_1MB) + if (ProcessParameters->Flags & RTL_USER_PROCESS_PARAMETERS_RESERVE_1MB) { /* Give 1MB starting at 0x4 */ BaseAddress = (PVOID)4; _____ Modified: trunk/reactos/ntoskrnl/ex/init.c --- trunk/reactos/ntoskrnl/ex/init.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/ntoskrnl/ex/init.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -250,7 +250,6 @@ ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, CurrentThread) == KPCR_CURRENT_THREAD); ASSERT(FIELD_OFFSET(KIPCR, PrcbData) + FIELD_OFFSET(KPRCB, NpxThread) == KPCR_NPX_THREAD); ASSERT(FIELD_OFFSET(KTSS, Esp0) == KTSS_ESP0); - ASSERT(FIELD_OFFSET(KTSS, Eflags) == KTSS_EFLAGS); ASSERT(FIELD_OFFSET(KTSS, IoMapBase) == KTSS_IOMAPBASE); ASSERT(sizeof(FX_SAVE_AREA) == SIZEOF_FX_SAVE_AREA); } _____ Modified: trunk/reactos/ntoskrnl/ex/rundown.c --- trunk/reactos/ntoskrnl/ex/rundown.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/ntoskrnl/ex/rundown.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -123,7 +123,7 @@ if (Current & EX_RUNDOWN_ACTIVE) { /* Get Pointer */ - PRUNDOWN_DESCRIPTOR RundownDescriptor = (PRUNDOWN_DESCRIPTOR)(Current & ~EX_RUNDOWN_ACTIVE); + PEX_RUNDOWN_WAIT_BLOCK RundownDescriptor = (PEX_RUNDOWN_WAIT_BLOCK)(Current & ~EX_RUNDOWN_ACTIVE); if (RundownDescriptor == NULL) { @@ -131,9 +131,9 @@ break; } - Current = RundownDescriptor->References; + Current = RundownDescriptor->Count; - /* Decrease RundownDescriptor->References by Count references */ + /* Decrease RundownDescriptor->Count by Count Count */ for (;;) { ULONG_PTR PrevCount, NewCount; @@ -144,12 +144,12 @@ } else { - NewCount = ((RundownDescriptor->References - (Count >> EX_RUNDOWN_COUNT_SHIFT)) << EX_RUNDOWN_COUNT_SHIFT) | EX_RUNDOWN_ACTIVE; + NewCount = ((RundownDescriptor->Count - (Count >> EX_RUNDOWN_COUNT_SHIFT)) << EX_RUNDOWN_COUNT_SHIFT) | EX_RUNDOWN_ACTIVE; } #ifdef _WIN64 - PrevCount = (ULONG_PTR)InterlockedCompareExchange64((LONGLONG*)&RundownDescriptor->R eferences, (LONGLONG)NewCount, (LONGLONG)Current); + PrevCount = (ULONG_PTR)InterlockedCompareExchange64((LONGLONG*)&RundownDescriptor->C ount, (LONGLONG)NewCount, (LONGLONG)Current); #else - PrevCount = (ULONG_PTR)InterlockedCompareExchange((LONG*)&RundownDescriptor->Referen ces, (LONG)NewCount, (LONG)Current); + PrevCount = (ULONG_PTR)InterlockedCompareExchange((LONG*)&RundownDescriptor->Count, (LONG)NewCount, (LONG)Current); #endif if (PrevCount == Current) { @@ -227,7 +227,7 @@ ) { ULONG_PTR PrevCount, NewPtr, PrevPtr; - RUNDOWN_DESCRIPTOR RundownDescriptor; + EX_RUNDOWN_WAIT_BLOCK RundownDescriptor; PAGED_CODE(); @@ -236,9 +236,9 @@ if (PrevCount != 0 && !(PrevCount & EX_RUNDOWN_ACTIVE)) { /* save the reference counter */ - RundownDescriptor.References = PrevCount >> EX_RUNDOWN_COUNT_SHIFT; + RundownDescriptor.Count = PrevCount >> EX_RUNDOWN_COUNT_SHIFT; - /* Pending references... wait on them to be closed with an event */ + /* Pending Count... wait on them to be closed with an event */ KeInitializeEvent(&RundownDescriptor.RundownEvent, NotificationEvent, FALSE); ASSERT(!((ULONG_PTR)&RundownDescriptor & EX_RUNDOWN_ACTIVE)); @@ -267,7 +267,7 @@ PrevCount = PrevPtr; /* save the changed reference counter and try again */ - RundownDescriptor.References = PrevCount >> EX_RUNDOWN_COUNT_SHIFT; + RundownDescriptor.Count = PrevCount >> EX_RUNDOWN_COUNT_SHIFT; } } } _____ Modified: trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c --- trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/ntoskrnl/kd/wrappers/gdbstub.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -133,18 +133,18 @@ { 4, FIELD_OFFSET(KTRAP_FRAME, Ecx), FIELD_OFFSET(CONTEXT, Ecx), TRUE }, { 4, FIELD_OFFSET(KTRAP_FRAME, Edx), FIELD_OFFSET(CONTEXT, Edx), FALSE }, { 4, FIELD_OFFSET(KTRAP_FRAME, Ebx), FIELD_OFFSET(CONTEXT, Ebx), TRUE }, - { 4, FIELD_OFFSET(KTRAP_FRAME, Esp), FIELD_OFFSET(CONTEXT, Esp), TRUE }, - { 4, FIELD_OFFSET(KTRAP_FRAME, DebugEbp), FIELD_OFFSET(CONTEXT, Ebp), TRUE }, + { 4, FIELD_OFFSET(KTRAP_FRAME, HardwareEsp ), FIELD_OFFSET(CONTEXT, Esp), TRUE }, + { 4, FIELD_OFFSET(KTRAP_FRAME, DbgEbp), FIELD_OFFSET(CONTEXT, Ebp), TRUE }, { 4, FIELD_OFFSET(KTRAP_FRAME, Esi), FIELD_OFFSET(CONTEXT, Esi), TRUE }, { 4, FIELD_OFFSET(KTRAP_FRAME, Edi), FIELD_OFFSET(CONTEXT, Edi), TRUE }, - { 4, FIELD_OFFSET(KTRAP_FRAME, DebugEip), FIELD_OFFSET(CONTEXT, Eip), TRUE }, - { 4, FIELD_OFFSET(KTRAP_FRAME, Eflags), FIELD_OFFSET(CONTEXT, EFlags), TRUE }, - { 4, FIELD_OFFSET(KTRAP_FRAME, Cs), FIELD_OFFSET(CONTEXT, SegCs), TRUE }, - { 4, FIELD_OFFSET(KTRAP_FRAME, Ss), FIELD_OFFSET(CONTEXT, SegSs), TRUE }, - { 4, FIELD_OFFSET(KTRAP_FRAME, Ds), FIELD_OFFSET(CONTEXT, SegDs), TRUE }, - { 4, FIELD_OFFSET(KTRAP_FRAME, Es), FIELD_OFFSET(CONTEXT, SegEs), TRUE }, - { 4, FIELD_OFFSET(KTRAP_FRAME, Fs), FIELD_OFFSET(CONTEXT, SegFs), TRUE }, - { 4, FIELD_OFFSET(KTRAP_FRAME, Gs), FIELD_OFFSET(CONTEXT, SegGs), TRUE } + { 4, FIELD_OFFSET(KTRAP_FRAME, DbgEip), FIELD_OFFSET(CONTEXT, Eip), TRUE }, + { 4, FIELD_OFFSET(KTRAP_FRAME, EFlags), FIELD_OFFSET(CONTEXT, EFlags), TRUE }, + { 4, FIELD_OFFSET(KTRAP_FRAME, SegCs), FIELD_OFFSET(CONTEXT, SegCs), TRUE }, + { 4, FIELD_OFFSET(KTRAP_FRAME, HardwareSegSs), FIELD_OFFSET(CONTEXT, SegSs), TRUE }, + { 4, FIELD_OFFSET(KTRAP_FRAME, SegDs), FIELD_OFFSET(CONTEXT, SegDs), TRUE }, + { 4, FIELD_OFFSET(KTRAP_FRAME, SegEs), FIELD_OFFSET(CONTEXT, SegEs), TRUE }, + { 4, FIELD_OFFSET(KTRAP_FRAME, SegFs), FIELD_OFFSET(CONTEXT, SegFs), TRUE }, + { 4, FIELD_OFFSET(KTRAP_FRAME, SegGs), FIELD_OFFSET(CONTEXT, SegGs), TRUE } }; static PCHAR GspThreadStates[DeferredReady+1] = @@ -564,7 +564,7 @@ GspGetEspFromTrapFrame(PKTRAP_FRAME TrapFrame) { return KeGetPreviousMode() == KernelMode - ? (LONG) &TrapFrame->Esp : (LONG)TrapFrame->Esp; + ? (LONG) &TrapFrame->HardwareEsp : (LONG)TrapFrame->HardwareEsp; } _____ Modified: trunk/reactos/ntoskrnl/ke/apc.c --- trunk/reactos/ntoskrnl/ke/apc.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/ntoskrnl/ke/apc.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -906,7 +906,7 @@ KeGetCurrentThread()->TrapFrame); /* Don't deliver APCs in V86 mode */ - if (TrapFrame->Eflags & X86_EFLAGS_VM) return; + if (TrapFrame->EFlags & X86_EFLAGS_VM) return; /* Save the full context */ Context.ContextFlags = CONTEXT_FULL | CONTEXT_DEBUG_REGISTERS; @@ -927,7 +927,7 @@ /* Run at APC dispatcher */ TrapFrame->Eip = (ULONG)KeUserApcDispatcher; - TrapFrame->Esp = Stack; + TrapFrame->HardwareEsp = Stack; /* Setup the stack */ *(PULONG_PTR)(Stack + 0 * sizeof(ULONG_PTR)) = (ULONG_PTR)NormalRoutine; _____ Modified: trunk/reactos/ntoskrnl/ke/clock.c --- trunk/reactos/ntoskrnl/ke/clock.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/ntoskrnl/ke/clock.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -260,8 +260,8 @@ * Cs bit 0 is always set for user mode if we are in protected mode. * V86 mode is counted as user time. */ - if (TrapFrame->Cs & 0x1 || - TrapFrame->Eflags & X86_EFLAGS_VM) + if (TrapFrame->SegCs & MODE_MASK || + TrapFrame->EFlags & X86_EFLAGS_VM) { InterlockedIncrementUL(&CurrentThread->UserTime); InterlockedIncrementUL(&CurrentProcess->UserTime); _____ Modified: trunk/reactos/ntoskrnl/ke/usercall.c --- trunk/reactos/ntoskrnl/ke/usercall.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/ntoskrnl/ke/usercall.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -207,9 +207,9 @@ Thread->Tcb.TrapFrame, sizeof(KTRAP_FRAME) - (4 * sizeof(ULONG))); NewFrame = (PKTRAP_FRAME)((char*)NewStack + StackSize - sizeof(KTRAP_FRAME) - sizeof(FX_SAVE_AREA)); /* We need the stack pointer to remain 4-byte aligned */ - NewFrame->Esp -= (((ArgumentLength + 3) & (~ 0x3)) + (4 * sizeof(ULONG))); + NewFrame->HardwareEsp -= (((ArgumentLength + 3) & (~ 0x3)) + (4 * sizeof(ULONG))); NewFrame->Eip = (ULONG)KeUserCallbackDispatcher; - UserEsp = (PULONG)NewFrame->Esp; + UserEsp = (PULONG)NewFrame->HardwareEsp; UserEsp[0] = 0; /* Return address. */ UserEsp[1] = RoutineIndex; UserEsp[2] = (ULONG)&UserEsp[4]; _____ Modified: trunk/reactos/ntoskrnl/mm/pagefile.c --- trunk/reactos/ntoskrnl/mm/pagefile.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/ntoskrnl/mm/pagefile.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -544,7 +544,7 @@ Headers->Type = MmCoreDumpType; if (TrapFrame != NULL) { - if (!(TrapFrame->Eflags & (1 << 17))) + if (!(TrapFrame->EFlags & (1 << 17))) { memcpy(&Headers->TrapFrame, TrapFrame, sizeof(KTRAP_FRAME) - (4 * sizeof(DWORD))); _____ Modified: trunk/reactos/ntoskrnl/ps/debug.c --- trunk/reactos/ntoskrnl/ps/debug.c 2005-11-27 17:05:37 UTC (rev 19692) +++ trunk/reactos/ntoskrnl/ps/debug.c 2005-11-27 18:24:32 UTC (rev 19693) @@ -56,7 +56,7 @@ Event = &GetSetContext->Event; Mode = GetSetContext->Mode; - if (TrapFrame->Cs == KGDT_R0_CODE && Mode != KernelMode) + if (TrapFrame->SegCs == KGDT_R0_CODE && Mode != KernelMode) { GetSetContext->Status = STATUS_ACCESS_DENIED; }
19 years
1
0
0
0
← Newer
1
...
7
8
9
10
11
12
13
...
88
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
Results per page:
10
25
50
100
200