Invoked by `RtlSetThreadIsCritical()` for returning the previous flag value,
and fixes the following error:
```
(ntoskrnl/ps/query.c:3155) Not implemented: 18
```
The implementation is "identical" to that of NtQueryInformationProcess()
`ProcessBreakOnTermination`, with the necessary adaptations, of course.
This library aims to include all the public and global power manager related GUID identifiers into one shared library, of which they can be accessed across multiple modules of ReactOS, e.g. the kernel, ACPI, PCI, et al.
This patch is needed for the development of the Power Manager (#5719) to continue.
CORE-18969
- [PSDK] Sync wincrypt.h to Wine 10.0, keeping our SAL annotated function definitions behind an #ifdef guard
- [XDK] Add definitions to our winnt header that Wine 10.0's winternl.h depends on.
- [INCLUDE/WINE] Sync winternl.h to Wine 10.0
- [OTHER] Fix breaking changes with the synced winternl.h.
Implement SystemLoadGdiDriverInSystemSpaceInformation case of NtSetSystemInformation() function.
According to https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/gdi_driver.htm, it does the similar thing to SystemLoadGdiDriverInformation (these two cases even have the same shared SYSTEM_GDI_DRIVER_INFORMATION structure).
The only difference is, SystemLoadGdiDriverInSystemSpaceInformation uses the global system space (without passing an additional flag to MmLoadSystemImage()), while SystemLoadGdiDriverInformation uses the session space instead.
Since the session space is not supported yet, for now simply redirect SystemLoadGdiDriverInSystemSpaceInformation to SystemLoadGdiDriverInformation case, which we have already implemented. However, this code needs to be updated appropriately (an additional flag should be passed to MmLoadSystemImage() call for SystemGdiDriverInformation as well) once a support for session space is implemented.
This fixes VM starting failure for VirtualBox 3.1.0 - 4.0.24 and 4.3.0 - 4.3.12 versions. Newer versions of VirtualBox still don't work because of another blocking bugs.
CORE-20257
* [NTDLL_WINETEST] `test_query_process_debug_object_handle()`: one WINESYNC
Cherry-pick WineTest part of:
52d733b5c4
server: Implement retrieving the debug object of a process.
by: Alexandre Julliard <julliard@winehq.org>
* [NTOS:PS] Fix `NtQueryInformationProcess(ProcessDebugObjectHandle)`
Close the retrieved `DebugPort` on failure.
Addendum to commit 1e172203a (r55734).
* [NTOS:PS] Optimize `NtQueryInformationProcess(ProcessWow64Information)` on 32-bit.
No need to do the ExAcquire/ReleaseRundownProtection rigamarole since
we aren't retrieving the `Process->Wow64Process` on 32-bit builds.
Addendum to commit 1e172203a (r55734).
* [NTOS:PS] Fix `NtQueryInformationProcess(ProcessExecuteFlags)`
s/return/break/ on a failure case.
Addendum to commit 1e172203a (r55734).
* [NTOS:PS] NtQueryInformationProcess(): Optimize `*ReturnLength` assignment
Enter the SEH block only if we know we'll have to set `*ReturnLength` on return.
Addendum to commit 2278c2914 (r23175).
CORE-20107
Improve the minimal handling done in the fall-back KdSend/ReceivePacket()
routines when they are invoked by KD64 (in Release build).
Part of my `kdbg_tests_kdio_split` branch for splitting kd/kdio.c
into a separate KD dll.
KdSendPacket:
- Silently ignore PACKET_TYPE_KD_STATE_CHANGE32/64 DbgKdLoadSymbolsStateChange notification.
- Partially manage and log the unhandled PACKET_TYPE_KD_STATE_CHANGE DbgKdExceptionStateChange notification.
- Log other unhandled PACKET_TYPE_KD_STATE_CHANGE32/64 and PACKET_TYPE_KD_STATE_MANIPULATE notifications.
When KdSendPacket receives the DbgKdExceptionStateChange notification,
it cannot handle it (no debugger is there!). However, we need to claim
the debugger to be present, so that its KD64 caller: KdpSendWaitContinue(),
can call back KdReceivePacket(PACKET_TYPE_KD_STATE_MANIPULATE), which,
in turn, informs KD that the exception cannot be handled, by returning
a failure code in the ManipulateState's ContinueStatus.
During bugchecks, this allows KiBugCheckDebugBreak() to not loop infinitely,
but instead fall back into calling HalHaltSystem() to halt the computer.
When KDBG isn't included in the kernel (Release build), the fall-back
KdSend/ReceivePacket() routines are invoked by KD64. A minimal handling
of the basic packets needs to be done:
PACKET_TYPE_KD_STATE_CHANGE32/64 for KdSendPacket(),
and PACKET_TYPE_KD_POLL_BREAKIN, PACKET_TYPE_KD_STATE_MANIPULATE
for KdReceivePacket().
Addendum to commit 2046a17ef4
CORE-20107