From 6c27e4be007dfd5fc2a6db1be63a4d6d762292bb Mon Sep 17 00:00:00 2001 From: Andrew Wesie Date: Fri, 12 Apr 2019 20:06:08 -0500 Subject: [PATCH] ntdll: Add stub for NtQuerySystemInformation(SystemModuleInformationEx). --- dlls/ntdll/nt.c | 21 +++++++++++++++++++++ include/winternl.h | 9 +++++++++ 2 files changed, 30 insertions(+) diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c index bd5d73742398..1469271a278a 100644 --- a/dlls/ntdll/nt.c +++ b/dlls/ntdll/nt.c @@ -3025,6 +3025,27 @@ NTSTATUS WINAPI NtQuerySystemInformation( ret = STATUS_SUCCESS; } break; + case SystemModuleInformationEx: + if (!SystemInformation) + ret = STATUS_ACCESS_VIOLATION; + else if (Length < sizeof(SYSTEM_MODULE_INFORMATION_EX)) + { + len = sizeof(SYSTEM_MODULE_INFORMATION_EX); + ret = STATUS_INFO_LENGTH_MISMATCH; + } + else + { + SYSTEM_MODULE_INFORMATION_EX *info = SystemInformation; + + FIXME("info_class SystemModuleInformationEx stub!\n"); + get_ntdll_system_module(&info->BaseInfo); + info->NextOffset = 0; + info->ImageCheckSum = 0; + info->TimeDateStamp = 0; + info->DefaultBase = info->BaseInfo.ImageBaseAddress; + ret = STATUS_SUCCESS; + } + break; case SystemHandleInformation: { struct handle_info *info; diff --git a/include/winternl.h b/include/winternl.h index 15b946cedfb8..2ed8be5b9dbc 100644 --- a/include/winternl.h +++ b/include/winternl.h @@ -2381,6 +2381,15 @@ typedef struct _SYSTEM_MODULE_INFORMATION SYSTEM_MODULE Modules[1]; /* FIXME: should be Modules[0] */ } SYSTEM_MODULE_INFORMATION, *PSYSTEM_MODULE_INFORMATION; +typedef struct _SYSTEM_MODULE_INFORMATION_EX +{ + ULONG NextOffset; + SYSTEM_MODULE BaseInfo; + ULONG ImageCheckSum; + ULONG TimeDateStamp; + void *DefaultBase; +} SYSTEM_MODULE_INFORMATION_EX, *PSYSTEM_MODULE_INFORMATION_EX; + #define THREAD_CREATE_FLAGS_CREATE_SUSPENDED 0x00000001 #define THREAD_CREATE_FLAGS_SKIP_THREAD_ATTACH 0x00000002 #define THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER 0x00000004