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
Previously this was mixed with vcruntime, with some objects being shared. But this is messy. Instead use a separate library and link ucrtbase to this as well. This also matches more closely how native libraries are organized, where vcstartup is merged into the CRT import libraries, while vcruntime is merged into the static CRT libraries.
Port 8443 was an extra TLS 1.1 server hosting only the testman webservice at a time when TLS 1.1 was still an option and we had no other choice on XP/2003.
Now that we can use curl and TLS 1.2/1.3 on these platforms thanks to Mark, there is no need for that extra server anymore.
I'd like to retire it at some point.
Scrolling the canvas with mouse
wheel was a hard work, due to
small scroll amount.
JIRA issue: CORE-19466
- Adjust the scroll amount from 5
to 15 in CCanvasWindow::OnHVScroll.
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
Co-authored-by: Stanislav Motylkov <x86corez@gmail.com>
The behavior of Color Picker (dropper) tool
was incompatible with Windows.
JIRA issue: CORE-19466
- On TOOL_COLOR, when mouse was pressed
or moved, send WM_TOOLSMODELCOLORPICKED
message with color value to the tools settings
window.
- In the tools settings window, display the picked
color.
- Don't apply to the current color until mouse up.
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
These are used by wine for exports that re-export the import stub function from an import library.
We don't need to do anything here, so simply ignore it.
CORE-20657, CORE-13525
Fix an issue in `SetupGetBinaryField()` that made the GUI installer unable to read INF files properly.
For this reason, all the binary values in the registry on a fresh ReactOS installation were all set to `0x00`.
The reason was that the custom HEX parser in Wine's `SetupGetBinaryField()` is broken.
As a solution, we can replace it with a call to C's standard `wcstoul()` function.
(Note that Wine fixed this problem in wine-11, still with a hand-made hex-value parser...)