C# Класс NanoByte.Common.Native.WindowsMutex

Provides Windows-specific API calls for cross-process Mutexes.
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Описание методов

Close() публичный статический Метод

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.
Результат void

Create() публичный статический Метод

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.
Результат bool

Open() публичный статический Метод

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.
Результат bool

Probe() публичный статический Метод

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.
Результат bool