home *** CD-ROM | disk | FTP | other *** search
-
- {*******************************************************}
- { }
- { MiTeC System Information Component }
- { Process Detection Part }
- { version 6.5 for Delphi 5,6 }
- { }
- { Copyright ⌐ 1997,2001 Michal Mutl }
- { }
- {*******************************************************}
-
- {$INCLUDE MITEC_DEF.INC}
-
-
- unit MSI_Processes;
-
- interface
-
- uses
- SysUtils, Windows, Classes, MiTeC_PerfLibNT;
-
- type
- TProcesses = class(TPersistent)
- public
- constructor Create;
- destructor Destroy; override;
- procedure GetInfo;
- procedure Report(var sl :TStringList);
- published
- property ProcessCount: integer read GetProcessCount {$IFNDEF D6PLUS} write SetProcessCount {$ENDIF} stored False;
- public
- property ProcessNames[Index: integer]: string read GetProcessName;
-
- function GetPidFromProcessIndex(const ProcessIndex: DWORD): DWORD;
- function GetPidFromProcessName(const ProcessName: string): DWORD;
- function GetProcessNameFromWnd(Wnd: HWND): string;
- function GetProcessNameFromPid(PID: DWORD): string;
- function GetProcessImageName(PID: DWORD): string;
- function GetProcessPriority(PID: DWORD): integer;
- function GetProcessThreadCount(PID: DWORD): integer;
- function GetProcessModuleCount(PID: DWORD): Integer;
- function GetProcessCPUTime(PID: DWORD): Integer;
- procedure GetProcessModules(PID: DWORD; var ModuleList: TStringList);
-
- function TerminateProcess(PID: DWORD; Timeout: Integer): Boolean;
-
- function GetTasksList(var List: TStringList): Boolean;
- end;
-
- implementation
-
-
-