Vijay Kiran Kamuju : ntdll: Fix the SYSTEM_MODULE struct field names.
Alexandre Julliard
julliard at winehq.org
Mon Oct 21 15:28:38 CDT 2019
Module: wine
Branch: master
Commit: 1aff1e6a370ee8c0213a0fd4b220d121da8527aa
URL: https://source.winehq.org/git/wine.git/?a=commit;h=1aff1e6a370ee8c0213a0fd4b220d121da8527aa
Author: Vijay Kiran Kamuju <infyquest at gmail.com>
Date: Sun Oct 20 11:18:52 2019 +0200
ntdll: Fix the SYSTEM_MODULE struct field names.
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>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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 5eacc5a23c..e33c24d7af 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 = mod->BaseAddress;
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 93920714f2..64c39f0940 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 16df963770..9b8bef0fe7 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;
More information about the wine-cvs
mailing list