ntdll: Semi-stub SystemModuleInformationEx.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45666 Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bf9235aa56
commit
ebd92b980a
@ -500,7 +500,7 @@ static void test_query_module(void)
|
||||
status = pNtQuerySystemInformation(SystemModuleInformationEx, NULL, 0, &size);
|
||||
if (status == STATUS_INVALID_INFO_CLASS)
|
||||
{
|
||||
todo_wine win_skip("SystemModuleInformationEx is not supported.\n");
|
||||
win_skip("SystemModuleInformationEx is not supported.\n");
|
||||
return;
|
||||
}
|
||||
ok(status == STATUS_INFO_LENGTH_MISMATCH, "got %#x\n", status);
|
||||
|
@ -2357,6 +2357,41 @@ NTSTATUS WINAPI NtQuerySystemInformation( SYSTEM_INFORMATION_CLASS class,
|
||||
break;
|
||||
}
|
||||
|
||||
case SystemModuleInformationEx:
|
||||
{
|
||||
/* FIXME: return some fake info for now */
|
||||
static const char *fake_modules[] =
|
||||
{
|
||||
"\\SystemRoot\\system32\\ntoskrnl.exe",
|
||||
"\\SystemRoot\\system32\\hal.dll",
|
||||
"\\SystemRoot\\system32\\drivers\\mountmgr.sys"
|
||||
};
|
||||
|
||||
ULONG i;
|
||||
RTL_PROCESS_MODULE_INFORMATION_EX *module_info = info;
|
||||
|
||||
len = sizeof(*module_info) * ARRAY_SIZE(fake_modules) + sizeof(module_info->NextOffset);
|
||||
if (len <= size)
|
||||
{
|
||||
memset( info, 0, len );
|
||||
for (i = 0; i < ARRAY_SIZE(fake_modules); i++)
|
||||
{
|
||||
SYSTEM_MODULE *sm = &module_info[i].BaseInfo;
|
||||
sm->ImageBaseAddress = (char *)0x10000000 + 0x200000 * i;
|
||||
sm->ImageSize = 0x200000;
|
||||
sm->LoadOrderIndex = i;
|
||||
sm->LoadCount = 1;
|
||||
strcpy( (char *)sm->Name, fake_modules[i] );
|
||||
sm->NameOffset = strrchr( fake_modules[i], '\\' ) - fake_modules[i] + 1;
|
||||
module_info[i].NextOffset = sizeof(*module_info);
|
||||
}
|
||||
module_info[ARRAY_SIZE(fake_modules)].NextOffset = 0;
|
||||
}
|
||||
else ret = STATUS_INFO_LENGTH_MISMATCH;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
case SystemHandleInformation:
|
||||
{
|
||||
struct handle_info *handle_info;
|
||||
|
Loading…
x
Reference in New Issue
Block a user