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@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Vijay Kiran Kamuju 2019-10-20 11:18:52 +02:00 committed by Alexandre Julliard
parent 9d123b5424
commit 1aff1e6a37
3 changed files with 11 additions and 11 deletions

View File

@ -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;

View File

@ -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++;
}

View File

@ -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;