https://git.reactos.org/?p=reactos.git;a=commitdiff;h=712f469671a339b29ccd9…
commit 712f469671a339b29ccd9b4e4cb61ae435098286
Author: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
AuthorDate: Sun Oct 24 18:57:52 2021 +0200
Commit: Hermès Bélusca-Maïto <hermes.belusca-maito(a)reactos.org>
CommitDate: Thu Nov 18 22:37:54 2021 +0100
[NTOS:EX] Clarify the situation with the SystemPathInformation class. (#4065)
Since NT 3.51, this information class is trivially implemented.
The path to the NT directory is now stored in KUSER_SHARED_DATA
as the NtSystemRoot member.
Windows Checked builds show the following message and break to
the debugger before failing the function as not implemented:
EX: SystemPathInformation now available via SharedUserData
See
https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/ex/sysinfo/qu…
and
https://www.geoffchappell.com/studies/windows/km/ntoskrnl/inc/api/ntexapi_x…
for more information.
---
ntoskrnl/ex/sysinfo.c | 20 ++++++++++++++------
1 file changed, 14 insertions(+), 6 deletions(-)
diff --git a/ntoskrnl/ex/sysinfo.c b/ntoskrnl/ex/sysinfo.c
index bb037466850..7fcc3e8260d 100644
--- a/ntoskrnl/ex/sysinfo.c
+++ b/ntoskrnl/ex/sysinfo.c
@@ -861,13 +861,21 @@ QSI_DEF(SystemTimeOfDayInformation)
return STATUS_SUCCESS;
}
-/* Class 4 - Path Information */
+/* Class 4 - Path Information (DEPRECATED) */
QSI_DEF(SystemPathInformation)
{
- /* FIXME: QSI returns STATUS_BREAKPOINT. Why? */
- DPRINT1("NtQuerySystemInformation - SystemPathInformation not
implemented\n");
-
- return STATUS_BREAKPOINT;
+ /*
+ * Since NT 3.51, this information class is trivially implemented.
+ * The path to the NT directory is now stored in KUSER_SHARED_DATA
+ * as the NtSystemRoot member.
+ * Windows Checked builds show the following message and break to
+ * the debugger before failing the function as not implemented.
+ */
+#if DBG
+ DPRINT1("EX: SystemPathInformation now available via SharedUserData\n");
+ // DbgBreakPoint(); // Not needed in ReactOS.
+#endif
+ return STATUS_NOT_IMPLEMENTED;
}
/* Class 5 - Process Information */
@@ -2830,7 +2838,7 @@ CallQS[] =
SI_QX(SystemProcessorInformation),
SI_QX(SystemPerformanceInformation),
SI_QX(SystemTimeOfDayInformation),
- SI_QX(SystemPathInformation), /* should be SI_XX */
+ SI_QX(SystemPathInformation),
SI_QX(SystemProcessInformation),
SI_QX(SystemCallCountInformation),
SI_QX(SystemDeviceInformation),