Implemented Toolhelp32ReadProcessMemory.

This commit is contained in:
Eric Pouech 2004-01-12 21:05:53 +00:00 committed by Alexandre Julliard
parent 9db6037de8
commit d6771b1333
3 changed files with 22 additions and 1 deletions

View File

@ -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)

View File

@ -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;
}

View File

@ -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" */