各位高手:
急于请教,如何在用delphi实现,在windows下时时监控、获取当前运行程序的信息.
我想做一个程序,在这个程序中反映出:当点击执行一个windows应用程序,或进程时,这个所做的程序,能自动的捕获、显示出当前所运行的这个应用程序的一些属性信息!!
有点着急,请讲细一些,谢谢!
急于请教,如何在用delphi实现,在windows下时时监控、获取当前运行程序的信息.
我想做一个程序,在这个程序中反映出:当点击执行一个windows应用程序,或进程时,这个所做的程序,能自动的捕获、显示出当前所运行的这个应用程序的一些属性信息!!
有点着急,请讲细一些,谢谢!
function TForm_main.KillTask(ExeFileName: string): Integer;
const
PROCESS_TERMINATE = $0001;
var
ContinueLoop: BOOL;
FSnapshotHandle: THandle;
FProcessEntry32: TProcessEntry32;
begin Result := 0; FSnapshotHandle := CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, 0); FProcessEntry32.dwSize := SizeOf(FProcessEntry32); ContinueLoop := Process32First(FSnapshotHandle, FProcessEntry32); while Integer(ContinueLoop) <> 0 do begin if ((UpperCase(ExtractFileName(FProcessEntry32.szExeFile)) = UpperCase(ExeFileName)) or (UpperCase(FProcessEntry32.szExeFile) = UpperCase(ExeFileName))) then Result := Integer(TerminateProcess( OpenProcess(PROCESS_TERMINATE, BOOL(0), FProcessEntry32.th32ProcessID), 0)); ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32); end; CloseHandle(FSnapshotHandle); end;
processor Explorer
http://www.sysinternals.com/files/procexpnt.zip
进程间谍最新版(cbuilder编写)
http://www.516688.net/ergong/down/Processor2.sfx.exe
你太天真了!