应用程序的文件名(60分)

  • 主题发起人 liangXing
  • 开始时间
L

liangXing

Unregistered / Unconfirmed
GUEST, unregistred user!
怎样得到当前Win95下,已执行的所有应用程序的文件名?<br>
 
试试这个:(注意uses TLHelp32)<br><br>procedure TForm1.Button1Click(Sender: TObject);<br>var<br>&nbsp; lppe: TProcessEntry32;<br>&nbsp; found : boolean;<br>&nbsp; Hand : THandle;<br>begin<br>&nbsp; Hand := CreateToolhelp32Snapshot(TH32CS_SNAPALL,0);<br>&nbsp; found := Process32First(Hand,lppe);<br>&nbsp; while found do begin<br>&nbsp; &nbsp; ListBox1.Items.Add(StrPas(lppe.szExeFile));<br>&nbsp; &nbsp; found := Process32Next(Hand,lppe);<br>&nbsp; end;<br>end;<br>
 
接受答案了.
 
顶部