var HMutex: THandle; Begin // check if mutex already exists HMutex := CreateMutex(nil, False, 'This is Budded Single App Demo'); if HMutex <>0 then if WaitForSingleObject(HMutex, 0) <> WAIT_TIMEOUT then // Owns the Mutex try// try } AppRun; // run your application finally// wrap up finally ReleaseMutex(HMutex); end; // end try finally end.
var HMutex: THandle;Begin // check if mutex already exists HMutex := CreateMutex(nil, False, This is Budded Single App Demo); if HMutex 0 then if WaitForSingleObject(HMutex, 0) WAIT_TI