psapi: GetWsChanges() calls down to the wrong ntdll function. Found by sparse.

Michael Stefaniuc mstefani at redhat.de
Tue Jun 5 18:08:46 CDT 2007


Sparse complained:
dlls/psapi/psapi_main.c:564:51: warning: mixing different enum types
dlls/psapi/psapi_main.c:564:51:     int [signed] enum _PROCESSINFOCLASS  versus
dlls/psapi/psapi_main.c:564:51:     int [signed] enum _MEMORY_INFORMATION_CLASS

Doesn't change much yet as the ProcessWorkingSetWatch action isn't implemented
but make test issues the right warning now:
fixme:ntdll:NtQueryInformationProcess (process=0x28) Unimplemented information class: ProcessWorkingSetWatch
instead of
fixme:virtual:NtQueryVirtualMemory (0x28,(nil),info_class=15,0x333dfc,32768,(nil)) Unknown information class
---
 dlls/psapi/psapi_main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/psapi/psapi_main.c b/dlls/psapi/psapi_main.c
index 0313475..8dae58a 100644
--- a/dlls/psapi/psapi_main.c
+++ b/dlls/psapi/psapi_main.c
@@ -561,7 +561,7 @@ BOOL WINAPI GetWsChanges( HANDLE process, PPSAPI_WS_WATCH_INFORMATION watchinfo,
 
     TRACE( "(%p, %p, %d)\n", process, watchinfo, size );
 
-    status = NtQueryVirtualMemory( process, NULL, ProcessWorkingSetWatch, watchinfo, size, NULL );
+    status = NtQueryInformationProcess( process, ProcessWorkingSetWatch, watchinfo, size, NULL );
 
     if (status)
     {
-- 
1.5.0.6
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20070606/73833668/attachment-0001.pgp


More information about the wine-patches mailing list