Remove the excessive repainting of the non-client window area (title caption/buttons and borders) whenever other windows are being dragged over.
CORE-5877, CORE-16672
Keep the configured event log `MaxSize` as a capacity limit and track the
physical file size separately.
New logs now start at the Windows 64 KiB file-size granularity, instead of
growing immediately to the full configured maximum. They are then grown in
64 KiB chunks as records are written, while preserving the logical used area
in the header offsets and EOF record.
AddControllers already disconnects the controller interrupt on its error paths but left InterruptObject pointing at the freed object.
Now that DriverEntry runs Cleanup on failure (and Unload() routes through it too), that stale pointer is handed to IoDisconnectInterrupt a second time, bugchecking with BAD_POOL_HEADER.
Clear InterruptObject right after disconnecting so Cleanup() skips it.
CORE-20669
The mask bounds check in `DIB_XXBPP_StretchBlt` allowed `sx == cx` (and similar for `sy`),
reading one pixel past the end of the mask bitmap.
On the contrary, the source-surface check a few lines below already does it right.
- Use shared locks for the display device and PDEV lookup paths.
These functions only walk existing lists and take references, while list updates
and mode-switch paths still use exclusive locking.
This avoids serializing read-only display queries unnecessarily.
- Use shared locks for other read-only NtUser calls.
Some win32k syscalls were still taking the exclusive user lock even though they only read existing state.
This switches a few simple query paths to the shared user lock instead: foreground window lookup, IME hotkey/context queries, layered window attributes, and title bar info.
The goal is to avoid taking the writer lock for read-only work while keeping the same behavior.
This is needed for ISO filesystem driver to work correctly,
as it assumes 2048 bytes per sector for CD-ROM media.
Happens on 86Box with board `[i430FX] ASUS P/I-P55TP4XE`,
Bochs emulator with `01/17/97-i440FX-2A69HV3CC-00` BIOS,
and some other real machines.
CORE-20640
Fix the bug, where `NtUserMenuItemFromPoint()` returned `cItems` instead of `NO_SELECTED_ITEM`
when no item is under the point (`mi` is never NULL on a miss), so `MenuItemFromPoint()` callers
could have indexed one past the menu array.
To be used by NT6 apis in kernel32
This is not great. It works, but it puts stuff into the lib that shouldn't be in there. We need it, because the includes need the generated files.
Maybe a dependency could solve that.
This function has an important role
for new ShellExecute implementation.
JIRA issue: CORE-19278
- Add evalcmd static library into
dll/win32/shell32/evalcmd.
- Implement
SHEvaluateSystemCommandTemplate
in evalcmd.
- Link evalcmd to shell32 and shlwapi.
- Modify shell32.spec and shlwapi.spec.
- Add prototype to <shellapi.h>.
- Add
SHEvaluateSystemCommandTemplate
testcase.
- Define PathIsAbsolute inline
function in <shlwapi_undoc.h>
and use it.
As soon as `ObCreateObject()` is successfully invoked, zero-out the winsta
and desktop object buffers and assign them the current process session ID
(into their first `dwSessionId` member). Only then, continue with regular
initialization.
It's done in this systematic way in order to ensure that, in case the
regular initialization of these objects fails and `ObDereferenceObject()`
is invoked, the `nt!ExpWin32SessionCallout()` routine (in `ntoskrnl/ex/win32k.c`)
that is executed as part of the Win32 "delete" object callback registered
by win32k.sys with the Object Manager, correctly finds a valid initialized
`SessionId` value in the "common header" of either the window station
or the desktop object being deleted.
As a side-result, other parts of win32k can directly refer to
`pdesk->dwSessionId` instead of `pdesk->rpwinstaParent->dwSessionId`
for a given desktop.
- Don't use `NtCurrentPeb()` to retrieve the current process session ID,
but `PsGetCurrentProcessSessionId()` instead that doesn't require a PEB.
- Turn the purposely-leaking local `hWinstaDir` variable into a global
`ghWinStaDir` variable, so that when win32k.sys unloading support will
be implemented, one could close `ghWinStaDir` so as to delete the per-
session window-station object directory.
(It isn't created as an `OBJ_PERMANENT` object for this reason.
See comment https://github.com/reactos/reactos/pull/621#discussion_r196303521
in PR #621.)
This hack was introduced in commit 89d0892531 (r6908) to automatically
assign, on kernel-side, the created window as the "current" desktop window,
when it was the first one to be created for the given desktop.
This was necessary back when Win32 desktop windows were managed on
CSRSS side (via the ReactOS-specific `win32csr/desktopbg.c` module).
Since the introduction of the `winsrv` module, and the move of desktop
windows management into Win32k in commit 765f09416d (r57632), see also
CORE-6723, this hack isn't needed anymore because the same sequence
of actions is done by `IntCreateDesktop()`, just after creating the
desktop window.
The call to `IntDefWindowProc()` in the desktop window procedure
`default` case, was disabled in commit ff31610bfb (r68908), because
of a supposed "painting message regression", probably related at
that time to a previous commit 6dfa71c487 (r68904) and CORE-7797.
This isn't relevant anymore.
- Use SAL2 annotations; write Doxygen documentation (based on GPT-5.4 feedback).
- Simplify some of the code.
- Add the `ObSetHandleAttributes()` prototype to `ndk/obfuncs.h`,
since it is exported by ntoskrnl.exe
- Simplify the `ObjectHandleFlagInformation` class implementation,
by directly invoking the `ObSetHandleAttributes()` routine.
Addendum to commit 02d0bb9dbd (r22228) that implemented the class,
and to commit 91105c7915 (r61037) that implemented `ObSetHandleAttributes()`.
- Use SAL2 annotations; write Doxygen documentation (based on GPT-5.4
feedback and https://ntdoc.m417z.com/ntsetinformationobject).
- Move CertEnumSystemStoreLocation to reactos/store.c
- Add emulation layer for unixlib calls
- Implement enumeration of root certificate store in the registry
TODO:
- Implement remaining unixlib functionality using mbedtls or similar