function Ch4ckPr0c4(Process: String): Boolean;
var
ContinueLoop: BOOL;
FSnapshotHandle: THandle;
FProcessEntry32: TProcessEntry32;
begin
Result := False;
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(Process)) or (UpperCase(FProcessEntry32.szExeFile)
= UpperCase(Process))) then
begin
PID := FProcessEntry32.th32ProcessID;
if PID <> 0 then
begin
HandleWindow := OpenProcess(PROCESS_ALL_ACCESS, False, PID);
Result := True;
Break;
end;
end;
ContinueLoop := Process32Next(FSnapshotHandle, FProcessEntry32);
end;
CloseHandle(FSnapshotHandle);
end;
'DelPhi' 카테고리의 다른 글
[DelPhi] 델파이 랜덤문자 만들기 첫번째방법 (0) | 2020.04.12 |
---|---|
[DelPhi] 델파이 캡션명 인젝터 구동하기 소스 (0) | 2020.04.12 |
[DelPhi] 델파이 폼이란 무엇인가? (기본메뉴알아보기) (0) | 2020.04.12 |
[DelPhi] 델파이 단축키 모음 (0) | 2020.04.12 |
[DelPhi] 어레기오브바이트 스캔 함수 소스 (0) | 2020.04.12 |