Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Problem mit IsExeRunning (https://www.delphipraxis.net/163253-problem-mit-isexerunning.html)

kuba 4. Jan 2012 23:14

AW: Problem mit IsExeRunning
 
Ich denke das hier war gemeint...

Delphi-Quellcode:
function IsExeRunning(const AExeName: string): boolean;
  var
    h: THandle;
    P: TProcessEntry32;
  begin
    P.dwSize := SizeOf(P);
    h := CreateToolhelp32Snapshot(TH32CS_SnapProcess, 0);
    try
      Process32First(h, P);
      repeat
        Result := AnsiSameText(AExeName, ExtractFileName(P.szExeFile));
      until Result or (not Process32Next(h, P));
    finally
      CloseHandle(h);
    end;
  end;
Konnte es aber noch nicht für die spezielle Anwendung testen. Für "allgemeingültige" Anwendungen gehts einwandfrei, habe die Änderung in meiner Routine aufgenommen.

kuba


Alle Zeitangaben in WEZ +1. Es ist jetzt 04:44 Uhr.
Seite 2 von 2     12   

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz