这段程序怎么老编译通不过!!!???(5分)

  • 主题发起人 主题发起人 16cy
  • 开始时间 开始时间
1

16cy

Unregistered / Unconfirmed
GUEST, unregistred user!
procedure TForm2.Button8Click(Sender: TObject);<br>var<br>vq,totalcommit,paddr:dword;<br>xy:array[0..4] of char;<br>meminfo:_MEMORY_BASIC_INFORMATION;<br>sysinfo:_SYSTEM_INFO;<br>begin<br>totalcommit:=0;<br>paddr:=0;<br>vq:=VirtualQueryEx(pid,@paddr,meminfo,sizeof(meminfo));<br><br>while vq=sizeof(meminfo) do<br>begin<br> &nbsp; if meminfo.state=MEM_COMMIT &nbsp;then<br> &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp;[red]ReadProcessMemory(pid,meminfo.BaseAddress,@xy,sizeof(xy),0);[/red]<br> &nbsp; &nbsp; &nbsp;vq:=VirtualQueryEx(pid,@paddr,meminfo,sizeof(meminfo));<br> &nbsp; &nbsp; &nbsp;end<br> &nbsp; else<br> &nbsp; &nbsp; &nbsp;begin<br> &nbsp; &nbsp; &nbsp;paddr:=paddr+ mi.RegionSize;<br> &nbsp; &nbsp; &nbsp;vq:=VirtualQueryEx(pid,@paddr,meminfo,sizeof(meminfo));<br> &nbsp; &nbsp; &nbsp;end;<br>end;<br>红色部分老是通不过,说形参实参不匹配!!!!<br>我急死了,搞了一个上午也没搞好,晕。。。。。
 
var<br> &nbsp;vlNumberOfByresRead: Longword;<br>begin<br> &nbsp;//...实参不能用常量<br> &nbsp;ReadProcessMemory(pid,meminfo.BaseAddress,@xy,sizeof(xy), vlNumberOfByresRead);<br>end;
 
太感谢楼上的大哥了。是才学delphi一个多月,平时还要上班的,所以水平很菜,呵呵。<br>以后多和您学习了,你有QQ吗?
 
后退
顶部