RtMutex.OpenExisting Method

Opens an existing named mutex.

Namespace:  IntervalZero.MaxRT.wRTOS.RtApi.Threading
Assembly:  IntervalZero.MaxRT.wRTOS (in IntervalZero.MaxRT.wRTOS.dll) Version: 1.0.0.0 (File version: 1.0.1)

Syntax

Copy
public static RtMutex OpenExisting(
    string name
)

Parameters

name

Type: System.String
The name of a system-wide named mutex object.

Return Value

Type: RtMutex
A RtMutex object that represents a named system mutex.

Exceptions

Exception Condition

ArgumentException

Name is a zero-length string. -or- name is longer than 260 characters.

ArgumentNullException

Name is a null reference (Nothing in Visual Basic).

WaitHandleCannotBeOpenedException

The named mutex does not exist.

Remarks

The OpenExisting method attempts to open an existing named mutex. If the system mutex does not exist, this method throws an exception instead of creating the system object. Two calls to this method with the same value for name do not necessarily return the same RtMutex object, even though they represent the same named system mutex.

See Also: