Announcement

Collapse
No announcement yet.

IsProcess funktioniert unter Delphi 2010 nicht mehr!

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • IsProcess funktioniert unter Delphi 2010 nicht mehr!

    Bekomme bei rProcess.aExeFile, ein blödsinn Raus!

    Unter Delphi 2007 funktioniert es noch! Betriebsystem WinXP!

    function IsProcess(ExeName: string): Boolean;
    (*
    ** This routine examines Windows processes currently running to see if a
    ** certain program is running.
    **
    ** sExe : The executable name of the program to check.
    ** Result: True if the program is running, False otherwise.
    *)
    var
    liI, lSnapShot: Longint;
    rProcess : TProcessEntry32;
    begin
    Result := False;
    ExeName := UpperCase(ExeName);
    lSnapShot := CreateToolHelpSnapShot(TH32CS_SNAPPROCESS, 0);
    if lSnapShot <> 0 then begin
    rProcess.iSize := SizeOf(rProcess);
    liI := ProcessFirst(lSnapShot, rProcess);
    while liI <> 0 do begin
    if Pos(ExeName, UpperCase(rProcess.aExeFile)) <> 0 then begin
    Result := True;
    Break;
    end;
    liI := ProcessNext(lSnapShot, rProcess);
    end;
    CloseHandle(lSnapShot);
    end;
    end;

    Hat wer eine Idee?

  • #2
    Crosspost in der Delphi-Praxis.
    Weiter dort. Deshalb hier zu gemacht.

    Comment

    Working...
    X