Skip to content

Commit

Permalink
ntdll: Add stub for NtQuerySystemInformation(SystemModuleInformationEx).
Browse files Browse the repository at this point in the history
  • Loading branch information
awesie authored and Guy1524 committed Apr 6, 2020
1 parent 03ce0b9 commit 6c27e4b
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
21 changes: 21 additions & 0 deletions dlls/ntdll/nt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
9 changes: 9 additions & 0 deletions include/winternl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c27e4b

Please sign in to comment.