wclCreateMutex(string,Boolean,Boolean) Method

Creates a new mutex with given name.

Namespace: wclHelpers
function wclCreateMutex(const Name: string; const Unique: Boolean;
 const Own: Boolean = False): THandle;


Type: string

The mutex name.

Type: Boolean

Set this to True to create a process-dependent unique mutex. Otherwise system wide named mutex will be created.

Type: Boolean

The optional parameter (default value is False indicates if the Mutex must be owned by a called.

Return Value

Type: THandle

If the function succeed the returned value is the Mutex handle. If the function failed the returned value is zero.