mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-01 09:50:52 +00:00
ntdll: Improved the stub behavior of NtQuerySystemInformation(SystemModuleInformation).
This commit is contained in:
parent
fbbd91544f
commit
5817e36634
3 changed files with 6 additions and 18 deletions
|
@ -1859,6 +1859,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
|
||||||
char* ptr;
|
char* ptr;
|
||||||
PLIST_ENTRY mark, entry;
|
PLIST_ENTRY mark, entry;
|
||||||
PLDR_MODULE mod;
|
PLDR_MODULE mod;
|
||||||
|
WORD id = 0;
|
||||||
|
|
||||||
smi->ModulesCount = 0;
|
smi->ModulesCount = 0;
|
||||||
|
|
||||||
|
@ -1875,7 +1876,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
|
||||||
sm->ImageBaseAddress = mod->BaseAddress;
|
sm->ImageBaseAddress = mod->BaseAddress;
|
||||||
sm->ImageSize = mod->SizeOfImage;
|
sm->ImageSize = mod->SizeOfImage;
|
||||||
sm->Flags = mod->Flags;
|
sm->Flags = mod->Flags;
|
||||||
sm->Id = 0; /* FIXME */
|
sm->Id = id++;
|
||||||
sm->Rank = 0; /* FIXME */
|
sm->Rank = 0; /* FIXME */
|
||||||
sm->Unknown = 0; /* FIXME */
|
sm->Unknown = 0; /* FIXME */
|
||||||
str.Length = 0;
|
str.Length = 0;
|
||||||
|
|
|
@ -844,19 +844,8 @@ NTSTATUS WINAPI NtQuerySystemInformation(
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SystemModuleInformation:
|
case SystemModuleInformation:
|
||||||
{
|
/* FIXME: should be system-wide */
|
||||||
SYSTEM_MODULE_INFORMATION smi;
|
ret = LdrQueryProcessModuleInformation( SystemInformation, Length, &len );
|
||||||
|
|
||||||
memset(&smi, 0, sizeof(smi));
|
|
||||||
len = sizeof(smi);
|
|
||||||
|
|
||||||
if ( Length >= len)
|
|
||||||
{
|
|
||||||
if (!SystemInformation) ret = STATUS_ACCESS_VIOLATION;
|
|
||||||
else memcpy( SystemInformation, &smi, len);
|
|
||||||
}
|
|
||||||
else ret = STATUS_INFO_LENGTH_MISMATCH;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case SystemHandleInformation:
|
case SystemHandleInformation:
|
||||||
{
|
{
|
||||||
|
|
|
@ -382,10 +382,8 @@ static void test_query_module(void)
|
||||||
|
|
||||||
ModuleCount = smi->ModulesCount;
|
ModuleCount = smi->ModulesCount;
|
||||||
sm = &smi->Modules[0];
|
sm = &smi->Modules[0];
|
||||||
todo_wine{
|
/* our implementation is a stub for now */
|
||||||
/* our implementation is a stub for now */
|
ok( ModuleCount > 0, "Expected some modules to be loaded\n");
|
||||||
ok( ModuleCount > 0, "Expected some modules to be loaded\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Loop through all the modules/drivers, Wine doesn't get here (yet) */
|
/* Loop through all the modules/drivers, Wine doesn't get here (yet) */
|
||||||
for (i = 0; i < ModuleCount ; i++)
|
for (i = 0; i < ModuleCount ; i++)
|
||||||
|
|
Loading…
Reference in a new issue