Alexandre Julliard : ntdll:
Improved the stub behavior of NtQuerySystemInformation(
SystemModuleInformation).
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jun 20 09:13:41 CDT 2007
Module: wine
Branch: master
Commit: 5817e366346fc9c0e23d30c9d65cbf47c5815e6d
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5817e366346fc9c0e23d30c9d65cbf47c5815e6d
Author: Alexandre Julliard <julliard at winehq.org>
Date: Tue Jun 19 16:58:42 2007 +0200
ntdll: Improved the stub behavior of NtQuerySystemInformation(SystemModuleInformation).
---
dlls/ntdll/loader.c | 3 ++-
dlls/ntdll/nt.c | 15 ++-------------
dlls/ntdll/tests/info.c | 6 ++----
3 files changed, 6 insertions(+), 18 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 77e5308..2826d19 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -1859,6 +1859,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
char* ptr;
PLIST_ENTRY mark, entry;
PLDR_MODULE mod;
+ WORD id = 0;
smi->ModulesCount = 0;
@@ -1875,7 +1876,7 @@ NTSTATUS WINAPI LdrQueryProcessModuleInformation(PSYSTEM_MODULE_INFORMATION smi,
sm->ImageBaseAddress = mod->BaseAddress;
sm->ImageSize = mod->SizeOfImage;
sm->Flags = mod->Flags;
- sm->Id = 0; /* FIXME */
+ sm->Id = id++;
sm->Rank = 0; /* FIXME */
sm->Unknown = 0; /* FIXME */
str.Length = 0;
diff --git a/dlls/ntdll/nt.c b/dlls/ntdll/nt.c
index 3332821..ed707c0 100644
--- a/dlls/ntdll/nt.c
+++ b/dlls/ntdll/nt.c
@@ -844,19 +844,8 @@ NTSTATUS WINAPI NtQuerySystemInformation(
}
break;
case SystemModuleInformation:
- {
- SYSTEM_MODULE_INFORMATION smi;
-
- 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;
- }
+ /* FIXME: should be system-wide */
+ ret = LdrQueryProcessModuleInformation( SystemInformation, Length, &len );
break;
case SystemHandleInformation:
{
diff --git a/dlls/ntdll/tests/info.c b/dlls/ntdll/tests/info.c
index 4837211..526c62e 100644
--- a/dlls/ntdll/tests/info.c
+++ b/dlls/ntdll/tests/info.c
@@ -382,10 +382,8 @@ static void test_query_module(void)
ModuleCount = smi->ModulesCount;
sm = &smi->Modules[0];
- todo_wine{
- /* our implementation is a stub for now */
- ok( ModuleCount > 0, "Expected some modules to be loaded\n");
- }
+ /* our implementation is a stub for now */
+ ok( ModuleCount > 0, "Expected some modules to be loaded\n");
/* Loop through all the modules/drivers, Wine doesn't get here (yet) */
for (i = 0; i < ModuleCount ; i++)
More information about the wine-cvs
mailing list