Commit d6771b13 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Implemented Toolhelp32ReadProcessMemory.

parent 9db6037d
......@@ -818,7 +818,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)
......
......@@ -441,3 +441,23 @@ BOOL WINAPI Heap32ListFirst(HANDLE hSnapshot, LPHEAPLIST32 lphl)
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;
}
......@@ -154,6 +154,7 @@ typedef struct tagHEAPLIST32 {
} HEAPLIST32, *PHEAPLIST32, *LPHEAPLIST32;
BOOL WINAPI Heap32ListFirst(HANDLE,LPHEAPLIST32);
BOOL WINAPI Toolhelp32ReadProcessMemory(DWORD,LPCVOID,LPVOID,SIZE_T,SIZE_T*);
#ifdef __cplusplus
} /* extern "C" */
......
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