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
July 2017
----- 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
19 participants
213 discussions
Start a n
N
ew thread
[gadamopoulos] 75464: [SYSSETUP.INF] -Move registering comctl32.dll and ole32.dll much earlier in the setup.
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Mon Jul 31 16:11:09 2017 New Revision: 75464 URL:
http://svn.reactos.org/svn/reactos?rev=75464&view=rev
Log: [SYSSETUP.INF] -Move registering comctl32.dll and ole32.dll much earlier in the setup. Modified: trunk/reactos/media/inf/syssetup.inf Modified: trunk/reactos/media/inf/syssetup.inf URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/inf/syssetup.inf?rev…
============================================================================== --- trunk/reactos/media/inf/syssetup.inf [iso-8859-1] (original) +++ trunk/reactos/media/inf/syssetup.inf [iso-8859-1] Mon Jul 31 16:11:09 2017 @@ -28,6 +28,16 @@ ks.inf c_image.inf +[Infs.Always] +syssetup.inf,EarlyPhaseSetup + +[EarlyPhaseSetup] +RegisterDlls = EarlyRegisterDlls + +[EarlyRegisterDlls] +11,,comctl32.dll,2 +11,,ole32.dll,1 + [RegistrationPhase2] RegisterDlls = OleControlDlls AddReg=Classes @@ -40,7 +50,6 @@ 11,,avifil32.dll,1 11,,browseui.dll,1 11,,comcat.dll,1 -11,,comctl32.dll,2 11,,cryptdlg.dll,1 11,,cryptnet.dll,1 11,,d3dxof.dll,1 @@ -79,7 +88,6 @@ 11,,netshell.dll,1 11,,ntobjshex.dll,1 11,,objsel.dll,1 -11,,ole32.dll,1 11,,oleacc.dll,1 11,,oleaut32.dll,1 11,,olepro32.dll,1
7 years, 4 months
1
0
0
0
[gadamopoulos] 75463: [COMCTL32] -Fix some failed tests for TB_GETMETRICS. Add support for button spacing.
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Mon Jul 31 13:10:46 2017 New Revision: 75463 URL:
http://svn.reactos.org/svn/reactos?rev=75463&view=rev
Log: [COMCTL32] -Fix some failed tests for TB_GETMETRICS. Add support for button spacing. Modified: trunk/reactos/dll/win32/comctl32/toolbar.c Modified: trunk/reactos/dll/win32/comctl32/toolbar.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/comctl32/toolbar…
============================================================================== --- trunk/reactos/dll/win32/comctl32/toolbar.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/comctl32/toolbar.c [iso-8859-1] Mon Jul 31 13:10:46 2017 @@ -1867,14 +1867,14 @@ if( bWrap ) { if ( !(btnPtr->fsStyle & BTNS_SEP) ) - y += cy; + y += cy + infoPtr->szSpacing.cy; else { if ( !(infoPtr->dwStyle & CCS_VERT)) y += cy + ( (btnPtr->cx > 0 ) ? btnPtr->cx : SEPARATOR_WIDTH) * 2 /3; else - y += cy; + y += cy + infoPtr->szSpacing.cy; /* nSepRows is used to calculate the extra height following */ /* the last row. */ @@ -1888,7 +1888,7 @@ nRows++; } else - x += cx; + x += cx + infoPtr->szSpacing.cx; } /* infoPtr->nRows is the number of rows on the toolbar */ @@ -3660,10 +3660,8 @@ static LRESULT TOOLBAR_GetMetrics(const TOOLBAR_INFO *infoPtr, TBMETRICS *pMetrics) { - if (pMetrics == NULL) - return FALSE; - - /* TODO: check if cbSize is a valid value */ + if (pMetrics == NULL || pMetrics->cbSize != sizeof(TBMETRICS)) + return 0; if (pMetrics->dwMask & TBMF_PAD) { @@ -3683,7 +3681,7 @@ pMetrics->cyButtonSpacing = infoPtr->szSpacing.cy; } - return TRUE; + return 0; } #endif @@ -6250,8 +6248,8 @@ infoPtr->szPadding.cx = DEFPAD_CX; infoPtr->szPadding.cy = DEFPAD_CY; #ifdef __REACTOS__ - infoPtr->szSpacing.cx = DEFSPACE_CX; - infoPtr->szSpacing.cy = DEFSPACE_CY; + infoPtr->szSpacing.cx = 0; + infoPtr->szSpacing.cy = 0; memset(&infoPtr->themeMargins, 0 , sizeof(infoPtr->themeMargins)); #endif infoPtr->iListGap = DEFLISTGAP;
7 years, 4 months
1
0
0
0
[gadamopoulos] 75462: [COMCTL32_APITESTS] -Add toolbar tests for TB_SETBUTTONSIZE, TB_SETPADDING, TB_GETBUTTONSIZE, TB_GETMETRICS.
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Mon Jul 31 13:04:09 2017 New Revision: 75462 URL:
http://svn.reactos.org/svn/reactos?rev=75462&view=rev
Log: [COMCTL32_APITESTS] -Add toolbar tests for TB_SETBUTTONSIZE, TB_SETPADDING, TB_GETBUTTONSIZE, TB_GETMETRICS. Modified: trunk/rostests/apitests/comctl32/toolbar.c Modified: trunk/rostests/apitests/comctl32/toolbar.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/comctl32/toolbar…
============================================================================== --- trunk/rostests/apitests/comctl32/toolbar.c [iso-8859-1] (original) +++ trunk/rostests/apitests/comctl32/toolbar.c [iso-8859-1] Mon Jul 31 13:04:09 2017 @@ -62,6 +62,141 @@ DestroyWindow(hwnd); } +void TestSetButtonSize() +{ + HWND hwnd; + LRESULT bsize; + + hwnd = CreateWindowExW(0, TOOLBARCLASSNAMEW, L"Test", 0, 0, 0, 0, 0, 0, 0, 0, NULL); + ok(hwnd != NULL, "CreateWindowEx failed\n"); + + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x160017, "Expected 0x160017 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, MAKELONG(0, 0)); + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x160018, "Expected 0x160018 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, 0x10001); + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x160017, "Expected 0x160017 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, 0x100001); + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x160017, "Expected 0x160017 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, 0x160017); + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x160017, "Expected 0x160017 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, 0x170017); + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x170017, "Expected 0x170017 got %lx\n", bsize); + + DestroyWindow(hwnd); +} + +void TestPadding() +{ + HWND hwnd; + LRESULT bsize; + + hwnd = CreateWindowExW(0, TOOLBARCLASSNAMEW, L"Test", 0, 0, 0, 0, 0, 0, 0, 0, NULL); + ok(hwnd != NULL, "CreateWindowEx failed\n"); + + bsize = SendMessageW(hwnd, TB_GETPADDING, 0, 0); + ok(bsize == 0x60007, "Expected 0x60007 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETPADDING, 0, 0x10001); + SendMessageW(hwnd, TB_SETBITMAPSIZE, 0, 0x10001); + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, 0x10001); + + bsize = SendMessageW(hwnd, TB_GETPADDING, 0, 0); + ok(bsize == 0x10001, "Expected 0x10001 got %lx\n", bsize); + + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x20002, "Expected 0x20002 got %lx\n", bsize); + +#if 0 /* Luna specific */ + SetWindowTheme(hwnd, L"TaskBand", NULL); + + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x20002, "Expected 0x20002 got %lx\n", bsize); + + bsize = SendMessageW(hwnd, TB_GETPADDING, 0, 0); + ok(bsize == 0x10001, "Expected 0x10001 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, 0x10001); + + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x160006, "Expected 0x160006 got %lx\n", bsize); + + bsize = SendMessageW(hwnd, TB_GETPADDING, 0, 0); + ok(bsize == 0x10001, "Expected 0x10001 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETPADDING, 0, 0x10001); + SendMessageW(hwnd, TB_SETBITMAPSIZE, 0, 0x10001); + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, 0x10001); + + bsize = SendMessageW(hwnd, TB_GETPADDING, 0, 0); + ok(bsize == 0x10001, "Expected 0x10001 got %lx\n", bsize); + + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x160006, "Expected 0x160006 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETBITMAPSIZE, 0, 0x10001); + SendMessageW(hwnd, TB_SETPADDING, 0, 0x20002); + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, 0x10001); + + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x170007, "Expected 0x170007 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETBITMAPSIZE, 0, 0x20002); + SendMessageW(hwnd, TB_SETPADDING, 0, 0x20002); + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, 0x10001); + + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + ok(bsize == 0x170008, "Expected 0x170008 got %lx\n", bsize); + + SendMessageW(hwnd, TB_SETBITMAPSIZE, 0, 0x100010); + SendMessageW(hwnd, TB_SETPADDING, 0, 0x20002); + SendMessageW(hwnd, TB_SETBUTTONSIZE, 0, 0x10001); + + bsize = SendMessageW(hwnd, TB_GETBUTTONSIZE, 0, 0); + + /* With a big enough image size the button size is bitmap size + pading + theme content margins */ + ok(bsize == 0x1a0016, "Expected 0x1a0016 got %lx\n", bsize); +#endif + + DestroyWindow(hwnd); +} + +void TestButtonSpacing() +{ + HWND hwnd; + TBMETRICS metrics; + LRESULT lres; + + hwnd = CreateWindowExW(0, TOOLBARCLASSNAMEW, L"Test", 0, 0, 0, 0, 0, 0, 0, 0, NULL); + ok(hwnd != NULL, "CreateWindowEx failed\n"); + + memset(&metrics, 0, sizeof(metrics)); + lres = SendMessageW(hwnd, TB_GETMETRICS, 0, (LPARAM)&metrics); + ok (lres == 0, "Got %d result\n", (int)lres); + ok (metrics.dwMask == 0, "Got %lu\n", metrics.dwMask); + ok (metrics.cxPad == 0, "Got %d\n", metrics.cxPad); + + metrics.cbSize = sizeof(metrics); + metrics.dwMask = TBMF_PAD|TBMF_BARPAD|TBMF_BUTTONSPACING; + lres = SendMessageW(hwnd, TB_GETMETRICS, 0, (LPARAM)&metrics); + ok (lres == 0, "Got %lu result\n", lres); + ok (metrics.dwMask == (TBMF_PAD|TBMF_BARPAD|TBMF_BUTTONSPACING), "Got %lu\n", metrics.dwMask); + ok (metrics.cxPad == 7, "Got %d\n", metrics.cxPad); + ok (metrics.cyPad == 6, "Got %d\n", metrics.cyPad); + ok (metrics.cxButtonSpacing == 0, "Got %d\n", metrics.cxButtonSpacing); + ok (metrics.cyButtonSpacing == 0, "Got %d\n", metrics.cyButtonSpacing); +} + void TestV5VersionMessage() { HWND hwnd; @@ -107,6 +242,9 @@ LoadLibraryW(L"comctl32.dll"); TestVersionMessage(); + TestSetButtonSize(); + TestPadding(); + TestButtonSpacing(); hV5ActCtx = _CreateV5ActCtx(); ok (hV5ActCtx != INVALID_HANDLE_VALUE, "CreateActCtxW failed\n");
7 years, 4 months
1
0
0
0
[pschweitzer] 75461: [RXCE] Only implement RxTrackerUpdateHistory() if RDBSS_TRACKER is defined CORE-11327 CORE-13610
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Jul 31 10:35:18 2017 New Revision: 75461 URL:
http://svn.reactos.org/svn/reactos?rev=75461&view=rev
Log: [RXCE] Only implement RxTrackerUpdateHistory() if RDBSS_TRACKER is defined CORE-11327 CORE-13610 Modified: trunk/reactos/sdk/lib/drivers/rxce/rxce.c Modified: trunk/reactos/sdk/lib/drivers/rxce/rxce.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/rxce/rxce.…
============================================================================== --- trunk/reactos/sdk/lib/drivers/rxce/rxce.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/rxce/rxce.c [iso-8859-1] Mon Jul 31 10:35:18 2017 @@ -8447,6 +8447,7 @@ } } +#ifdef RDBSS_TRACKER /* * @implemented */ @@ -8528,6 +8529,7 @@ ASSERT(RxContext->AcquireReleaseFcbTrackerX >= 0); } } +#endif VOID RxTrackPagingIoResource(
7 years, 4 months
1
0
0
0
[pschweitzer] 75460: [RDBSS] For non dbg builds, don't implement macro defined functions RxDumpCurrentAccess(), RxDumpWantedAccess() CORE-11327 CORE-13610
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Mon Jul 31 09:33:01 2017 New Revision: 75460 URL:
http://svn.reactos.org/svn/reactos?rev=75460&view=rev
Log: [RDBSS] For non dbg builds, don't implement macro defined functions RxDumpCurrentAccess(), RxDumpWantedAccess() CORE-11327 CORE-13610 Modified: trunk/reactos/sdk/lib/drivers/rdbsslib/rdbss.c Modified: trunk/reactos/sdk/lib/drivers/rdbsslib/rdbss.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/drivers/rdbsslib/r…
============================================================================== --- trunk/reactos/sdk/lib/drivers/rdbsslib/rdbss.c [iso-8859-1] (original) +++ trunk/reactos/sdk/lib/drivers/rdbsslib/rdbss.c [iso-8859-1] Mon Jul 31 09:33:01 2017 @@ -5291,6 +5291,7 @@ #endif } +#if DBG /* * @implemented */ @@ -5317,6 +5318,7 @@ { PAGED_CODE(); } +#endif /* * @implemented
7 years, 4 months
1
0
0
0
[tfaber] 75459: [0.4.6] - Merge regedit fix (r75458) by Joachim & Mark CORE-13071
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Jul 30 16:34:27 2017 New Revision: 75459 URL:
http://svn.reactos.org/svn/reactos?rev=75459&view=rev
Log: [0.4.6] - Merge regedit fix (r75458) by Joachim & Mark CORE-13071 Modified: branches/ros-branch-0_4_6/ (props changed) branches/ros-branch-0_4_6/reactos/ (props changed) branches/ros-branch-0_4_6/reactos/base/applications/regedit/CMakeLists.txt branches/ros-branch-0_4_6/reactos/base/applications/regedit/framewnd.c branches/ros-branch-0_4_6/reactos/base/applications/regedit/settings.c Propchange: branches/ros-branch-0_4_6/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Jul 30 16:34:27 2017 @@ -1,2 +1,2 @@ /branches/colins-printing-for-freedom:67543-68405,68407-68414,68417-70595 -/trunk:75451 +/trunk:75451,75458 Propchange: branches/ros-branch-0_4_6/reactos/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Sun Jul 30 16:34:27 2017 @@ -23,4 +23,4 @@ /branches/usb-bringup:51335,51337,51341-51343,51348,51350,51353,51355,51365-51369,51372,51384-54388,54396-54398,54736-54737,54752-54754,54756-54760,54762,54764-54765,54767-54768,54772,54774-54777,54781,54787,54790-54792,54797-54798,54806,54808,54834-54838,54843,54850,54852,54856,54858-54859 /branches/usb-bringup-trunk:55019-55543,55548-55554,55556-55567 /branches/wlan-bringup:54809-54998 -/trunk/reactos:75451 +/trunk/reactos:75451,75458 Modified: branches/ros-branch-0_4_6/reactos/base/applications/regedit/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/base/a…
============================================================================== --- branches/ros-branch-0_4_6/reactos/base/applications/regedit/CMakeLists.txt [iso-8859-1] (original) +++ branches/ros-branch-0_4_6/reactos/base/applications/regedit/CMakeLists.txt [iso-8859-1] Sun Jul 30 16:34:27 2017 @@ -23,7 +23,7 @@ add_executable(regedit ${SOURCE} regedit.rc) set_module_type(regedit win32gui UNICODE) target_link_libraries(regedit uuid) -add_importlibs(regedit user32 gdi32 advapi32 ole32 shell32 comctl32 comdlg32 shlwapi msvcrt kernel32) +add_importlibs(regedit user32 gdi32 advapi32 ole32 shell32 comctl32 comdlg32 shlwapi msvcrt kernel32 ntdll) add_pch(regedit regedit.h SOURCE) add_cd_file(TARGET regedit DESTINATION reactos FOR all) #add_subdirectory(clb) Modified: branches/ros-branch-0_4_6/reactos/base/applications/regedit/framewnd.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/base/a…
============================================================================== --- branches/ros-branch-0_4_6/reactos/base/applications/regedit/framewnd.c [iso-8859-1] (original) +++ branches/ros-branch-0_4_6/reactos/base/applications/regedit/framewnd.c [iso-8859-1] Sun Jul 30 16:34:27 2017 @@ -1033,7 +1033,6 @@ LPCWSTR valueName; BOOL result = TRUE; REGSAM regsam = KEY_READ; - LONG lRet; int item; UNREFERENCED_PARAMETER(lParam); @@ -1125,13 +1124,11 @@ keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); valueName = GetValueName(g_pChildWnd->hListWnd, -1); - - if (!keyPath) - return TRUE; - - lRet = RegOpenKeyExW(hKeyRoot, keyPath, 0, regsam, &hKey); - if (lRet != ERROR_SUCCESS) - hKey = 0; + if (keyPath) + { + if (RegOpenKeyExW(hKeyRoot, keyPath, 0, regsam, &hKey) != ERROR_SUCCESS) + hKey = 0; + } switch (LOWORD(wParam)) { @@ -1165,7 +1162,7 @@ break; case ID_EDIT_DELETE: { - if (GetFocus() == g_pChildWnd->hListWnd) + if (GetFocus() == g_pChildWnd->hListWnd && hKey) { UINT nSelected = ListView_GetSelectedCount(g_pChildWnd->hListWnd); if(nSelected >= 1) @@ -1201,7 +1198,7 @@ } else if (GetFocus() == g_pChildWnd->hTreeWnd) { - if (keyPath == 0 || *keyPath == 0) + if (keyPath == NULL || *keyPath == UNICODE_NULL) { MessageBeep(MB_ICONHAND); } Modified: branches/ros-branch-0_4_6/reactos/base/applications/regedit/settings.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/base/a…
============================================================================== --- branches/ros-branch-0_4_6/reactos/base/applications/regedit/settings.c [iso-8859-1] (original) +++ branches/ros-branch-0_4_6/reactos/base/applications/regedit/settings.c [iso-8859-1] Sun Jul 30 16:34:27 2017 @@ -23,6 +23,7 @@ #include <strsafe.h> const WCHAR g_szGeneralRegKey[] = L"Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit"; +DECLSPEC_IMPORT ULONG WINAPIV DbgPrint(PCH Format,...); /* VV,VV,VV,VV,WA,WA,WA,WA,WB,WB,WB,WB,R1,R1,R1,R1 @@ -122,25 +123,31 @@ { RegistryBinaryConfig tConfig; DWORD iBufferSize = sizeof(tConfig); - WCHAR szBuffer[MAX_PATH]; + WCHAR szBuffer[MAX_PATH]; /* FIXME: a complete registry path can be longer than that */ LPCWSTR keyPath, rootName; HKEY hRootKey; /* Save key position */ keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hRootKey); - if (keyPath) + rootName = get_root_key_name(hRootKey); + + /* Load "My Computer" string and complete it */ + if (LoadStringW(hInst, IDS_MY_COMPUTER, szBuffer, COUNT_OF(szBuffer)) && + SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), L"\\")) && + SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), rootName)) && + SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), L"\\"))) { - rootName = get_root_key_name(hRootKey); - - /* Load "My Computer" string and complete it */ - if (LoadStringW(hInst, IDS_MY_COMPUTER, szBuffer, COUNT_OF(szBuffer)) && - SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), L"\\")) && - SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), rootName)) && - SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), L"\\")) && - SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), keyPath))) - { + HRESULT hr = S_OK; + if (keyPath) + hr = StringCbCatW(szBuffer, sizeof(szBuffer), keyPath); + if (SUCCEEDED(hr)) RegSetValueExW(hKey, L"LastKey", 0, REG_SZ, (LPBYTE)szBuffer, (DWORD)wcslen(szBuffer) * sizeof(WCHAR)); - } + else + DbgPrint("err: (%s:%d): Buffer not big enough for '%S + %S'\n", __FILE__, __LINE__, rootName, keyPath); + } + else + { + DbgPrint("err: (%s:%d): Buffer not big enough for '%S'\n", __FILE__, __LINE__, rootName); } /* Get statusbar settings */
7 years, 4 months
1
0
0
0
[mjansen] 75458: [REGEDIT] Fix the search dialog not opening when the root node is selected. Patch by Joachim Henze (reactosfanboy). Small changes by me. CORE-13071 #resolve #comment Thanks!
by mjansen@svn.reactos.org
Author: mjansen Date: Sun Jul 30 14:04:44 2017 New Revision: 75458 URL:
http://svn.reactos.org/svn/reactos?rev=75458&view=rev
Log: [REGEDIT] Fix the search dialog not opening when the root node is selected. Patch by Joachim Henze (reactosfanboy). Small changes by me. CORE-13071 #resolve #comment Thanks! Modified: trunk/reactos/base/applications/regedit/CMakeLists.txt trunk/reactos/base/applications/regedit/framewnd.c trunk/reactos/base/applications/regedit/settings.c Modified: trunk/reactos/base/applications/regedit/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/CMakeLists.txt [iso-8859-1] Sun Jul 30 14:04:44 2017 @@ -23,7 +23,7 @@ add_executable(regedit ${SOURCE} regedit.rc) set_module_type(regedit win32gui UNICODE) target_link_libraries(regedit uuid) -add_importlibs(regedit user32 gdi32 advapi32 ole32 shell32 comctl32 comdlg32 shlwapi msvcrt kernel32) +add_importlibs(regedit user32 gdi32 advapi32 ole32 shell32 comctl32 comdlg32 shlwapi msvcrt kernel32 ntdll) add_pch(regedit regedit.h SOURCE) add_cd_file(TARGET regedit DESTINATION reactos FOR all) #add_subdirectory(clb) Modified: trunk/reactos/base/applications/regedit/framewnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/framewnd.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/framewnd.c [iso-8859-1] Sun Jul 30 14:04:44 2017 @@ -1033,7 +1033,6 @@ LPCWSTR valueName; BOOL result = TRUE; REGSAM regsam = KEY_READ; - LONG lRet; int item; UNREFERENCED_PARAMETER(lParam); @@ -1125,13 +1124,11 @@ keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hKeyRoot); valueName = GetValueName(g_pChildWnd->hListWnd, -1); - - if (!keyPath) - return TRUE; - - lRet = RegOpenKeyExW(hKeyRoot, keyPath, 0, regsam, &hKey); - if (lRet != ERROR_SUCCESS) - hKey = 0; + if (keyPath) + { + if (RegOpenKeyExW(hKeyRoot, keyPath, 0, regsam, &hKey) != ERROR_SUCCESS) + hKey = 0; + } switch (LOWORD(wParam)) { @@ -1165,7 +1162,7 @@ break; case ID_EDIT_DELETE: { - if (GetFocus() == g_pChildWnd->hListWnd) + if (GetFocus() == g_pChildWnd->hListWnd && hKey) { UINT nSelected = ListView_GetSelectedCount(g_pChildWnd->hListWnd); if(nSelected >= 1) @@ -1201,7 +1198,7 @@ } else if (GetFocus() == g_pChildWnd->hTreeWnd) { - if (keyPath == 0 || *keyPath == 0) + if (keyPath == NULL || *keyPath == UNICODE_NULL) { MessageBeep(MB_ICONHAND); } Modified: trunk/reactos/base/applications/regedit/settings.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedit/…
============================================================================== --- trunk/reactos/base/applications/regedit/settings.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/regedit/settings.c [iso-8859-1] Sun Jul 30 14:04:44 2017 @@ -23,6 +23,7 @@ #include <strsafe.h> const WCHAR g_szGeneralRegKey[] = L"Software\\Microsoft\\Windows\\CurrentVersion\\Applets\\Regedit"; +DECLSPEC_IMPORT ULONG WINAPIV DbgPrint(PCH Format,...); /* VV,VV,VV,VV,WA,WA,WA,WA,WB,WB,WB,WB,R1,R1,R1,R1 @@ -122,25 +123,31 @@ { RegistryBinaryConfig tConfig; DWORD iBufferSize = sizeof(tConfig); - WCHAR szBuffer[MAX_PATH]; + WCHAR szBuffer[MAX_PATH]; /* FIXME: a complete registry path can be longer than that */ LPCWSTR keyPath, rootName; HKEY hRootKey; /* Save key position */ keyPath = GetItemPath(g_pChildWnd->hTreeWnd, 0, &hRootKey); - if (keyPath) + rootName = get_root_key_name(hRootKey); + + /* Load "My Computer" string and complete it */ + if (LoadStringW(hInst, IDS_MY_COMPUTER, szBuffer, COUNT_OF(szBuffer)) && + SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), L"\\")) && + SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), rootName)) && + SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), L"\\"))) { - rootName = get_root_key_name(hRootKey); - - /* Load "My Computer" string and complete it */ - if (LoadStringW(hInst, IDS_MY_COMPUTER, szBuffer, COUNT_OF(szBuffer)) && - SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), L"\\")) && - SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), rootName)) && - SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), L"\\")) && - SUCCEEDED(StringCbCatW(szBuffer, sizeof(szBuffer), keyPath))) - { + HRESULT hr = S_OK; + if (keyPath) + hr = StringCbCatW(szBuffer, sizeof(szBuffer), keyPath); + if (SUCCEEDED(hr)) RegSetValueExW(hKey, L"LastKey", 0, REG_SZ, (LPBYTE)szBuffer, (DWORD)wcslen(szBuffer) * sizeof(WCHAR)); - } + else + DbgPrint("err: (%s:%d): Buffer not big enough for '%S + %S'\n", __FILE__, __LINE__, rootName, keyPath); + } + else + { + DbgPrint("err: (%s:%d): Buffer not big enough for '%S'\n", __FILE__, __LINE__, rootName); } /* Get statusbar settings */
7 years, 4 months
1
0
0
0
[mjansen] 75457: [SDK][XML2SDB] Simplify include / exclude node specification.
by mjansen@svn.reactos.org
Author: mjansen Date: Sun Jul 30 13:37:35 2017 New Revision: 75457 URL:
http://svn.reactos.org/svn/reactos?rev=75457&view=rev
Log: [SDK][XML2SDB] Simplify include / exclude node specification. Modified: trunk/reactos/media/sdb/sysmain.xml trunk/reactos/sdk/tools/xml2sdb/main.cpp trunk/reactos/sdk/tools/xml2sdb/xml2sdb.cpp trunk/reactos/sdk/tools/xml2sdb/xml2sdb.h Modified: trunk/reactos/media/sdb/sysmain.xml URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/media/sdb/sysmain.xml?rev=…
============================================================================== --- trunk/reactos/media/sdb/sysmain.xml [iso-8859-1] (original) +++ trunk/reactos/media/sdb/sysmain.xml [iso-8859-1] Sun Jul 30 13:37:35 2017 @@ -8,57 +8,147 @@ <!-- Version lie shims --> <SHIM NAME="Win95VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="Win98VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="WinNT4SP5VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="Win2000VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="Win2000SP1VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="Win2000SP2VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="Win2000SP3VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="WinXPVersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="WinXPSP1VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="WinXPSP2VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="WinXPSP3VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="Win2k3RTMVersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="Win2k3SP1VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="Win2k3SP2VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="VistaRTMVersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="VistaSP1VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="VistaSP2VersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> <SHIM NAME="Win7RTMVersionLie"> + <INCLUDE MODULE="shell32.dll" /> + <EXCLUDE MODULE="kernel32.dll" /> + <EXCLUDE MODULE="msvcrt.dll" /> + <EXCLUDE MODULE="ole32.dll" /> + <EXCLUDE MODULE="oleaut32.dll" /> <DLLFILE>aclayers.dll</DLLFILE> </SHIM> Modified: trunk/reactos/sdk/tools/xml2sdb/main.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/xml2sdb/main.cpp…
============================================================================== --- trunk/reactos/sdk/tools/xml2sdb/main.cpp [iso-8859-1] (original) +++ trunk/reactos/sdk/tools/xml2sdb/main.cpp [iso-8859-1] Sun Jul 30 13:37:35 2017 @@ -1,9 +1,9 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS xml to sdb converter - * FILE: sdk/tools/xml2sdb/main.cpp - * PURPOSE: Implement platform agnostic read / write / allocation functions, parse commandline - * PROGRAMMERS: Mark Jansen + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS xml to sdb converter + * FILE: sdk/tools/xml2sdb/main.cpp + * PURPOSE: Implement platform agnostic read / write / allocation functions, parse commandline + * PROGRAMMERS: Mark Jansen (mark.jansen(a)reactos.org) * */ @@ -201,7 +201,6 @@ g_ShimDebugLevel = strtoul(value.c_str(), NULL, 10); } -// -i R:\src\apphelp\reactos\media\sdb\sysmain.xml -oR:\build\apphelp\devenv_msvc\media\sdb\ros2.sdb int main(int argc, char * argv[]) { std::string input, output; Modified: trunk/reactos/sdk/tools/xml2sdb/xml2sdb.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/xml2sdb/xml2sdb.…
============================================================================== --- trunk/reactos/sdk/tools/xml2sdb/xml2sdb.cpp [iso-8859-1] (original) +++ trunk/reactos/sdk/tools/xml2sdb/xml2sdb.cpp [iso-8859-1] Sun Jul 30 13:37:35 2017 @@ -1,9 +1,9 @@ /* - * COPYRIGHT: See COPYING in the top level directory - * PROJECT: ReactOS xml to sdb converter - * FILE: sdk/tools/xml2sdb/xml2sdb.cpp - * PURPOSE: Conversion functions from xml -> db - * PROGRAMMERS: Mark Jansen + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS xml to sdb converter + * FILE: sdk/tools/xml2sdb/xml2sdb.cpp + * PURPOSE: Conversion functions from xml -> db + * PROGRAMMERS: Mark Jansen (mark.jansen(a)reactos.org) * */ @@ -16,7 +16,7 @@ using tinyxml2::XMLText; static const GUID GUID_NULL = { 0 }; -static const char szCompilerVersion[] = "1.5.0.0"; +static const char szCompilerVersion[] = "1.6.0.0"; #if !defined(C_ASSERT) #define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1] @@ -241,19 +241,10 @@ bool InExclude::fromXml(XMLHandle dbNode) { Module = ReadStringNode(dbNode, "MODULE"); + // Special module names: '$' and '*' if (!Module.empty()) { - Include = dbNode.FirstChildElement("INCLUDE").ToNode() != NULL; - if (!Include) - { - tinyxml2::XMLElement* elem = dbNode.ToElement(); - if (elem) - { - Include |= (elem->Attribute("INCLUDE") != NULL); - } - } - // $ = ?? - // * + Include = ToNodeName(dbNode) == "INCLUDE"; return true; } return false; @@ -303,7 +294,8 @@ { Name = ReadStringNode(dbNode, "NAME"); CommandLine = ReadStringNode(dbNode, "COMMAND_LINE"); - ReadGeneric(dbNode, InExcludes, "INEXCLUDE"); + ReadGeneric(dbNode, InExcludes, "INCLUDE"); + ReadGeneric(dbNode, InExcludes, "EXCLUDE"); return !Name.empty(); } @@ -331,7 +323,8 @@ ReadGuidNode(dbNode, "FIX_ID", FixID); // GENERAL ? // DESCRIPTION_RC_ID - ReadGeneric(dbNode, InExcludes, "INEXCLUDE"); + ReadGeneric(dbNode, InExcludes, "INCLUDE"); + ReadGeneric(dbNode, InExcludes, "EXCLUDE"); return !Name.empty() && !DllFile.empty(); } @@ -527,6 +520,12 @@ { SHIM_ERR("Unhanled FLAG type\n"); } + else if (NodeName == "INCLUDE" || NodeName == "EXCLUDE") + { + InExclude inex; + if (inex.fromXml(libChild)) + Library.InExcludes.push_back(inex); + } libChild = libChild.NextSibling(); } @@ -560,6 +559,8 @@ } WriteBinary(pdb, TAG_DATABASE_ID, ID); TAGID tidLibrary = BeginWriteListTag(pdb, TAG_LIBRARY); + if (!WriteGeneric(pdb, Library.InExcludes, *this)) + return false; if (!WriteGeneric(pdb, Library.Shims, *this)) return false; EndWriteListTag(pdb, tidLibrary); Modified: trunk/reactos/sdk/tools/xml2sdb/xml2sdb.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/tools/xml2sdb/xml2sdb.…
============================================================================== --- trunk/reactos/sdk/tools/xml2sdb/xml2sdb.h [iso-8859-1] (original) +++ trunk/reactos/sdk/tools/xml2sdb/xml2sdb.h [iso-8859-1] Sun Jul 30 13:37:35 2017 @@ -112,6 +112,7 @@ struct Library { + std::list<InExclude> InExcludes; std::list<Shim> Shims; };
7 years, 4 months
1
0
0
0
[tfaber] 75456: [0.4.6] - Revert r75061 (wined3d sync) due to unresolved regressions CORE-13486
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Jul 30 12:55:37 2017 New Revision: 75456 URL:
http://svn.reactos.org/svn/reactos?rev=75456&view=rev
Log: [0.4.6] - Revert r75061 (wined3d sync) due to unresolved regressions CORE-13486 Added: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/volume.c - copied unchanged from r75060, trunk/reactos/dll/directx/wine/wined3d/volume.c Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/buffer.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/d3d8.spec branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/d3d8_main.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/d3d8_private.h branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/device.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/directx.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/shader.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/surface.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/swapchain.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/texture.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/vertexdeclaration.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/volume.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/CMakeLists.txt branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/buffer.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/d3d9_private.h branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/device.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/directx.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/query.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/shader.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/surface.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/swapchain.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/texture.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/vertexdeclaration.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/volume.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/ddraw.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/ddraw.spec branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/ddraw_private.h branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/device.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/executebuffer.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/main.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/palette.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/surface.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/utils.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/vertexbuffer.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/viewport.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/CMakeLists.txt branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/arb_program_shader.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/ati_fragment_shader.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/buffer.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/context.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/cs.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/device.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/directx.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/drawprim.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/glsl_shader.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/nvidia_texture_shader.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/palette.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/query.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/resource.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/sampler.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/shader.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/shader_sm1.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/shader_sm4.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/state.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/stateblock.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/surface.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/swapchain.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/texture.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/utils.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/vertexdeclaration.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/view.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/wined3d.spec branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/wined3d_gl.h branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/wined3d_main.c branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/wined3d_private.h branches/ros-branch-0_4_6/reactos/media/doc/README.WINE branches/ros-branch-0_4_6/reactos/sdk/include/reactos/wine/wgl.h branches/ros-branch-0_4_6/reactos/sdk/include/reactos/wine/wgl_driver.h branches/ros-branch-0_4_6/reactos/sdk/include/reactos/wine/wined3d.h [This mail would be too long, it was shortened to contain the URLs only.] Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/d3d8.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/d3d8_main.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/d3d8_private.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/device.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/directx.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/shader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/surface.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/swapchain.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/texture.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/vertexdeclaration.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d8/volume.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/d3d9_private.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/device.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/directx.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/query.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/shader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/surface.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/swapchain.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/texture.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/vertexdeclaration.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/d3d9/volume.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/ddraw.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/ddraw.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/ddraw_private.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/device.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/executebuffer.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/main.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/palette.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/surface.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/utils.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/vertexbuffer.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/ddraw/viewport.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/arb_program_shader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/ati_fragment_shader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/buffer.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/context.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/cs.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/device.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/directx.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/drawprim.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/glsl_shader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/nvidia_texture_shader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/palette.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/query.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/resource.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/sampler.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/shader.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/shader_sm1.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/shader_sm4.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/state.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/stateblock.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/surface.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/swapchain.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/texture.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/utils.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/vertexdeclaration.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/view.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/wined3d.spec URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/wined3d_gl.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/wined3d_main.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/dll/directx/wine/wined3d/wined3d_private.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/dll/di…
Modified: branches/ros-branch-0_4_6/reactos/media/doc/README.WINE URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/media/…
Modified: branches/ros-branch-0_4_6/reactos/sdk/include/reactos/wine/wgl.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/sdk/in…
Modified: branches/ros-branch-0_4_6/reactos/sdk/include/reactos/wine/wgl_driver.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/sdk/in…
Modified: branches/ros-branch-0_4_6/reactos/sdk/include/reactos/wine/wined3d.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-branch-0_4_6/reactos/sdk/in…
7 years, 4 months
1
0
0
0
[mjansen] 75455: [SHIMENG] Partial rewrite to make the code easier to maintain. - Protect ARRAY access with macro's / helper functions. - Do not store objects in the ARRAY data, but store pointers ...
by mjansen@svn.reactos.org
Author: mjansen Date: Sun Jul 30 12:47:57 2017 New Revision: 75455 URL:
http://svn.reactos.org/svn/reactos?rev=75455&view=rev
Log: [SHIMENG] Partial rewrite to make the code easier to maintain. - Protect ARRAY access with macro's / helper functions. - Do not store objects in the ARRAY data, but store pointers to the objects. - Rewrite import hooking to use an ARRAY instead of single linked lists. Modified: trunk/reactos/dll/appcompat/apphelp/shimeng.c trunk/reactos/dll/appcompat/apphelp/shimeng.h Modified: trunk/reactos/dll/appcompat/apphelp/shimeng.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/apphelp/shim…
============================================================================== --- trunk/reactos/dll/appcompat/apphelp/shimeng.c [iso-8859-1] (original) +++ trunk/reactos/dll/appcompat/apphelp/shimeng.c [iso-8859-1] Sun Jul 30 12:47:57 2017 @@ -17,7 +17,6 @@ */ #define WIN32_NO_STATUS -#include "windows.h" #include "ntndk.h" #define IN_APPHELP #include "shimlib.h" @@ -40,7 +39,7 @@ BOOL g_bComPlusImage = FALSE; BOOL g_bShimDuringInit = FALSE; BOOL g_bInternalHooksUsed = FALSE; -static ARRAY g_pShimInfo; /* SHIMMODULE */ +static ARRAY g_pShimInfo; /* PSHIMMODULE */ static ARRAY g_pHookArray; /* HOOKMODULEINFO */ HOOKAPIEX g_IntHookEx[] = @@ -50,23 +49,32 @@ "GetProcAddress", /* FunctionName */ StubGetProcAddress, /* ReplacementFunction*/ NULL, /* OriginalFunction */ - { NULL }, /* ModuleLink */ - { NULL } /* ApiLink */ + NULL, /* pShimInfo */ + NULL /* Unused */ }, }; - - - -static BOOL ARRAY_EnsureSize(PARRAY Array, DWORD ItemSize, DWORD GrowWith) +static inline BOOL ARRAY_InitWorker(PARRAY Array, DWORD ItemSize) +{ + Array->Data__ = NULL; + Array->Size__ = Array->MaxSize__ = 0; + Array->ItemSize__ = ItemSize; + + return TRUE; +} + +static inline BOOL ARRAY_EnsureSize(PARRAY Array, DWORD ItemSize, DWORD GrowWith) { PVOID pNewData; DWORD Count; - if (Array->MaxSize > Array->Size) + ASSERT(Array); + ASSERT(ItemSize == Array->ItemSize__); + + if (Array->MaxSize__ > Array->Size__) return TRUE; - Count = Array->Size + GrowWith; + Count = Array->Size__ + GrowWith; pNewData = SeiAlloc(Count * ItemSize); if (!pNewData) @@ -74,18 +82,49 @@ SHIMENG_FAIL("Failed to allocate %d bytes\n", Count * ItemSize); return FALSE; } - Array->MaxSize = Count; - - if (Array->Data) - { - memcpy(pNewData, Array->Data, Array->Size * ItemSize); - SeiFree(Array->Data); - } - Array->Data = pNewData; + Array->MaxSize__ = Count; + + if (Array->Data__) + { + memcpy(pNewData, Array->Data__, Array->Size__ * ItemSize); + SeiFree(Array->Data__); + } + Array->Data__ = pNewData; return TRUE; } +static inline PVOID ARRAY_AppendWorker(PARRAY Array, DWORD ItemSize, DWORD GrowWith) +{ + PBYTE pData; + + if (!ARRAY_EnsureSize(Array, ItemSize, GrowWith)) + return NULL; + + pData = Array->Data__; + pData += (Array->Size__ * ItemSize); + Array->Size__++; + + return pData; +} + +static inline PVOID ARRAY_AtWorker(PARRAY Array, DWORD ItemSize, DWORD n) +{ + PBYTE pData; + + ASSERT(Array); + ASSERT(ItemSize == Array->ItemSize__); + ASSERT(n < Array->Size__); + + pData = Array->Data__; + return pData + (n * ItemSize); +} + + +#define ARRAY_Init(Array, TypeOfArray) ARRAY_InitWorker((Array), sizeof(TypeOfArray)) +#define ARRAY_Append(Array, TypeOfArray) (TypeOfArray*)ARRAY_AppendWorker((Array), sizeof(TypeOfArray), 5) +#define ARRAY_At(Array, TypeOfArray, at) (TypeOfArray*)ARRAY_AtWorker((Array), sizeof(TypeOfArray), at) +#define ARRAY_Size(Array) (Array)->Size__ VOID SeiInitDebugSupport(VOID) @@ -185,16 +224,15 @@ /* TODO: Guard against recursive calling / calling init multiple times! */ VOID NotifyShims(DWORD dwReason, PVOID Info) { - PSHIMMODULE Data; DWORD n; - Data = g_pShimInfo.Data; - for (n = 0; n < g_pShimInfo.Size; ++n) - { - if (!Data[n].pNotifyShims) + for (n = 0; n < ARRAY_Size(&g_pShimInfo); ++n) + { + PSHIMMODULE pShimModule = *ARRAY_At(&g_pShimInfo, PSHIMMODULE, n); + if (!pShimModule->pNotifyShims) continue; - Data[n].pNotifyShims(dwReason, Info); + pShimModule->pNotifyShims(dwReason, Info); } } @@ -209,25 +247,25 @@ } -PSHIMMODULE SeiGetShimInfo(PVOID BaseAddress) -{ - PSHIMMODULE Data; +PSHIMMODULE SeiGetShimModuleInfo(PVOID BaseAddress) +{ DWORD n; - Data = g_pShimInfo.Data; - for (n = 0; n < g_pShimInfo.Size; ++n) - { - if (Data[n].BaseAddress == BaseAddress) - return &Data[n]; + for (n = 0; n < ARRAY_Size(&g_pShimInfo); ++n) + { + PSHIMMODULE pShimModule = *ARRAY_At(&g_pShimInfo, PSHIMMODULE, n); + + if (pShimModule->BaseAddress == BaseAddress) + return pShimModule; } return NULL; } -PSHIMMODULE SeiCreateShimInfo(PCWSTR DllName, PVOID BaseAddress) +PSHIMMODULE SeiCreateShimModuleInfo(PCWSTR DllName, PVOID BaseAddress) { static const ANSI_STRING GetHookAPIs = RTL_CONSTANT_STRING("GetHookAPIs"); static const ANSI_STRING NotifyShims = RTL_CONSTANT_STRING("NotifyShims"); - PSHIMMODULE Data; + PSHIMMODULE* pData, Data; PVOID pGetHookAPIs, pNotifyShims; if (!NT_SUCCESS(LdrGetProcedureAddress(BaseAddress, (PANSI_STRING)&GetHookAPIs, 0, &pGetHookAPIs)) || @@ -237,12 +275,13 @@ return NULL; } - if (!ARRAY_EnsureSize(&g_pShimInfo, sizeof(SHIMMODULE), 5)) + pData = ARRAY_Append(&g_pShimInfo, PSHIMMODULE); + if (!pData) return NULL; - Data = g_pShimInfo.Data; - Data += g_pShimInfo.Size; - g_pShimInfo.Size++; + *pData = SeiAlloc(sizeof(SHIMMODULE)); + + Data = *pData; RtlCreateUnicodeString(&Data->Name, DllName); Data->BaseAddress = BaseAddress; @@ -250,39 +289,40 @@ Data->pGetHookAPIs = pGetHookAPIs; Data->pNotifyShims = pNotifyShims; - Data->HookApis.Data = NULL; - Data->HookApis.Size = 0; - Data->HookApis.MaxSize = 0; + ARRAY_Init(&Data->EnabledShims, PSHIMINFO); return Data; } -VOID SeiAppendHookInfo(PSHIMMODULE pShimInfo, PHOOKAPIEX pHookApi, DWORD dwHookCount) -{ - PHOOKAPIPOINTERS Data; - if (!ARRAY_EnsureSize(&pShimInfo->HookApis, sizeof(HOOKAPIPOINTERS), 5)) +VOID SeiAppendHookInfo(PSHIMMODULE pShimModuleInfo, PHOOKAPIEX pHookApi, DWORD dwHookCount) +{ + PSHIMINFO* pData, Data; + + pData = ARRAY_Append(&pShimModuleInfo->EnabledShims, PSHIMINFO); + if (!pData) return; - Data = pShimInfo->HookApis.Data; - Data += pShimInfo->HookApis.Size; + *pData = SeiAlloc(sizeof(SHIMINFO)); + Data = *pData; Data->pHookApi = pHookApi; Data->dwHookCount = dwHookCount; - pShimInfo->HookApis.Size++; + Data->pShimModule = pShimModuleInfo; } PHOOKMODULEINFO SeiFindHookModuleInfo(PUNICODE_STRING ModuleName, PVOID BaseAddress) { DWORD n; - PHOOKMODULEINFO Data = g_pHookArray.Data; - - for (n = 0; n < g_pHookArray.Size; ++n) - { - if (BaseAddress && BaseAddress == Data[n].BaseAddress) - return &Data[n]; - - if (!BaseAddress && RtlEqualUnicodeString(ModuleName, &Data[n].Name, TRUE)) - return &Data[n]; + + for (n = 0; n < ARRAY_Size(&g_pHookArray); ++n) + { + PHOOKMODULEINFO pModuleInfo = ARRAY_At(&g_pHookArray, HOOKMODULEINFO, n); + + if (BaseAddress && BaseAddress == pModuleInfo->BaseAddress) + return pModuleInfo; + + if (!BaseAddress && RtlEqualUnicodeString(ModuleName, &pModuleInfo->Name, TRUE)) + return pModuleInfo; } return NULL; @@ -334,12 +374,12 @@ static VOID SeiAddShim(TAGREF trShimRef, PARRAY pShimRef) { TAGREF* Data; - if (!ARRAY_EnsureSize(pShimRef, sizeof(TAGREF), 10)) + + Data = ARRAY_Append(pShimRef, TAGREF); + if (!Data) return; - Data = pShimRef->Data; - Data[pShimRef->Size] = trShimRef; - pShimRef->Size++; + *Data = trShimRef; } static VOID SeiSetLayerEnvVar(LPCWSTR wszLayer) @@ -404,8 +444,8 @@ HRESULT hr; SeiDbgPrint(SEI_MSG, NULL, "ShimInfo(Layer(%S))\n", LayerName); if (wszLayerEnvVar[0]) - StringCchCatW(wszLayerEnvVar, _countof(wszLayerEnvVar), L" "); - hr = StringCchCatW(wszLayerEnvVar, _countof(wszLayerEnvVar), LayerName); + StringCchCatW(wszLayerEnvVar, ARRAYSIZE(wszLayerEnvVar), L" "); + hr = StringCchCatW(wszLayerEnvVar, ARRAYSIZE(wszLayerEnvVar), LayerName); if (!SUCCEEDED(hr)) { SHIMENG_FAIL("Unable to append %S\n", LayerName); @@ -429,9 +469,9 @@ } -VOID SeiAddHooks(PHOOKAPIEX hooks, DWORD dwHookCount) -{ - DWORD n; +VOID SeiAddHooks(PHOOKAPIEX hooks, DWORD dwHookCount, PSHIMINFO pShim) +{ + DWORD n, j; UNICODE_STRING UnicodeModName; WCHAR Buf[512]; @@ -442,8 +482,8 @@ ANSI_STRING AnsiString; PVOID DllHandle; PHOOKAPIEX hook = hooks + n; + PHOOKAPIEX* pHookApi; PHOOKMODULEINFO HookModuleInfo; - PSINGLE_LIST_ENTRY Entry; RtlInitAnsiString(&AnsiString, hook->LibraryName); if (!NT_SUCCESS(RtlAnsiStringToUnicodeString(&UnicodeModName, &AnsiString, FALSE))) @@ -475,23 +515,20 @@ if (!HookModuleInfo) { - if (!ARRAY_EnsureSize(&g_pHookArray, sizeof(HOOKMODULEINFO), 5)) + HookModuleInfo = ARRAY_Append(&g_pHookArray, HOOKMODULEINFO); + if (!HookModuleInfo) continue; - HookModuleInfo = g_pHookArray.Data; - HookModuleInfo += g_pHookArray.Size; - g_pHookArray.Size++; - HookModuleInfo->BaseAddress = DllHandle; + ARRAY_Init(&HookModuleInfo->HookApis, PHOOKAPIEX); RtlCreateUnicodeString(&HookModuleInfo->Name, UnicodeModName.Buffer); } - Entry = &HookModuleInfo->ModuleLink; - - while (Entry && Entry->Next) - { - PHOOKAPIEX HookApi = CONTAINING_RECORD(Entry->Next, HOOKAPIEX, ModuleLink); - + hook->pShimInfo = pShim; + + for (j = 0; j < ARRAY_Size(&HookModuleInfo->HookApis); ++j) + { + PHOOKAPIEX HookApi = *ARRAY_At(&HookModuleInfo->HookApis, PHOOKAPIEX, j); int CmpResult = strcmp(hook->FunctionName, HookApi->FunctionName); if (CmpResult == 0) { @@ -499,20 +536,9 @@ SHIMENG_FAIL("Multiple hooks on one API is not yet supported!\n"); ASSERT(0); } - else if (CmpResult < 0) - { - /* Break out of the loop to have the entry inserted 'in place' */ - break; - } - - Entry = Entry->Next; - } - /* If Entry is not NULL, the item is not inserted yet, so link it at the end. */ - if (Entry) - { - hook->ModuleLink.Next = Entry->Next; - Entry->Next = &hook->ModuleLink; - } + } + pHookApi = ARRAY_Append(&HookModuleInfo->HookApis, PHOOKAPIEX); + *pHookApi = hook; } } @@ -545,14 +571,10 @@ /* FIXME: Ordinal not yet supported */ if (HookModuleInfo && HIWORD(lpProcName)) { - PSINGLE_LIST_ENTRY Entry; - - Entry = HookModuleInfo->ModuleLink.Next; - - while (Entry) - { - PHOOKAPIEX HookApi = CONTAINING_RECORD(Entry, HOOKAPIEX, ModuleLink); - + DWORD n; + for (n = 0; n < ARRAY_Size(&HookModuleInfo->HookApis); ++n) + { + PHOOKAPIEX HookApi = *ARRAY_At(&HookModuleInfo->HookApis, PHOOKAPIEX, n); int CmpResult = strcmp(lpProcName, HookApi->FunctionName); if (CmpResult == 0) { @@ -560,14 +582,6 @@ proc = HookApi->ReplacementFunction; break; } - else if (CmpResult < 0) - { - SHIMENG_MSG("Not found %s\n", lpProcName); - /* We are not going to find it anymore.. */ - break; - } - - Entry = Entry->Next; } } @@ -576,24 +590,23 @@ VOID SeiResolveAPIs(VOID) { - PSHIMMODULE Data; DWORD mod, n; - Data = g_pShimInfo.Data; - /* Enumerate all Shim modules */ - for (mod = 0; mod < g_pShimInfo.Size; ++mod) - { - PHOOKAPIPOINTERS pShims = Data[mod].HookApis.Data; - DWORD dwShimCount = Data[mod].HookApis.Size; + for (mod = 0; mod < ARRAY_Size(&g_pShimInfo); ++mod) + { + PSHIMMODULE pShimModule = *ARRAY_At(&g_pShimInfo, PSHIMMODULE, mod); + DWORD dwShimCount = ARRAY_Size(&pShimModule->EnabledShims); /* Enumerate all Shims */ for (n = 0; n < dwShimCount; ++n) { - PHOOKAPIEX hooks = pShims[n].pHookApi; - DWORD dwHookCount = pShims[n].dwHookCount; - - SeiAddHooks(hooks, dwHookCount); + PSHIMINFO pShim = *ARRAY_At(&pShimModule->EnabledShims, PSHIMINFO, n); + + PHOOKAPIEX hooks = pShim->pHookApi; + DWORD dwHookCount = pShim->dwHookCount; + + SeiAddHooks(hooks, dwHookCount, pShim); } } } @@ -606,7 +619,7 @@ return; } - SeiAddHooks(g_IntHookEx, _countof(g_IntHookEx)); + SeiAddHooks(g_IntHookEx, ARRAYSIZE(g_IntHookEx), NULL); g_bInternalHooksUsed = TRUE; } @@ -678,20 +691,18 @@ if (HookModuleInfo) { PIMAGE_THUNK_DATA OriginalThunk, FirstThunk; - PSINGLE_LIST_ENTRY Entry; - - Entry = HookModuleInfo->ModuleLink.Next; - - while (Entry) + DWORD n; + + for (n = 0; n < ARRAY_Size(&HookModuleInfo->HookApis); ++n) { DWORD dwFound = 0; + PHOOKAPIEX HookApi = *ARRAY_At(&HookModuleInfo->HookApis, PHOOKAPIEX, n); + OriginalThunk = (PIMAGE_THUNK_DATA)(DllBase + ImportDescriptor->OriginalFirstThunk); FirstThunk = (PIMAGE_THUNK_DATA)(DllBase + ImportDescriptor->FirstThunk); - for (;OriginalThunk->u1.AddressOfData && FirstThunk->u1.Function && Entry; OriginalThunk++, FirstThunk++) + for (;OriginalThunk->u1.AddressOfData && FirstThunk->u1.Function; OriginalThunk++, FirstThunk++) { - PHOOKAPIEX HookApi = CONTAINING_RECORD(Entry, HOOKAPIEX, ModuleLink); - if (!IMAGE_SNAP_BY_ORDINAL32(OriginalThunk->u1.AddressOfData)) { PIMAGE_IMPORT_BY_NAME ImportName; @@ -712,19 +723,13 @@ } } - if (Entry) + if (dwFound != 1) { - if (dwFound != 1) - { - /* One entry not found. */ - PHOOKAPIEX HookApi = CONTAINING_RECORD(Entry, HOOKAPIEX, ModuleLink); - if (!dwFound) - SHIMENG_INFO("Entry \"%s!%s\" not found for \"%wZ\"\n", HookApi->LibraryName, HookApi->FunctionName, &LdrEntry->BaseDllName); - else - SHIMENG_INFO("Entry \"%s!%s\" found %d times for \"%wZ\"\n", HookApi->LibraryName, HookApi->FunctionName, dwFound, &LdrEntry->BaseDllName); - } - - Entry = Entry->Next; + /* One entry not found. */ + if (!dwFound) + SHIMENG_INFO("Entry \"%s!%s\" not found for \"%wZ\"\n", HookApi->LibraryName, HookApi->FunctionName, &LdrEntry->BaseDllName); + else + SHIMENG_INFO("Entry \"%s!%s\" found %d times for \"%wZ\"\n", HookApi->LibraryName, HookApi->FunctionName, dwFound, &LdrEntry->BaseDllName); } } } @@ -757,14 +762,17 @@ VOID SeiInit(PUNICODE_STRING ProcessImage, HSDB hsdb, SDBQUERYRESULT* pQuery) { DWORD n; - ARRAY ShimRef; - TAGREF* Data; + ARRAY ShimRefArray; DWORD dwTotalHooks = 0; PPEB Peb = NtCurrentPeb(); - ShimRef.Data = NULL; - ShimRef.Size = ShimRef.MaxSize = 0; + /* We should only be called once! */ + ASSERT(g_pShimInfo.ItemSize__ == 0); + + ARRAY_Init(&ShimRefArray, TAGREF); + ARRAY_Init(&g_pShimInfo, PSHIMMODULE); + ARRAY_Init(&g_pHookArray, HOOKMODULEINFO); SeiCheckComPlusImage(Peb->ImageBaseAddress); @@ -774,28 +782,29 @@ */ SeiDbgPrint(SEI_MSG, NULL, "ShimInfo(ExePath(%wZ))\n", ProcessImage); - SeiBuildShimRefArray(hsdb, pQuery, &ShimRef); + SeiBuildShimRefArray(hsdb, pQuery, &ShimRefArray); SeiDbgPrint(SEI_MSG, NULL, "ShimInfo(Complete)\n"); - SHIMENG_INFO("Got %d shims\n", ShimRef.Size); + SHIMENG_INFO("Got %d shims\n", ARRAY_Size(&ShimRefArray)); /* TODO: SeiBuildGlobalInclExclList() */ - Data = ShimRef.Data; - - for (n = 0; n < ShimRef.Size; ++n) + for (n = 0; n < ARRAY_Size(&ShimRefArray); ++n) { PDB pdb; TAGID ShimRef; - if (SdbTagRefToTagID(hsdb, Data[n], &pdb, &ShimRef)) + + TAGREF tr = *ARRAY_At(&ShimRefArray, TAGREF, n); + + if (SdbTagRefToTagID(hsdb, tr, &pdb, &ShimRef)) { LPCWSTR ShimName, DllName, CommandLine = NULL; TAGID ShimTag; WCHAR FullNameBuffer[MAX_PATH]; UNICODE_STRING UnicodeDllName; PVOID BaseAddress; - PSHIMMODULE pShimInfo = NULL; + PSHIMMODULE pShimModuleInfo = NULL; ANSI_STRING AnsiCommandLine = RTL_CONSTANT_STRING(""); PHOOKAPIEX pHookApi; DWORD dwHookCount; @@ -803,7 +812,7 @@ ShimName = SeiGetStringPtr(pdb, ShimRef, TAG_NAME); if (!ShimName) { - SHIMENG_FAIL("Failed to retrieve the name for 0x%x\n", Data[n]); + SHIMENG_FAIL("Failed to retrieve the name for 0x%x\n", tr); continue; } @@ -829,7 +838,7 @@ continue; } - if (!SdbGetAppPatchDir(NULL, FullNameBuffer, _countof(FullNameBuffer))) + if (!SdbGetAppPatchDir(NULL, FullNameBuffer, ARRAYSIZE(FullNameBuffer))) { SHIMENG_WARN("Failed to get the AppPatch dir\n"); continue; @@ -837,8 +846,8 @@ DllName = SeiGetStringPtr(pdb, ShimTag, TAG_DLLFILE); if (DllName == NULL || - !SUCCEEDED(StringCchCatW(FullNameBuffer, _countof(FullNameBuffer), L"\\")) || - !SUCCEEDED(StringCchCatW(FullNameBuffer, _countof(FullNameBuffer), DllName))) + !SUCCEEDED(StringCchCatW(FullNameBuffer, ARRAYSIZE(FullNameBuffer), L"\\")) || + !SUCCEEDED(StringCchCatW(FullNameBuffer, ARRAYSIZE(FullNameBuffer), DllName))) { SHIMENG_WARN("Failed to build a full path for %S\n", ShimName); continue; @@ -847,17 +856,17 @@ RtlInitUnicodeString(&UnicodeDllName, FullNameBuffer); if (NT_SUCCESS(LdrGetDllHandle(NULL, NULL, &UnicodeDllName, &BaseAddress))) { - pShimInfo = SeiGetShimInfo(BaseAddress); + pShimModuleInfo = SeiGetShimModuleInfo(BaseAddress); } else if (!NT_SUCCESS(LdrLoadDll(NULL, NULL, &UnicodeDllName, &BaseAddress))) { SHIMENG_WARN("Failed to load %wZ for %S\n", &UnicodeDllName, ShimName); continue; } - if (!pShimInfo) - { - pShimInfo = SeiCreateShimInfo(DllName, BaseAddress); - if (!pShimInfo) + if (!pShimModuleInfo) + { + pShimModuleInfo = SeiCreateShimModuleInfo(DllName, BaseAddress); + if (!pShimModuleInfo) { SHIMENG_FAIL("Failed to allocate ShimInfo for %S\n", DllName); continue; @@ -867,10 +876,10 @@ SHIMENG_INFO("Shim DLL 0x%p \"%wZ\" loaded\n", BaseAddress, &UnicodeDllName); SHIMENG_INFO("Using SHIM \"%S!%S\"\n", DllName, ShimName); - pHookApi = pShimInfo->pGetHookAPIs(AnsiCommandLine.Buffer, ShimName, &dwHookCount); + pHookApi = pShimModuleInfo->pGetHookAPIs(AnsiCommandLine.Buffer, ShimName, &dwHookCount); SHIMENG_INFO("GetHookAPIs returns %d hooks for DLL \"%wZ\" SHIM \"%S\"\n", dwHookCount, &UnicodeDllName, ShimName); if (dwHookCount) - SeiAppendHookInfo(pShimInfo, pHookApi, dwHookCount); + SeiAppendHookInfo(pShimModuleInfo, pHookApi, dwHookCount); if (CommandLine && *CommandLine) RtlFreeAnsiString(&AnsiCommandLine); @@ -919,7 +928,7 @@ ProcessName.Length = ProcessImage->Length - Back; ProcessName.MaximumLength = ProcessImage->MaximumLength - Back; - for (n = 0; n < _countof(ForbiddenShimmingApps); ++n) + for (n = 0; n < ARRAYSIZE(ForbiddenShimmingApps); ++n) { if (RtlEqualUnicodeString(&ProcessName, ForbiddenShimmingApps + n, TRUE)) { @@ -990,6 +999,6 @@ { SHIMENG_MSG("(%p)\n", BaseAddress); - return SeiGetShimInfo(BaseAddress) != NULL; -} - + return SeiGetShimModuleInfo(BaseAddress) != NULL; +} + Modified: trunk/reactos/dll/appcompat/apphelp/shimeng.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/appcompat/apphelp/shim…
============================================================================== --- trunk/reactos/dll/appcompat/apphelp/shimeng.h [iso-8859-1] (original) +++ trunk/reactos/dll/appcompat/apphelp/shimeng.h [iso-8859-1] Sun Jul 30 12:47:57 2017 @@ -1,5 +1,5 @@ /* - * Copyright 2017 Mark Jansen + * Copyright 2017 Mark Jansen (mark.jansen(a)reactos.org) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,37 +19,42 @@ #ifndef SHIMENG_H #define SHIMENG_H -/* Structure that allows dynamic growing */ +/* ReactOS specific */ + +/* Structure that allows dynamic growing. + Be aware, the data may move! */ typedef struct _ARRAY { - PVOID Data; - DWORD Size; - DWORD MaxSize; + PVOID Data__; + DWORD Size__; + DWORD MaxSize__; + DWORD ItemSize__; } ARRAY, *PARRAY; +typedef struct _SHIMINFO *PSHIMINFO; +typedef struct _SHIMMODULE *PSHIMMODULE; -/* Shims do not know it, but actually they use the type HOOKAPIEX. - We use the 'Reserved' entry for our own purposes. */ - +/* Shims know this structure as HOOKAPI, with 2 reserved members (the last 2). */ typedef struct tagHOOKAPIEX { PCSTR LibraryName; PCSTR FunctionName; PVOID ReplacementFunction; PVOID OriginalFunction; - SINGLE_LIST_ENTRY ModuleLink; - SINGLE_LIST_ENTRY ApiLink; + PSHIMINFO pShimInfo; + PVOID Unused; } HOOKAPIEX, *PHOOKAPIEX; C_ASSERT(sizeof(HOOKAPIEX) == sizeof(HOOKAPI)); -C_ASSERT(offsetof(HOOKAPIEX, ModuleLink) == offsetof(HOOKAPI, Reserved)); +C_ASSERT(offsetof(HOOKAPIEX, pShimInfo) == offsetof(HOOKAPI, Reserved)); -typedef struct _HOOKAPIPOINTERS +typedef struct _SHIMINFO { PHOOKAPIEX pHookApi; DWORD dwHookCount; -} HOOKAPIPOINTERS, *PHOOKAPIPOINTERS; + PSHIMMODULE pShimModule; +} SHIMINFO, *PSHIMINFO; typedef struct _SHIMMODULE { @@ -59,7 +64,7 @@ PHOOKAPIEX (WINAPI* pGetHookAPIs)(LPCSTR szCommandLine, LPCWSTR wszShimName, PDWORD pdwHookCount); BOOL (WINAPI* pNotifyShims)(DWORD fdwReason, PVOID ptr); - ARRAY HookApis; /* HOOKAPIPOINTERS */ + ARRAY EnabledShims; /* PSHIMINFO */ } SHIMMODULE, *PSHIMMODULE; typedef struct _HOOKMODULEINFO @@ -67,8 +72,8 @@ UNICODE_STRING Name; PVOID BaseAddress; - SINGLE_LIST_ENTRY ModuleLink; /* Normal link, all entries from this module */ - SINGLE_LIST_ENTRY ApiLink; /* Multiple hooks on one api, unsupported for now */ + ARRAY HookApis; /* PHOOKAPIEX */ + } HOOKMODULEINFO, *PHOOKMODULEINFO;
7 years, 4 months
1
0
0
0
← Newer
1
2
3
4
...
22
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
Results per page:
10
25
50
100
200