home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 February / Chip_2004-02_cd1.bin / zkuste / konfig / download / msic / Help / Int / MSI_Processes.int < prev    next >
Text File  |  2003-08-26  |  2KB  |  92 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {         MiTeC System Information Component            }
  5. {               Process Enumeration Part                }
  6. {           version 8.3 for Delphi 5,6,7                }
  7. {                                                       }
  8. {       Copyright ⌐ 1997,2003 Michal Mutl               }
  9. {                                                       }
  10. {*******************************************************}
  11.  
  12. {$INCLUDE MITEC_DEF.INC}
  13.  
  14.  
  15. unit MSI_Processes;
  16.  
  17. interface
  18.  
  19. uses
  20.   SysUtils, Windows, Classes, MiTeC_Native;
  21.  
  22. type
  23.   TThreadInfo = record
  24.   end;
  25.  
  26.   TThreadList = array of TThreadInfo;
  27.  
  28.   TModuleInfo = record
  29.   end;
  30.  
  31.   TModuleList = array of TModuleInfo;
  32.  
  33.   THeapBlockInfo = record
  34.   end;
  35.  
  36.   THeapBlockList = array of THeapBlockInfo;
  37.  
  38.   THeapListInfo = record
  39.     HeapBlocks: THeapBlockList;
  40.   end;
  41.  
  42.   THeapListList = array of THeapListInfo;
  43.  
  44.   TProcessInfo = record
  45.     PID :DWORD;
  46.     Name,
  47.     ImageName: shortstring;
  48.     Priority,
  49.     Usage,
  50.     ParentPID,
  51.     ThreadCount,
  52.     HeapID,
  53.     ModuleID: DWORD;
  54.     CreateTime: LARGE_INTEGER;
  55.     LastUserTime,UserTime: LARGE_INTEGER;
  56.     LastKernelTime,KernelTime: LARGE_INTEGER;
  57.     VMCounters: TVMCounters;
  58.     IOCounters: TIOCounters;
  59.     HeapLists: THeapListList;
  60.     Modules: TModuleList;
  61.     Threads :TThreadList;
  62.   end;
  63.  
  64.   TProcList = array of TProcessInfo;
  65.  
  66.   TProcessList = class(TPersistent)
  67.   private
  68.     FPL: TProcList;
  69.     function GetProcessCount: integer;
  70.     function GetProcess(Index: DWORD): TProcessInfo;
  71.  
  72.     procedure FreeProcessList;
  73.     procedure ClearProcessInfo(var ARecord: TProcessInfo);
  74.   public
  75.     constructor Create;
  76.     destructor Destroy; override;
  77.     procedure GetInfo;
  78.     procedure Report(var sl: TStringList; Standalone: Boolean = True); virtual;
  79.  
  80.     function FindProcess(APID: DWORD): Integer;
  81.  
  82.     property Processes[Index: DWORD]: TProcessInfo read GetProcess;
  83.     property ProcessCount: integer read GetProcessCount stored False;
  84.   published
  85.   end;
  86.  
  87. resourcestring
  88.   rsSystemIdle = '[System Idle Process]';
  89.  
  90. implementation
  91.  
  92.