C# Class NanoByte.Common.Native.WindowsMutex

Provides Windows-specific API calls for cross-process Mutexes.
Afficher le fichier Open project: nano-byte/common

Méthodes publiques

Méthode Description
Close ( IntPtr handle ) : void

Closes an existing mutex handle. The mutex is destroyed if this is the last handle.

Create ( [ name, IntPtr &handle ) : bool

Creates or opens a mutex.

The mutex will automatically be released once the process terminates.

Open ( [ name ) : bool

Tries to open an existing mutex.

Opening a mutex creates an additional handle to it, keeping it alive until the process terminates.

Probe ( [ name ) : bool

Checks whether a specific mutex exists without openining a lasting handle.

Method Details

Close() public static méthode

Closes an existing mutex handle. The mutex is destroyed if this is the last handle.
This method is called on a platform other than Windows.
public static Close ( IntPtr handle ) : void
handle System.IntPtr The mutex handle to be closed.
Résultat void

Create() public static méthode

Creates or opens a mutex.
The mutex will automatically be released once the process terminates.
The native subsystem reported a problem. This method is called on a platform other than Windows.
public static Create ( [ name, IntPtr &handle ) : bool
name [ The name to be used as a mutex identifier.
handle System.IntPtr The handle created for the mutex. Can be used to close it before the process ends.
Résultat bool

Open() public static méthode

Tries to open an existing mutex.
Opening a mutex creates an additional handle to it, keeping it alive until the process terminates.
The native subsystem reported a problem. This method is called on a platform other than Windows.
public static Open ( [ name ) : bool
name [ The name to be used as a mutex identifier.
Résultat bool

Probe() public static méthode

Checks whether a specific mutex exists without openining a lasting handle.
The native subsystem reported a problem. This method is called on a platform other than Windows.
public static Probe ( [ name ) : bool
name [ The name to be used as a mutex identifier.
Résultat bool