帮给看看这个代码错在那里了 ( 积分: 20 )

  • 主题发起人 主题发起人 cs193
  • 开始时间 开始时间
C

cs193

Unregistered / Unconfirmed
GUEST, unregistred user!
//能给帮看看这个错在那里吗,运行后没反映<br>procedure&nbsp;TForm1.FormCreate(Sender:&nbsp;TObject);<br>var<br>Window:&nbsp;HWND;<br>Num:&nbsp;cardinal;<br>PHND:&nbsp;THandle;<br>PID,fk:&nbsp;Integer;<br>hp1:array[0..20]&nbsp;of&nbsp;WideChar;&nbsp;//定义宽字符<br>begin<br>Window&nbsp;:=&nbsp;findwindow(nil,&nbsp;'CKC');<br>GetWindowThreadProcessId(Window,&nbsp;@PID);<br>PHND&nbsp;:=&nbsp;OpenProcess(PROCESS_VM_READ,&nbsp;False,&nbsp;PID);<br>if&nbsp;PHND&nbsp;&lt;&gt;&nbsp;0&nbsp;then<br>begin<br>&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;ReadProcessMemory(PHND,&nbsp;Pointer($6cac42),&nbsp;@ft,&nbsp;6,&nbsp;Num)then<br>&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;ReadProcessMemory(PHND,&nbsp;Pointer(ft+$24,&nbsp;@ft,6,&nbsp;Num)then<br>&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;ReadProcessMemory(PHND,&nbsp;Pointer(ft+$25),&nbsp;@HP1,20,&nbsp;Num)then<br>&nbsp;&nbsp;&nbsp;&nbsp;Memo1.Lines.Add(hp1);<br>end;<br>end;
 
没有错!但是你没有ReadProcessMemory权限!<br>BBS&nbsp;中查ReadPhicalMemory
 
后退
顶部