From 09a5724ea067b5cbc07e2981182ba1f93ce479a2 Mon Sep 17 00:00:00 2001 From: Clement Rouault Date: Wed, 16 Sep 2015 16:56:09 +0200 Subject: [PATCH] Add NtQuerySystemInformation to k32testing --- k32testing.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/k32testing.py b/k32testing.py index 18efd0f..4eed467 100644 --- a/k32testing.py +++ b/k32testing.py @@ -374,6 +374,11 @@ def DeviceIoControl(hDevice, dwIoControlCode, lpInBuffer, nInBufferSize=None, lp def NtWow64ReadVirtualMemory64(hProcess, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesRead=None): return NtWow64ReadVirtualMemory64.ctypes_function(hProcess, lpBaseAddress, lpBuffer, nSize, lpNumberOfBytesRead) +@NtdllProxy('NtQuerySystemInformation') +def NtQuerySystemInformation(SystemInformationClass, SystemInformation=None, SystemInformationLength=0, ReturnLength=NeededParameter): + if SystemInformation is not None and SystemInformation == 0: + SystemInformationLength = ctypes.sizeof(SystemInformation) + return NtQuerySystemInformation.ctypes_function(SystemInformationClass, SystemInformation, SystemInformationLength, ReturnLength) ###### ADVAPI32 ########