全
全文检索
Unregistered / Unconfirmed
GUEST, unregistred user!
function getmaptext(hand:longint;id: Pointer):string;<br> var<br> ProcessID:dword;<br> ProcessHndle: HWND;<br> lpNumberOfBytesRead: DWORD;<br> s:string;<br> ok:boolean;<br> begin<br> result:='';<br> getwindowthreadprocessid(hand, ProcessID);<br> ProcessHndle := OpenProcess(PROCESS_VM_READ OR PROCESS_VM_OPERATION ,false,<br> ProcessID);<br> if ProcessHndle <= 0 then exit;<br> setlength(s,256);<br> ok:=ReadProcessMemory(ProcessHndle,id,<br> pchar(s),256, lpNumberOfBytesRead);<br> if ok then<br> begin<br> result:=s;<br> end;<br> CloseHandle(ProcessHndle);<br> end;<br><br>请帮我看看为什么我读取一个内存地址的字符串时读出来的是乱码<br><br>而用金山游侠查看这个地址是却不是乱码<br><br>用金山游侠查看了一下,再调用这个函数得到的就不会是乱码了<br><br><br><br>我是这样调用的<br><br>memo1.Lines.Text :=getmaptext(handle,pointer($00388f20));