Einzelnen Beitrag anzeigen

Koma-Code
(Gast)

n/a Beiträge
 
#3

Re: CreateMutex, komischer Fehler

  Alt 12. Jul 2004, 13:14
Hier:

Delphi-Quellcode:
initialization
mHandle := CreateMutex(nil,True,'Name');
if (GetLastError = ERROR_ALREADY_EXISTS) then
 begin
  ...
 end
  else ShowMessage ('Program is already running.');

  halt;
end;


finalization
if mHandle <> 0 then CloseHandle(mHandle);
  Mit Zitat antworten Zitat