[PATCH] ntdll: Fix the SYSTEM_MODULE struct field names
Vijay Kiran Kamuju
infyquest at gmail.com
Sun Oct 20 04:18:52 CDT 2019
based on https://www.geoffchappell.com/studies/windows/km/ntoskrnl/api/rtl/ldrreloc/process_module_information.htm?ts=0,44
Signed-off-by: Vijay Kiran Kamuju <infyquest at gmail.com>
---
dlls/ntdll/loader.c | 10 +++++-----
dlls/ntdll/tests/info.c | 2 +-
include/winternl.h | 10 +++++-----
3 files changed, 11 insertions(+), 11 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 5eacc5a23c7b..e67a4a6b2fd3 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -3259,14 +3259,14 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
size += sizeof(*sm);
if (size <= buf_size)
{
- sm->Reserved1 = 0; /* FIXME */
- sm->Reserved2 = 0; /* FIXME */
+ sm->Section = 0; /* FIXME */
+ sm->MappedBaseAddress = 0; /* FIXME */
sm->ImageBaseAddress = mod->BaseAddress;
sm->ImageSize = mod->SizeOfImage;
sm->Flags = mod->Flags;
- sm->Id = id++;
- sm->Rank = 0; /* FIXME */
- sm->Unknown = 0; /* FIXME */
+ sm->LoadOrderIndex = id++;
+ sm->InitOrderIndex = 0; /* FIXME */
+ sm->LoadCount = mod->LoadCount;
str.Length = 0;
str.MaximumLength = MAXIMUM_FILENAME_LENGTH;
str.Buffer = (char*)sm->Name;
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index 93920714f215..64c39f09402a 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -488,7 +488,7 @@ static void test_query_module(void)
/* Loop through all the modules/drivers, Wine doesn't get here (yet) */
for (i = 0; i < ModuleCount ; i++)
{
- ok( i == sm->Id, "Id (%d) should have matched %u\n", sm->Id, i);
+ ok( i == sm->LoadOrderIndex, "LoadOrderIndex (%d) should have matched %u\n", sm->LoadOrderIndex, i);
sm++;
}
diff --git a/include/winternl.h b/include/winternl.h
index 16df96377067..9b8bef0fe7c5 100644
--- a/include/winternl.h
+++ b/include/winternl.h
@@ -2271,14 +2271,14 @@ typedef void (CALLBACK *PLDR_DLL_NOTIFICATION_FUNCTION)(ULONG, LDR_DLL_NOTIFICAT
typedef struct _SYSTEM_MODULE
{
- PVOID Reserved1; /* 00/00 */
- PVOID Reserved2; /* 04/08 */
+ PVOID Section; /* 00/00 */
+ PVOID MappedBaseAddress; /* 04/08 */
PVOID ImageBaseAddress; /* 08/10 */
ULONG ImageSize; /* 0c/18 */
ULONG Flags; /* 10/1c */
- WORD Id; /* 14/20 */
- WORD Rank; /* 16/22 */
- WORD Unknown; /* 18/24 */
+ WORD LoadOrderIndex; /* 14/20 */
+ WORD InitOrderIndex; /* 16/22 */
+ WORD LoadCount; /* 18/24 */
WORD NameOffset; /* 1a/26 */
BYTE Name[MAXIMUM_FILENAME_LENGTH]; /* 1c/28 */
} SYSTEM_MODULE, *PSYSTEM_MODULE;
--
2.21.0
More information about the wine-devel
mailing list