Author: tkreuzer
Date: Fri Aug 18 08:44:08 2017
New Revision: 75606
URL:
http://svn.reactos.org/svn/reactos?rev=75606&view=rev
Log:
[NDK] Fix prototype of Nt/ZwQuerySystemInformation
Modified:
trunk/reactos/dll/win32/kernel32/client/time.c
trunk/reactos/ntoskrnl/ex/sysinfo.c
trunk/reactos/sdk/include/ndk/exfuncs.h
trunk/reactos/win32ss/drivers/videoprt/videoprt.c
Modified: trunk/reactos/dll/win32/kernel32/client/time.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/time.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/time.c [iso-8859-1] Fri Aug 18 08:44:08 2017
@@ -534,7 +534,7 @@
{
PSYSTEM_PROCESSOR_PERFORMANCE_INFORMATION ProcPerfInfo;
LARGE_INTEGER TotalUserTime, TotalKernTime, TotalIdleTime;
- SIZE_T BufferSize, ReturnLength;
+ ULONG BufferSize, ReturnLength;
CCHAR i;
NTSTATUS Status;
Modified: trunk/reactos/ntoskrnl/ex/sysinfo.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sysinfo.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/sysinfo.c [iso-8859-1] Fri Aug 18 08:44:08 2017
@@ -1922,7 +1922,7 @@
{
return STATUS_INFO_LENGTH_MISMATCH;
}
-
+
/* FIXME */
DPRINT1("NtQuerySystemInformation - SystemPowerInformation not
implemented\n");
return STATUS_NOT_IMPLEMENTED;
@@ -2599,11 +2599,14 @@
/*
* @implemented
*/
-NTSTATUS NTAPI
-NtQuerySystemInformation(IN SYSTEM_INFORMATION_CLASS SystemInformationClass,
- OUT PVOID SystemInformation,
- IN ULONG Length,
- OUT PULONG UnsafeResultLength)
+__kernel_entry
+NTSTATUS
+NTAPI
+NtQuerySystemInformation(
+ _In_ SYSTEM_INFORMATION_CLASS SystemInformationClass,
+ _Out_writes_bytes_to_opt_(SystemInformationLength, *ReturnLength) PVOID
SystemInformation,
+ _In_ ULONG Length,
+ _Out_opt_ PULONG UnsafeResultLength)
{
KPROCESSOR_MODE PreviousMode;
ULONG ResultLength = 0;
Modified: trunk/reactos/sdk/include/ndk/exfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/include/ndk/exfuncs.h?…
==============================================================================
--- trunk/reactos/sdk/include/ndk/exfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/sdk/include/ndk/exfuncs.h [iso-8859-1] Fri Aug 18 08:44:08 2017
@@ -407,9 +407,9 @@
NTAPI
NtQuerySystemInformation(
_In_ SYSTEM_INFORMATION_CLASS SystemInformationClass,
- _Out_ PVOID SystemInformation,
- _In_ ULONG InformationLength,
- _Out_opt_ PULONG ResultLength
+ _Out_writes_bytes_to_opt_(SystemInformationLength, *ReturnLength) PVOID
SystemInformation,
+ _In_ ULONG SystemInformationLength,
+ _Out_opt_ PULONG ReturnLength
);
NTSYSCALLAPI
@@ -876,9 +876,9 @@
NTAPI
ZwQuerySystemInformation(
_In_ SYSTEM_INFORMATION_CLASS SystemInformationClass,
- _Out_ PVOID SystemInformation,
- _In_ SIZE_T Length,
- _Out_opt_ PSIZE_T ResultLength
+ _Out_writes_bytes_to_opt_(SystemInformationLength, *ReturnLength) PVOID
SystemInformation,
+ _In_ ULONG SystemInformationLength,
+ _Out_opt_ PULONG ReturnLength
);
NTSYSAPI
Modified: trunk/reactos/win32ss/drivers/videoprt/videoprt.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/v…
==============================================================================
--- trunk/reactos/win32ss/drivers/videoprt/videoprt.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/drivers/videoprt/videoprt.c [iso-8859-1] Fri Aug 18 08:44:08
2017
@@ -251,7 +251,6 @@
{
WCHAR DeviceVideoBuffer[20];
PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension;
- SIZE_T Size;
NTSTATUS Status;
VIDEO_PORT_CONFIG_INFO ConfigInfo;
SYSTEM_BASIC_INFORMATION SystemBasicInfo;
@@ -280,11 +279,10 @@
ConfigInfo.BusInterruptLevel = DeviceExtension->InterruptLevel;
ConfigInfo.BusInterruptVector = DeviceExtension->InterruptVector;
- Size = sizeof(SystemBasicInfo);
Status = ZwQuerySystemInformation(SystemBasicInformation,
&SystemBasicInfo,
- Size,
- &Size);
+ sizeof(SystemBasicInfo),
+ NULL);
if (NT_SUCCESS(Status))
{
ConfigInfo.SystemMemorySize = SystemBasicInfo.NumberOfPhysicalPages *