Implemented Toolhelp32ReadProcessMemory.
This commit is contained in:
parent
9db6037de8
commit
d6771b1333
|
@ -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" */
|
||||
|
|
Loading…
Reference in New Issue