Commit ebd92b98 authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

ntdll: Semi-stub SystemModuleInformationEx.

parent bf9235aa
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment