https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9ab5d3afb2007337b0a29…
commit 9ab5d3afb2007337b0a298635729ccd82b3efe18
Author: Oleg Dubinskiy <oleg.dubinskij2013(a)yandex.ua>
AuthorDate: Fri Feb 18 23:00:57 2022 +0200
Commit: GitHub <noreply(a)github.com>
CommitDate: Fri Feb 18 22:00:57 2022 +0100
[WIN32SS][NTGDI] Remove useless assert (#4370) CORE-17561
Remove useless ASSERT(FALSE); in IntGdiCreateDisplayDC, because it actually does not check anything useful. It only asserts each time when the function is called from DxEngCreateMemoryDC by MS DirectDraw stack (ddraw.dll & dxg.sys).
UNIMPLEMENTED debug print is enough a lot to see that this function is not implemented properly.
CORE-17561
---
win32ss/gdi/ntgdi/dclife.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/win32ss/gdi/ntgdi/dclife.c b/win32ss/gdi/ntgdi/dclife.c
index 4671c16d4a7..d94f69b9661 100644
--- a/win32ss/gdi/ntgdi/dclife.c
+++ b/win32ss/gdi/ntgdi/dclife.c
@@ -1064,7 +1064,6 @@ IntGdiCreateDisplayDC(HDEV hDev, ULONG DcType, BOOL EmptyDC)
{
HDC hDC;
UNIMPLEMENTED;
- ASSERT(FALSE);
if (DcType == DC_TYPE_MEMORY)
hDC = NtGdiCreateCompatibleDC(NULL); // OH~ Yuck! I think I taste vomit in my mouth!
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=81943afb7b3603de981fa…
commit 81943afb7b3603de981fae80e994c8d8f29041df
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Fri Feb 18 04:38:52 2022 +0100
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Fri Feb 18 20:24:51 2022 +0100
[FREELDR:NTLDR] Slightly rework how KD transport DLLs are loaded.
A Kernel Debugger Transport DLL is always loaded for Windows XP+ :
either the standard KDCOM.DLL (by default), or an alternative
user-provided one via the /DEBUGPORT= option. If this alternative
does not exist or fails to be loaded, fall back to the standard
KDCOM.DLL.
If no KD dll is loaded, kernel loading would fail because of the
resulting unsatisfied KDCOM dll import (tested on Windows and ReactOS).
+ Normalize kernel, HAL and KD dll file names to lowercase (needed for
case-sensitive installations).
---
boot/freeldr/freeldr/ntldr/winldr.c | 78 +++++++++++++++++++++++++------------
1 file changed, 53 insertions(+), 25 deletions(-)
diff --git a/boot/freeldr/freeldr/ntldr/winldr.c b/boot/freeldr/freeldr/ntldr/winldr.c
index 3e7abaa51f4..317d59a35bd 100644
--- a/boot/freeldr/freeldr/ntldr/winldr.c
+++ b/boot/freeldr/freeldr/ntldr/winldr.c
@@ -575,7 +575,7 @@ LoadWindowsCore(IN USHORT OperatingSystemVersion,
/* Retrieve the HAL file name */
Option += 4; OptionLength -= 4;
RtlStringCbCopyNA(HalFileName, sizeof(HalFileName), Option, OptionLength);
- _strupr(HalFileName);
+ _strlwr(HalFileName);
}
Option = NtLdrGetOptionEx(BootOptions, "KERNEL=", &OptionLength);
@@ -584,7 +584,7 @@ LoadWindowsCore(IN USHORT OperatingSystemVersion,
/* Retrieve the KERNEL file name */
Option += 7; OptionLength -= 7;
RtlStringCbCopyNA(KernelFileName, sizeof(KernelFileName), Option, OptionLength);
- _strupr(KernelFileName);
+ _strlwr(KernelFileName);
}
TRACE("HAL file = '%s' ; Kernel file = '%s'\n", HalFileName, KernelFileName);
@@ -633,50 +633,78 @@ LoadWindowsCore(IN USHORT OperatingSystemVersion,
* the name "kdcom.dll". [...]"
*/
+ /*
+ * A Kernel Debugger Transport DLL is always loaded for Windows XP+ :
+ * either the standard KDCOM.DLL (by default): IsCustomKdDll == FALSE
+ * or an alternative user-provided one via the /DEBUGPORT= option:
+ * IsCustomKdDll == TRUE if it does not specify the default KDCOM.
+ */
+ BOOLEAN IsCustomKdDll = FALSE;
+
/* Check whether there is a DEBUGPORT option */
Option = NtLdrGetOptionEx(BootOptions, "DEBUGPORT=", &OptionLength);
if (Option && (OptionLength > 10))
{
/* Move to the debug port name */
Option += 10; OptionLength -= 10;
- ASSERT(OptionLength > 0);
/*
* Parse the port name.
- * Format: /DEBUGPORT=COM[1-9]
+ * Format: /DEBUGPORT=COM[0-9]
* or: /DEBUGPORT=FILE:\Device\HarddiskX\PartitionY\debug.log
* or: /DEBUGPORT=FOO
* If we only have /DEBUGPORT= (i.e. without any port name),
- * defaults it to "COM".
+ * default to "COM".
*/
- RtlStringCbCopyA(KdDllName, sizeof(KdDllName), "KD");
- if (_strnicmp(Option, "COM", 3) == 0 && '0' <= Option[3] && Option[3] <= '9')
+
+ /* Get the actual length of the debug port
+ * until the next whitespace or colon. */
+ OptionLength = (ULONG)strcspn(Option, " \t:");
+
+ if ((OptionLength == 0) ||
+ ( (OptionLength >= 3) && (_strnicmp(Option, "COM", 3) == 0) &&
+ ((OptionLength == 3) || ('0' <= Option[3] && Option[3] <= '9')) ))
{
- RtlStringCbCatNA(KdDllName, sizeof(KdDllName), Option, 3);
+ /* The standard KDCOM.DLL is used */
}
else
{
- /* Get the actual length of the debug port
- * until the next whitespace or colon. */
- OptionLength = (ULONG)strcspn(Option, " \t:");
- if (OptionLength == 0)
- RtlStringCbCatA(KdDllName, sizeof(KdDllName), "COM");
- else
- RtlStringCbCatNA(KdDllName, sizeof(KdDllName), Option, OptionLength);
+ /* A custom KD DLL is used */
+ IsCustomKdDll = TRUE;
}
- RtlStringCbCatA(KdDllName, sizeof(KdDllName), ".DLL");
- _strupr(KdDllName);
+ }
+ if (!IsCustomKdDll)
+ {
+ Option = "COM"; OptionLength = 3;
+ }
- /*
- * Load the transport DLL. Override the base DLL name of the
- * loaded transport DLL to the default "KDCOM.DLL" name.
- */
- KdDllBase = LoadModule(LoaderBlock, DirPath, KdDllName,
- "kdcom.dll", LoaderSystemCode, &KdDllDTE, 60);
- if (!KdDllBase)
+ RtlStringCbPrintfA(KdDllName, sizeof(KdDllName), "kd%.*s.dll",
+ OptionLength, Option);
+ _strlwr(KdDllName);
+
+ /* Load the KD DLL. Override its base DLL name to the default "KDCOM.DLL". */
+ KdDllBase = LoadModule(LoaderBlock, DirPath, KdDllName,
+ "kdcom.dll", LoaderSystemCode, &KdDllDTE, 60);
+ if (!KdDllBase)
+ {
+ /* If we failed to load a custom KD DLL, fall back to the standard one */
+ if (IsCustomKdDll)
{
- /* The transport DLL being optional, just ignore the failure */
+ /* The custom KD DLL being optional, just ignore the failure */
WARN("LoadModule('%s') failed\n", KdDllName);
+
+ IsCustomKdDll = FALSE;
+ RtlStringCbCopyA(KdDllName, sizeof(KdDllName), "kdcom.dll");
+
+ KdDllBase = LoadModule(LoaderBlock, DirPath, KdDllName,
+ "kdcom.dll", LoaderSystemCode, &KdDllDTE, 60);
+ }
+
+ if (!KdDllBase)
+ {
+ /* Ignore the failure; we will fail later when scanning the
+ * kernel import tables, if it really needs the KD DLL. */
+ ERR("LoadModule('%s') failed\n", KdDllName);
}
}
}
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=fd28a69de63f1a801384e…
commit fd28a69de63f1a801384e3d6c5675189aa82455e
Author: Mark Jansen <mark.jansen(a)reactos.org>
AuthorDate: Wed Feb 16 18:41:43 2022 +0100
Commit: Mark Jansen <mark.jansen(a)reactos.org>
CommitDate: Wed Feb 16 18:43:32 2022 +0100
[WIN32SS] Store the scrollbar theming enabled flag in the scrollbar
This ensure we do not rely on usermode for always passing this flag in,
which is a ReactOS specific flag.
Thanks to Doug Lyons for finding the source of the problem.
CORE-17780
---
win32ss/user/ntuser/scrollbar.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/win32ss/user/ntuser/scrollbar.c b/win32ss/user/ntuser/scrollbar.c
index e4e0ba436af..9d5e4005dcb 100644
--- a/win32ss/user/ntuser/scrollbar.c
+++ b/win32ss/user/ntuser/scrollbar.c
@@ -528,6 +528,11 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
Info = IntGetScrollInfoFromWindow(Window, nBar);
pSBData = IntGetSBData(Window, nBar);
+ if (lpsi->fMask & SIF_THEMED && !(Info->fMask & SIF_THEMED))
+ {
+ Info->fMask |= SIF_THEMED;
+ }
+
/* Set the page size */
if (lpsi->fMask & SIF_PAGE)
{
@@ -660,7 +665,7 @@ co_IntSetScrollInfo(PWND Window, INT nBar, LPCSCROLLINFO lpsi, BOOL bRedraw)
return lpsi->fMask & SIF_PREVIOUSPOS ? OldPos : pSBData->pos; /* SetWindowPos() already did the painting */
if (bRedraw)
{
- if (!(lpsi->fMask & SIF_THEMED)) /* Not Using Themes */
+ if (!(Info->fMask & SIF_THEMED)) /* Not Using Themes */
{
TRACE("Not using themes.\n");
if (action & SA_SSI_REPAINT_ARROWS)