home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2004 February
/
Chip_2004-02_cd1.bin
/
zkuste
/
konfig
/
download
/
msic
/
Help
/
Int
/
MiTeC_PSAPI.int
< prev
next >
Wrap
Text File
|
2003-08-26
|
5KB
|
92 lines
{*******************************************************}
{ }
{ MiTeC System Information Component }
{ Windows Process Status Helper }
{ version 8.3 for Delphi 5,6,7 }
{ }
{ Copyright ⌐ 1997,2003 Michal Mutl }
{ }
{*******************************************************}
{$INCLUDE MITEC_DEF.INC}
unit MiTeC_PSAPI;
interface
uses Classes, Windows, ShellAPI, SysUtils;
type
PHInst = ^HInst;
TModuleInfo = record
lpBaseOfDll : pointer;
SizeOfImage : Integer;
EntryPoint : pointer
end;
TPSAPIWsWatchInformation = record
FaultingPc : pointer;
FaultingVa : pointer
end;
TProcessMemoryCounters = record
cb : Integer;
PageFaultCount : Integer;
PeakWorkingSetSize : Integer;
WorkingSetSize : Integer;
QuotaPeakPagedPoolUsage : Integer;
QuotaPagedPoolUsage : Integer;
QuotaPeakNonPagedPoolUsage : Integer;
QuotaNonPagedPoolUsage : Integer;
PagefileUsage : Integer;
PeakPagefileUsage : Integer
end;
TaskEnumProcEx = function(threadID : DWORD; hMod16 : WORD; hTask16 : WORD; modName : PChar; fileName : PChar; param : DWORD) : BOOL; stdcall;
function InitPSAPI: Boolean;
function FreePSAPI: Boolean;
function EnumProcesses(pidList : PInteger; cb : Integer; var cbNeeded : DWORD): boolean; stdcall;
function EnumProcessModules(hProcess : THandle; moduleList : PHInst; cb : Integer; var cbNeeded : DWORD) : boolean; stdcall;
function GetModuleBaseName(hProcess : THandle; module : HInst; BaseName : Pchar; size : Integer) : Integer; stdcall;
function GetModuleFileNameEx(hProcess : THandle; module : HInst; FileName : PChar; size : Integer) : Integer; stdcall;
function GetModuleInformation(hProcess : THandle; module : HInst; var info : TModuleInfo; size : Integer) : boolean; stdcall;
function EmptyWorkingSet(hProcess : THandle) : boolean; stdcall;
function QueryWorkingSet(hProcess : THandle; var pv; size : Integer) : boolean; stdcall;
function InitializeProcessForWsWatch(hProcess : THandle) : boolean; stdcall;
function GetWsChanges(hProcess : THandle; var WatchInfo : TPSAPIWsWatchInformation; size : Integer) : boolean; stdcall;
function GetMappedFileName(hProcess : THandle; pv : pointer; FileName : PChar; size : Integer) : Integer; stdcall;
function EnumDeviceDrivers(ImageBase : PInteger; cb : dword; var cbNeeded : dword) : boolean; stdcall;
function GetDeviceDriverBaseName(ImageBase : Integer; BaseName : PChar; size : dword) : Integer; stdcall;
function GetDeviceDriverFileName(ImageBase : Integer; FileName : PChar; size : dword) : Integer; stdcall;
function GetProcessMemoryInfo(hProcess : THandle; var ProcessMemoryCounters : TProcessMemoryCounters; size : Integer) : boolean; stdcall;
function InitVDM: Boolean;
function FreeVDM: Boolean;
function VDMEnumTaskWOWEx(pid : DWORD; callback : TaskEnumProcEx; param : DWORD) : Integer; stdcall;
type
TVDMEnumTaskWOWEx = function (pid : DWORD; callback : TaskEnumProcEx; param : DWORD) : Integer; stdcall;
TEnumProcesses = function (pidList : PInteger; cb : Integer; var cbNeeded : DWORD): boolean; stdcall;
TEnumProcessModules = function (hProcess : THandle; moduleList : PHInst; cb : Integer; var cbNeeded : DWORD) : boolean; stdcall;
TGetModuleBaseName = function (hProcess : THandle; module : HInst; BaseName : Pchar; size : Integer) : Integer; stdcall;
TGetModuleFileNameEx = function (hProcess : THandle; module : HInst; FileName : PChar; size : Integer) : Integer; stdcall;
TGetModuleInformation = function (hProcess : THandle; module : HInst; var info : TModuleInfo; size : Integer) : boolean; stdcall;
TEmptyWorkingSet = function (hProcess : THandle) : boolean; stdcall;
TQueryWorkingSet = function (hProcess : THandle; var pv; size : Integer) : boolean; stdcall;
TInitializeProcessForWsWatch = function (hProcess : THandle) : boolean; stdcall;
TGetWsChanges = function (hProcess : THandle; var WatchInfo : TPSAPIWsWatchInformation; size : Integer) : boolean; stdcall;
TGetMappedFileName = function (hProcess : THandle; pv : pointer; FileName : PChar; size : Integer) : Integer; stdcall;
TEnumDeviceDrivers = function (ImageBase : PInteger; cb : dword; var cbNeeded : dword) : boolean; stdcall;
TGetDeviceDriverBaseName = function (ImageBase : Integer; BaseName : PChar; size : dword) : Integer; stdcall;
TGetDeviceDriverFileName = function (ImageBase : Integer; FileName : PChar; size : dword) : Integer; stdcall;
TGetProcessMemoryInfo = function (hProcess : THandle; var ProcessMemoryCounters : TProcessMemoryCounters; size : Integer) : boolean; stdcall;
var
modulelist :PHInst;
PSAPILoaded :Boolean;
implementation