Z
zbird
Unregistered / Unconfirmed
GUEST, unregistred user!
//---------------------------<br>//帮忙改改下面代码,//我从C++代码改过来的,还有部分我不会改;谢谢<br>//----------------------------<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br> hMod:HMODULE;<br> cbNeededWORD;<br> buf:char;<br> hProcess:thandle;<br> pid:dword;<br>//假使process id是 pid 的话:<br>begin<br> hProcess := OpenProcess(PROCESS_QUERY_INFORMATION or PROCESS_VM_READ,FALSE,pid);<br> if hProcess<>0 then<br> begin<br> if( EnumProcessModules( hProcess, &hMod, sizeof( hMod ), &cbNeeded ) ) then//这里[]<br> begin<br> buf[MAX_PATH+1]='';<br> if(GetModuleBaseName( hProcess, hMod,buf,sizeof buf)>0);<br>//<br>// buf放的就是名字<br>//<br> end;<br> CloseHandle(hProcess);<br>end;