A+
Name: tlh_rpm
ChangeLog: implemented Toolhelp32ReadProcessMemory
License: X11
GenDate: 2004/01/10 16:34:39 UTC
ModifiedFiles: dlls/kernel/toolhelp.c dlls/kernel/kernel32.spec include/tlhelp32.h
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/kernel/toolhelp.c,v
retrieving revision 1.23
diff -u -u -r1.23 toolhelp.c
--- dlls/kernel/toolhelp.c 30 Sep 2003 01:04:19 -0000 1.23
+++ dlls/kernel/toolhelp.c 9 Jan 2004 19:55:58 -0000
@@ -441,3 +441,24 @@
FIXME(": stub\n");
return FALSE;
}
+
+/******************************************************************
+ * Toolhelp32ReadProcessMemory (KERNEL.@)
+ *
+ *
+ */
+BOOL WINAPI Toolhelp32ReadProcessMemory(DWORD pid, const void* base,
+ void* buf, SIZE_T len, SIZE_T* r)
+{
+ HANDLE h;
+ BOOL ret = FALSE;
+
+ h = (pid) ? OpenProcess(PROCESS_VM_READ, FALSE, pid) : GetCurrentProcess();
+ if (h != NULL)
+ {
+ ret = ReadProcessMemory(h, base, buf, len, r);
+ if (pid) CloseHandle(h);
+ }
+ return ret;
+}
+
Index: dlls/kernel/kernel32.spec
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/dlls/kernel/kernel32.spec,v
retrieving revision 1.121
diff -u -u -r1.121 kernel32.spec
--- dlls/kernel/kernel32.spec 5 Jan 2004 23:42:09 -0000 1.121
+++ dlls/kernel/kernel32.spec 9 Jan 2004 19:50:03 -0000
@@ -818,7 +820,7 @@
@ stub TlsFreeInternal
@ stdcall TlsGetValue(long)
@ stdcall TlsSetValue(long ptr)
-@ stub Toolhelp32ReadProcessMemory
+@ stdcall Toolhelp32ReadProcessMemory(long ptr ptr long ptr)
@ stdcall TransactNamedPipe(long ptr long ptr long ptr ptr)
@ stdcall TransmitCommChar(long long)
@ stdcall TzSpecificLocalTimeToSystemTime(ptr ptr ptr)
Index: include/tlhelp32.h
===================================================================
RCS file: /home/cvs/cvsroot/wine/wine/include/tlhelp32.h,v
retrieving revision 1.10
diff -u -u -r1.10 tlhelp32.h
--- include/tlhelp32.h 11 Sep 2003 03:00:11 -0000 1.10
+++ include/tlhelp32.h 9 Jan 2004 19:57:31 -0000
@@ -154,6 +154,7 @@
} HEAPLIST32, *PHEAPLIST32, *LPHEAPLIST32;
BOOL WINAPI Heap32ListFirst(HANDLE,LPHEAPLIST32);
+BOOL WINAPI Toolhelp32ReadProcessMemory(DWORD,LPCVOID,LPVOID,SIZE_T,SIZE_T*);
#ifdef __cplusplus
} /* extern "C" */