UtilApplicationCreateMutex(Boolean, String, Boolean, Boolean) Method

Initializes a new instance of the Mutex class with a Boolean value that indicates whether the calling thread should have initial ownership of the Mutex, a String that is the name of the mutex, and a Boolean variable that, when the method returns, indicates whether the calling thread was granted initial ownership of the Mutex.

Definition

Namespace: DevCase.Core.Application
Assembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static Mutex CreateMutex(
	bool globalScope,
	string name,
	bool initiallyOwned,
	ref bool refCreatedNew
)

Parameters

globalScope  Boolean
Indicates the visibility scope for the Mutex object to be created.

If , The mutex is visible in all terminal server sessions, otherwise, The mutex is visible only in the terminal server session where it was created.

name  String
The name of the system mutex.

If the value is , the Mutex is unnamed.

initiallyOwned  Boolean
to give the calling thread initial ownership of the named system mutex if the named system mutex is created as a result of this call; otherwise, .
refCreatedNew  Boolean
When this method returns, contains a Boolean that is if a local mutex was created (that is, if name is null or an empty string) or if the specified named system mutex was created; if the specified named system mutex already existed.

Return Value

Mutex
The resulting Mutex object.

Example

This is a code example.
C#
No code example is currently available or this language may not be supported.

See Also