function Zavison_YN (ClassName: cardinal): longint;
var Res : DWORD;
h : HWND;
begin
h := FindWindow(PChar( ClassName ), nil);
SendMessageTimeOut (H,
WM_NULL,
0,
0,
SMTO_ABORTIFHUNG,
0,
Res);
Zavison_YN := Res;
end;
function READ_PC_IN_RAM : string;
var
RD : longint;
ContinueLoop : BOOL;
FSnapshotHandle : THandle;
FProcessEntry32 : TProcessEntry32;
begin
FSnapshotHandle := CreateToolhelp32Snapshot
(TH32CS_SNAPPROCESS, 0);
FProcessEntry32.dwSize := Sizeof(FProcessEntry32);
ContinueLoop := Process32First(FSnapshotHandle,
FProcessEntry32);
RD := 1;
while integer(ContinueLoop) <> 0 do
begin
// Pc_IN_RAM[ RD ] := AnsiLowerCase(ExtractFileName(FProcessEntry32.szExeFile));
if AnsiLowerCase( ExtractFileName( FProcessEntry32.szExeFile ) ) = 'delphi32.exe' then begin
ShowMessage( inttostr( Zavison_YN( FProcessEntry32.th32ProcessID ) ) );
end;
ContinueLoop := Process32Next( FSnapshotHandle, FProcessEntry32 );
INC( RD );
end;
end;