ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2023
----- 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
20 participants
274 discussions
Start a n
N
ew thread
[reactos] 03/03: [NTOS:INBV] Don't hardcode the off-screen rot-bar-bits buffer size.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7b410fb8cadb8184cdf25…
commit 7b410fb8cadb8184cdf25272148812ab979b5cf0 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon May 2 01:26:48 2022 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Dec 24 21:54:24 2023 +0100 [NTOS:INBV] Don't hardcode the off-screen rot-bar-bits buffer size. --- ntoskrnl/inbv/bootanim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ntoskrnl/inbv/bootanim.c b/ntoskrnl/inbv/bootanim.c index 68351e6de9b..bc8b9a3960c 100644 --- a/ntoskrnl/inbv/bootanim.c +++ b/ntoskrnl/inbv/bootanim.c @@ -476,7 +476,7 @@ DisplayBootBitmap( PVOID BootCopy = NULL, BootProgress = NULL, BootLogo = NULL, Header = NULL, Footer = NULL; #ifdef INBV_ROTBAR_IMPLEMENTED - UCHAR Buffer[24 * 9]; + UCHAR Buffer[RTL_NUMBER_OF(RotBarBuffer)]; PVOID Bar = NULL, LineBmp = NULL; ROT_BAR_TYPE TempRotBarSelection = RB_UNSPECIFIED; NTSTATUS Status;
1 year
1
0
0
0
[reactos] 02/03: [NTOS:INBV] Improve comment & define name.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=81dc30a434b251420fd9b…
commit 81dc30a434b251420fd9b972d165caed8dcb6c88 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon May 2 02:48:46 2022 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Dec 24 21:54:23 2023 +0100 [NTOS:INBV] Improve comment & define name. --- ntoskrnl/ex/init.c | 4 ++-- ntoskrnl/inbv/inbv.c | 2 +- ntoskrnl/include/resource.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ntoskrnl/ex/init.c b/ntoskrnl/ex/init.c index 734960a206a..0bbda8a62cd 100644 --- a/ntoskrnl/ex/init.c +++ b/ntoskrnl/ex/init.c @@ -1389,9 +1389,9 @@ Phase1InitializationDiscard(IN PVOID Context) /* Get the SOS setting */ SosEnabled = (CommandLine && strstr(CommandLine, "SOS") != NULL); - /* Setup the boot driver */ + /* Setup the boot video driver */ InbvEnableBootDriver(!NoGuiBoot); - InbvDriverInitialize(LoaderBlock, IDB_MAX_RESOURCE); + InbvDriverInitialize(LoaderBlock, IDB_MAX_RESOURCES); /* Check if GUI boot is enabled */ if (!NoGuiBoot) diff --git a/ntoskrnl/inbv/inbv.c b/ntoskrnl/inbv/inbv.c index 69f40d5444c..9c51098284f 100644 --- a/ntoskrnl/inbv/inbv.c +++ b/ntoskrnl/inbv/inbv.c @@ -48,7 +48,7 @@ static INBV_PROGRESS_STATE InbvProgressState; static BT_PROGRESS_INDICATOR InbvProgressIndicator = {0, 25, 0}; static ULONG ResourceCount = 0; -static PUCHAR ResourceList[1 + IDB_MAX_RESOURCE]; // First entry == NULL, followed by 'ResourceCount' entries. +static PUCHAR ResourceList[1 + IDB_MAX_RESOURCES]; // First entry == NULL, followed by 'ResourceCount' entries. /* diff --git a/ntoskrnl/include/resource.h b/ntoskrnl/include/resource.h index e2537b465f5..55c900bbcb1 100644 --- a/ntoskrnl/include/resource.h +++ b/ntoskrnl/include/resource.h @@ -43,4 +43,4 @@ #define IDB_PROGRESS_BAR 20 #define IDB_COPYRIGHT 21 -#define IDB_MAX_RESOURCE IDB_COPYRIGHT +#define IDB_MAX_RESOURCES IDB_COPYRIGHT
1 year
1
0
0
0
[reactos] 01/03: [NTOS:INBV] Minor code style.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7aec73a76cb22a5a899a6…
commit 7aec73a76cb22a5a899a61de1930ad503cc06dbf Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Mon May 2 03:11:41 2022 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Dec 24 21:54:16 2023 +0100 [NTOS:INBV] Minor code style. --- ntoskrnl/inbv/bootanim.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/ntoskrnl/inbv/bootanim.c b/ntoskrnl/inbv/bootanim.c index 331825315b2..68351e6de9b 100644 --- a/ntoskrnl/inbv/bootanim.c +++ b/ntoskrnl/inbv/bootanim.c @@ -28,13 +28,6 @@ */ // #define REACTOS_SKUS -typedef enum _ROT_BAR_TYPE -{ - RB_UNSPECIFIED, - RB_SQUARE_CELLS, - RB_PROGRESS_BAR -} ROT_BAR_TYPE; - /* * BitBltAligned() alignments */ @@ -81,6 +74,13 @@ typedef enum _ROT_BAR_STATUS RBS_STATUS_MAX } ROT_BAR_STATUS; +typedef enum _ROT_BAR_TYPE +{ + RB_UNSPECIFIED, + RB_SQUARE_CELLS, + RB_PROGRESS_BAR +} ROT_BAR_TYPE; + static BOOLEAN RotBarThreadActive = FALSE; static ROT_BAR_TYPE RotBarSelection = RB_UNSPECIFIED; static ROT_BAR_STATUS PltRotBarStatus = 0; @@ -346,6 +346,8 @@ InbvRotationThread( ULONG X, Y, Index, Total; LARGE_INTEGER Delay = {{0}}; + UNREFERENCED_PARAMETER(Context); + InbvAcquireLock(); if (RotBarSelection == RB_SQUARE_CELLS) { @@ -378,7 +380,7 @@ InbvRotationThread( if (RotBarSelection == RB_SQUARE_CELLS) { - Delay.QuadPart = -800000; // 80 ms + Delay.QuadPart = -800000LL; // 80 ms Total = 18; Index %= Total; @@ -409,7 +411,7 @@ InbvRotationThread( } else if (RotBarSelection == RB_PROGRESS_BAR) { - Delay.QuadPart = -600000; // 60 ms + Delay.QuadPart = -600000LL; // 60 ms Total = SCREEN_WIDTH; Index %= Total;
1 year
1
0
0
0
[reactos] 02/02: [BOOTVID] Fix definition of GetFontPtr().
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7b956a0a1fd859db6b966…
commit 7b956a0a1fd859db6b96666ff34309ed09c08bef Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Thu Apr 28 03:08:57 2022 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Dec 24 21:41:09 2023 +0100 [BOOTVID] Fix definition of GetFontPtr(). --- drivers/base/bootvid/precomp.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/base/bootvid/precomp.h b/drivers/base/bootvid/precomp.h index c3c40a397be..d8ffc0306c9 100644 --- a/drivers/base/bootvid/precomp.h +++ b/drivers/base/bootvid/precomp.h @@ -61,18 +61,18 @@ extern const RGBQUAD VidpDefaultPalette[BV_MAX_COLORS]; #define RGB(r, g, b) ((RGBQUAD)(((UCHAR)(b) | ((USHORT)((UCHAR)(g))<<8)) | (((ULONG)(UCHAR)(r))<<16))) -#define GetRValue(quad) ((UCHAR)(((quad)>>16) & 0xFF)) -#define GetGValue(quad) ((UCHAR)(((quad)>>8) & 0xFF)) -#define GetBValue(quad) ((UCHAR)((quad) & 0xFF)) +#define GetRValue(quad) ((UCHAR)(((quad)>>16) & 0xFF)) +#define GetGValue(quad) ((UCHAR)(((quad)>>8) & 0xFF)) +#define GetBValue(quad) ((UCHAR)((quad) & 0xFF)) -#define InitializePalette() InitPaletteWithTable((PULONG)VidpDefaultPalette, BV_MAX_COLORS) +#define InitializePalette() InitPaletteWithTable((PULONG)VidpDefaultPalette, BV_MAX_COLORS) #ifdef CHAR_GEN_UPSIDE_DOWN -# define GetFontPtr(_Char) &VidpFontData[_Char * BOOTCHAR_HEIGHT] + BOOTCHAR_HEIGHT - 1; -# define FONT_PTR_DELTA (-1) +# define GetFontPtr(_Char) (&VidpFontData[(_Char) * BOOTCHAR_HEIGHT] + BOOTCHAR_HEIGHT - 1) +# define FONT_PTR_DELTA (-1) #else -# define GetFontPtr(_Char) &VidpFontData[_Char * BOOTCHAR_HEIGHT]; -# define FONT_PTR_DELTA (1) +# define GetFontPtr(_Char) (&VidpFontData[(_Char) * BOOTCHAR_HEIGHT]) +# define FONT_PTR_DELTA (1) #endif #endif /* _BOOTVID_PCH_ */
1 year
1
0
0
0
[reactos] 01/02: [NTOS:INBV] Fix build when INBV_ROTBAR_IMPLEMENTED is not defined.
by Hermès Bélusca-Maïto
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=38129960420161577efb5…
commit 38129960420161577efb5dbe1f395127e4c288d5 Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> AuthorDate: Sun Apr 24 06:14:45 2022 +0200 Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org> CommitDate: Sun Dec 24 21:40:36 2023 +0100 [NTOS:INBV] Fix build when INBV_ROTBAR_IMPLEMENTED is not defined. --- ntoskrnl/inbv/bootanim.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ntoskrnl/inbv/bootanim.c b/ntoskrnl/inbv/bootanim.c index 0f962956918..331825315b2 100644 --- a/ntoskrnl/inbv/bootanim.c +++ b/ntoskrnl/inbv/bootanim.c @@ -602,8 +602,10 @@ DisplayBootBitmap( #endif } #else +#ifdef INBV_ROTBAR_IMPLEMENTED /* Use default status bar */ Bar = InbvGetResourceAddress(IDB_BAR_WKSTA); +#endif #endif /* Make sure we have a logo */
1 year
1
0
0
0
[reactos] 01/01: [NTUSER] Add UserHMSetHandle macro (#6164)
by Thamatip Chitpong
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f74a2aac8ccb44f276368…
commit f74a2aac8ccb44f2763683d3200207467c14aeea Author: Thamatip Chitpong <thamatip.chitpong(a)reactos.org> AuthorDate: Sun Dec 24 23:42:15 2023 +0700 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Dec 24 23:42:15 2023 +0700 [NTUSER] Add UserHMSetHandle macro (#6164) --- win32ss/include/ntuser.h | 1 + win32ss/user/ntuser/event.c | 2 +- win32ss/user/ntuser/timer.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/win32ss/include/ntuser.h b/win32ss/include/ntuser.h index c5e08f83ac2..4299e769a69 100644 --- a/win32ss/include/ntuser.h +++ b/win32ss/include/ntuser.h @@ -228,6 +228,7 @@ typedef struct _PROCMARKHEAD } PROCMARKHEAD, *PPROCMARKHEAD; #define UserHMGetHandle(obj) ((obj)->head.h) +#define UserHMSetHandle(obj, handle) ((obj)->head.h = (handle)) /* Window Client Information structure */ struct _ETHREAD; diff --git a/win32ss/user/ntuser/event.c b/win32ss/user/ntuser/event.c index b52efe9389e..daf5bef14b3 100644 --- a/win32ss/user/ntuser/event.c +++ b/win32ss/user/ntuser/event.c @@ -371,7 +371,7 @@ NtUserSetWinEventHook( InsertTailList(&GlobalEvents->Events, &pEH->Chain); GlobalEvents->Counts++; - UserHMGetHandle(pEH) = Handle; + UserHMSetHandle(pEH, Handle); pEH->eventMin = eventMin; pEH->eventMax = eventMax; pEH->idProcess = idProcess; // These are cmp'ed diff --git a/win32ss/user/ntuser/timer.c b/win32ss/user/ntuser/timer.c index 31ec4e256da..df1ebb0e6d0 100644 --- a/win32ss/user/ntuser/timer.c +++ b/win32ss/user/ntuser/timer.c @@ -57,7 +57,7 @@ CreateTimer(VOID) Ret = UserCreateObject(gHandleTable, NULL, NULL, &Handle, TYPE_TIMER, sizeof(TIMER)); if (Ret) { - Ret->head.h = Handle; + UserHMSetHandle(Ret, Handle); InsertTailList(&TimersListHead, &Ret->ptmrList); }
1 year
1
0
0
0
[reactos] 01/01: [COMDLG32] Color Picker: Fix cursor clipping (#6219)
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=758fff284d3239d965bdb…
commit 758fff284d3239d965bdb1d65ec01d5ccfd64d18 Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Dec 24 22:10:26 2023 +0900 Commit: GitHub <noreply(a)github.com> CommitDate: Sun Dec 24 22:10:26 2023 +0900 [COMDLG32] Color Picker: Fix cursor clipping (#6219) - ClipCursor(NULL) for WM_LBUTTONUP and WM_NCDESTROY. - ClipCursor(...) for WM_LBUTTONDOWN. CORE-17002 --- dll/win32/comdlg32/colordlg.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/dll/win32/comdlg32/colordlg.c b/dll/win32/comdlg32/colordlg.c index 1e8c26bf324..517cb4ea627 100644 --- a/dll/win32/comdlg32/colordlg.c +++ b/dll/win32/comdlg32/colordlg.c @@ -1096,6 +1096,9 @@ static LRESULT CC_WMLButtonUp( CCPRIV *infoPtr ) { if (infoPtr->capturedGraph) { +#ifdef __REACTOS__ + ClipCursor(NULL); +#endif infoPtr->capturedGraph = 0; ReleaseCapture(); CC_PaintCross(infoPtr); @@ -1173,6 +1176,14 @@ static LRESULT CC_WMLButtonDown( CCPRIV *infoPtr, LPARAM lParam ) } if (i) { +#ifdef __REACTOS__ + if (infoPtr->capturedGraph) + { + RECT rect; + GetWindowRect(GetDlgItem(infoPtr->hwndSelf, infoPtr->capturedGraph), &rect); + ClipCursor(&rect); + } +#endif CC_EditSetRGB(infoPtr); CC_EditSetHSL(infoPtr); CC_PaintCross(infoPtr); @@ -1215,6 +1226,10 @@ static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message, case WM_INITDIALOG: return CC_WMInitDialog(hDlg, wParam, lParam); case WM_NCDESTROY: +#ifdef __REACTOS__ + // Ensure clipping is released, in case the dialog is closed before WM_LBUTTONUP is received. + ClipCursor(NULL); +#endif DeleteDC(lpp->hdcMem); DeleteObject(lpp->hbmMem); heap_free(lpp); @@ -1236,10 +1251,16 @@ static INT_PTR CALLBACK ColorDlgProc( HWND hDlg, UINT message, if (CC_WMMouseMove(lpp, lParam)) return TRUE; break; +#ifdef __REACTOS__ + /* ReactOS: The following comment doesn't apply */ +#endif case WM_LBUTTONUP: /* FIXME: ClipCursor off (if in color graph)*/ if (CC_WMLButtonUp(lpp)) return TRUE; break; +#ifdef __REACTOS__ + /* ReactOS: The following comment doesn't apply */ +#endif case WM_LBUTTONDOWN:/* FIXME: ClipCursor on (if in color graph)*/ if (CC_WMLButtonDown(lpp, lParam)) return TRUE;
1 year
1
0
0
0
[reactos] 01/01: [SDK] Add <cicero/cicfmap.h> for File Mapping
by Katayama Hirofumi MZ
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4a3a78857f14ec4125f05…
commit 4a3a78857f14ec4125f0591ce67d268aa41bab9d Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> AuthorDate: Sun Dec 24 11:50:11 2023 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> CommitDate: Sun Dec 24 11:50:11 2023 +0900 [SDK] Add <cicero/cicfmap.h> for File Mapping CORE-19361 --- sdk/include/reactos/cicero/cicfmap.h | 165 +++++++++++++++++++++++++++++++++++ 1 file changed, 165 insertions(+) diff --git a/sdk/include/reactos/cicero/cicfmap.h b/sdk/include/reactos/cicero/cicfmap.h new file mode 100644 index 00000000000..201f3227db8 --- /dev/null +++ b/sdk/include/reactos/cicero/cicfmap.h @@ -0,0 +1,165 @@ +/* + * PROJECT: ReactOS Cicero + * LICENSE: LGPL-2.1-or-later (
https://spdx.org/licenses/LGPL-2.1-or-later
) + * PURPOSE: Cicero file mapping + * COPYRIGHT: Copyright 2023 Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com> + */ + +#pragma once + +#include "cicmutex.h" + +// class CicFileMappingStatic; +// class CicFileMapping; + +class CicFileMappingStatic +{ +protected: + LPCWSTR m_pszName; + LPVOID m_pView; + HANDLE m_hMapping; + BOOL m_bCreated; + BOOL m_bHasMutex; + CicMutex *m_pMutex; + + LPVOID _Map(); + +public: + CicFileMappingStatic() { } + ~CicFileMappingStatic() { } + + void Init(LPCWSTR pszName, CicMutex *pMutex); + + LPVOID Create(LPSECURITY_ATTRIBUTES pSA, DWORD dwMaximumSizeLow, LPBOOL pbAlreadyExists); + LPVOID Open(); + void Close(); + + BOOL Enter(); + void Leave(); + BOOL Flush(SIZE_T dwNumberOfBytesToFlush); + void Finalize(); +}; + +class CicFileMapping : public CCicFileMappingStatic +{ +public: + CicFileMapping(LPCWSTR pszName, CicMutex *pMutex); + virtual ~CicFileMapping() { Finalize(); } +}; + +/******************************************************************************/ + +inline +CicFileMapping::CicFileMapping(LPCWSTR pszName, CicMutex *pMutex) + : m_pszName(NULL) + , m_pView(NULL) + , m_hMapping(NULL) + , m_bCreated(FALSE) + , m_bHasMutex(FALSE) + , m_pMutex(NULL) +{ + Init(pszName, pMutex); +} + +inline void CicFileMappingStatic::Close() +{ + if (m_pView) + { + ::UnmapViewOfFile(m_pView); + m_pView = NULL; + } + + if (m_hMapping) + { + ::CloseHandle(m_hMapping); + m_hMapping = NULL; + } + + m_bCreated = FALSE; +} + +inline void CicFileMappingStatic::Init(LPCWSTR pszName, CicMutex *pMutex) +{ + if (pMutex) + m_pMutex = pMutex; + + m_bCreated = FALSE; + m_pszName = pszName; + m_bHasMutex = (pMutex != NULL); +} + +inline LPVOID +CicFileMappingStatic::Create( + LPSECURITY_ATTRIBUTES pSA, + DWORD dwMaximumSizeLow, + LPBOOL pbAlreadyExists) +{ + if (!m_pszName) + return NULL; + + m_hMapping = ::CreateFileMappingW(INVALID_HANDLE_VALUE, + pSA, + PAGE_READWRITE, + 0, + dwMaximumSizeLow, + m_pszName); + if (pbAlreadyExists) + *pbAlreadyExists = (::GetLastError() == ERROR_ALREADY_EXISTS); + if (!m_hMapping) + return NULL; + + m_bCreated = TRUE; + return _Map(); +} + +inline LPVOID CicFileMappingStatic::Open() +{ + if (!m_pszName) + return NULL; + m_hMapping = ::OpenFileMappingW(FILE_MAP_ALL_ACCESS, FALSE, m_pszName); + if (!m_hMapping) + return NULL; + + return _Map(); +} + +inline LPVOID CicFileMappingStatic::_Map() +{ + m_pView = ::MapViewOfFile(m_hMapping, FILE_MAP_WRITE, 0, 0, 0); + if (!m_pView) + { + Close(); + return NULL; + } + return m_pView; +} + +inline BOOL CicFileMappingStatic::Enter() +{ + if (!m_bHasMutex) + return TRUE; + return m_pMutex->Enter(); +} + +inline void CicFileMappingStatic::Leave() +{ + if (!m_bHasMutex) + return; + m_pMutex->Leave(); +} + +inline BOOL CCicFileMappingStatic::Flush(SIZE_T dwNumberOfBytesToFlush) +{ + if (!m_pView) + return FALSE; + return ::FlushViewOfFile(m_pView, dwNumberOfBytesToFlush); +} + +inline void CicFileMappingStatic::Finalize() +{ + if (!m_bHasMutex) + return; + + Close(); + Leave(); +}
1 year
1
0
0
0
[reactos] 01/01: [LDR][NDK] Fix inconsistent Cookie type (#6188)
by Elliot Killick
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=932aef40f76664e30aaaa…
commit 932aef40f76664e30aaaa462a163ab873eb3e91b Author: Elliot Killick <contact(a)elliotkillick.com> AuthorDate: Sat Dec 23 16:13:47 2023 -0500 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Dec 23 22:13:47 2023 +0100 [LDR][NDK] Fix inconsistent Cookie type (#6188) Make LdrUnlockLoaderLock Cookie type consistent with LdrLockLoaderLock and LdrpMakeCookie functions. In addition: * Adjustment of the formatting string for ULONG_PTR; * ntdll.spec: specify ptr for 2nd parameter of LdrUnlockLoaderLock: This is a parameter whose length is pointer-like, platform-dependent. Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito(a)reactos.org> --- dll/ntdll/def/ntdll.spec | 2 +- dll/ntdll/ldr/ldrapi.c | 4 ++-- sdk/include/ndk/ldrfuncs.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dll/ntdll/def/ntdll.spec b/dll/ntdll/def/ntdll.spec index 0dec2c84c88..d4ad13d38bc 100644 --- a/dll/ntdll/def/ntdll.spec +++ b/dll/ntdll/def/ntdll.spec @@ -184,7 +184,7 @@ @ stdcall LdrUnloadAlternateResourceModule(ptr) @ stub -version=0x600+ LdrUnloadAlternateResourceModuleEx @ stdcall LdrUnloadDll(ptr) -@ stdcall LdrUnlockLoaderLock(long long) +@ stdcall LdrUnlockLoaderLock(long ptr) @ stdcall -stub -version=0x600+ LdrUnregisterDllNotification(ptr) @ stdcall LdrVerifyImageMatchesChecksum(ptr long long long) @ stdcall -stub -version=0x600+ LdrVerifyImageMatchesChecksumEx(ptr ptr) diff --git a/dll/ntdll/ldr/ldrapi.c b/dll/ntdll/ldr/ldrapi.c index 34517b1a251..8ef6dc25903 100644 --- a/dll/ntdll/ldr/ldrapi.c +++ b/dll/ntdll/ldr/ldrapi.c @@ -100,11 +100,11 @@ NTSTATUS NTAPI LdrUnlockLoaderLock( _In_ ULONG Flags, - _In_opt_ ULONG Cookie) + _In_opt_ ULONG_PTR Cookie) { NTSTATUS Status = STATUS_SUCCESS; - DPRINT("LdrUnlockLoaderLock(%x %x)\n", Flags, Cookie); + DPRINT("LdrUnlockLoaderLock(%x %Ix)\n", Flags, Cookie); /* Check for valid flags */ if (Flags & ~LDR_UNLOCK_LOADER_LOCK_FLAG_RAISE_ON_ERRORS) diff --git a/sdk/include/ndk/ldrfuncs.h b/sdk/include/ndk/ldrfuncs.h index 9b58e9d5f20..62e334aacf7 100644 --- a/sdk/include/ndk/ldrfuncs.h +++ b/sdk/include/ndk/ldrfuncs.h @@ -119,7 +119,7 @@ NTSTATUS NTAPI LdrUnlockLoaderLock( _In_ ULONG Flags, - _In_opt_ ULONG Cookie + _In_opt_ ULONG_PTR Cookie ); BOOLEAN
1 year
1
0
0
0
[reactos] 01/01: [NETKVM] Don't restrict driver setup to x86 builds (#6221)
by Adam Słaboń
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fcaa38c705d0f856b504d…
commit fcaa38c705d0f856b504d200439b43f9ea6abfa1 Author: Adam Słaboń <asaillen(a)protonmail.com> AuthorDate: Sat Dec 23 22:00:34 2023 +0100 Commit: GitHub <noreply(a)github.com> CommitDate: Sat Dec 23 22:00:34 2023 +0100 [NETKVM] Don't restrict driver setup to x86 builds (#6221) --- drivers/network/dd/netkvm/netkvm.inf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/network/dd/netkvm/netkvm.inf b/drivers/network/dd/netkvm/netkvm.inf index 72ef931113d..5bda6b4a3f9 100644 --- a/drivers/network/dd/netkvm/netkvm.inf +++ b/drivers/network/dd/netkvm/netkvm.inf @@ -25,9 +25,9 @@ DriverPackageType = PlugAndPlay DriverPackageDisplayName = %kvmnet5.DeviceDesc% [Manufacturer] -%VENDOR% = NetKVM, NTx86.5.1 +%VENDOR% = NetKVM -[NetKVM.NTx86.5.1] +[NetKVM] %kvmnet5.DeviceDesc% = kvmnet5.ndi, PCI\VEN_1AF4&DEV_1000&SUBSYS_00011AF4&REV_00, PCI\VEN_1AF4&DEV_1000 %kvmnet5.DeviceDesc% = kvmnet5.ndi, PCI\VEN_1AF4&DEV_1041&SUBSYS_11001AF4&REV_01, PCI\VEN_1AF4&DEV_1041
1 year
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
28
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
Results per page:
10
25
50
100
200