Skip to content

Commit 63ca8c4

Browse files
[NTOS:EX] Implement NtSetSystemInformation().SystemLoadGdiDriverInSystemSpaceInformation (reactos#8180)
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
1 parent 056bfd3 commit 63ca8c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ntoskrnl/ex/sysinfo.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2363,9 +2363,8 @@ QSI_DEF(SystemSessionProcessesInformation)
23632363
/* Class 54 - Load & map in system space */
23642364
SSI_DEF(SystemLoadGdiDriverInSystemSpaceInformation)
23652365
{
2366-
/* FIXME */
2367-
DPRINT1("NtSetSystemInformation - SystemLoadGdiDriverInSystemSpaceInformation not implemented\n");
2368-
return STATUS_NOT_IMPLEMENTED;
2366+
/* Similar to SystemLoadGdiDriverInformation */
2367+
return SSI_USE(SystemLoadGdiDriverInformation)(Buffer, Size);
23692368
}
23702369

23712370
/* Class 55 - NUMA processor information */

sdk/include/ndk/extypes.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1197,6 +1197,7 @@ typedef struct _SYSTEM_MEMORY_INFORMATION
11971197
} SYSTEM_MEMORY_INFORMATION, *PSYSTEM_MEMORY_INFORMATION;
11981198

11991199
// Class 26
1200+
// See https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/gdi_driver.htm.
12001201
typedef struct _SYSTEM_GDI_DRIVER_INFORMATION
12011202
{
12021203
UNICODE_STRING DriverName;

0 commit comments

Comments
 (0)