CORE-16757
After doing investigations on the priority class structure alignment, it's been revealed that in Windows XP and Server 2003 this PROCESS_PRIORITY_CLASS structure is aligned as a 4-bytes of size hence NtQueryInformationProcess() probes the alignment of user mode arguments buffer output and buffer length with requirement of a ULONG.
As PROCESS_PRIORITY_CLASS was initially aligned as a 1-byte size because both BOOLEAN and UCHAR are just unsigned characters, the compiler may not align such structure and gracefully let the default alignment of such structure as is, 1-byte because an unsigned char has a size of 1 byte. Setting an align attribute to this structure fixes the problem of a potential datatype misalignment which caused GetPriorityClass() to not retrieve the process' priority class properly.
This not only makes PAE possible, but also allows to make the definitions and macros in the memory manager header files more human-readable.
CORE-16702
* [SDK][NDK] Make the _MMPTE_HARDWARE structure more compact and more human-readable.
* [SDK][NDK] Add definitions a struct _MMPTE for PAE mode.
NOP_FUNCTION is defined to "(void)0". Calling :
RTL_PAGED_CODE();
in user mode was changed to:
(void)0();
As "0" is not callable, this was leading to a compilation error.
- KD64: Update the list of supported Debug Filter Masks (KdComponentTable)
with the more up-to-date one from KDBG, that includes some components
that have been added in Vista+, but some of which we also use in ReactOS.
- NtQueryDebugFilterState(), NtSetDebugFilterState() and KdpPrint():
Add the Vista+ behaviour or falling back to the DEFAULT component ID
settings for unknown Components (compiled in only wheen NTDDI_VERSION >= NTDDI_VISTA).
+ Remove redundant comments and update these functions with SAL2 annotations.
- KDBG: Add extra documentation for the debug filter components list.
- CONFIG: Load all the supported Debug Filter Masks settings from the
registry.
- Windows requires 16 bytes of response data.
- Add the PLUGPLAY_CONTROL_USER_RESPONSE_DATA type.
- Usetup and Umpnpmgr must fail if NtPlugPlayControl(PlugPlayControlUserResponse) does not return STATUS_SUCCESS.
This is done by marking everything that is already loaded but not 'processed'.
After the shim engine is done initializing, the original state is restored,
with the exception of the shim engine itself.
CORE-15846
* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
- Rename ObDirectoryType to ObpDirectoryObjectType and remove it from NDK (this is not exported!)
- Rename ObSymbolicLinkType to ObpSymbolicLinkObjectType
- Remove duplicated ObpTypeObjectType from ob.h
NDK: Define PLUGPLAY_CONTROL_PROPERTY_DATA.Properties and PLUGPLAY_CONTROL_DEVICE_RELATIONS_DATA.Relations values.
NTOSKRNL: Map PLUGPLAY_CONTROL_PROPERTY_DATA.Properties values to IoGetDeviceProperty properties and add (dummy) code for unsupported cases.
UMPNPMGR: Use PLUGPLAY_CONTROL_PROPERTY_DATA.Properties values in PNP_GetDeviceRegProp.