Bewerken

Share via


EventWaitHandleAcl.OpenExisting(String, EventWaitHandleRights) Method

Definition

Opens a specified named event wait handle, if it already exists, and applies the desired access rights.

public:
 static System::Threading::EventWaitHandle ^ OpenExisting(System::String ^ name, System::Security::AccessControl::EventWaitHandleRights rights);
public static System.Threading.EventWaitHandle OpenExisting (string name, System.Security.AccessControl.EventWaitHandleRights rights);
static member OpenExisting : string * System.Security.AccessControl.EventWaitHandleRights -> System.Threading.EventWaitHandle
Public Shared Function OpenExisting (name As String, rights As EventWaitHandleRights) As EventWaitHandle

Parameters

name
String

The name of the event wait handle to be opened. If it's prefixed by "Global", it refers to a machine-wide event wait handle. If it's prefixed by "Local", or doesn't have a prefix, it refers to a session-wide event wait handle. Both prefix and name are case-sensitive.

rights
EventWaitHandleRights

The desired access rights to apply to the returned event wait handle.

Returns

An existing named event wait handle.

Exceptions

name is null.

name is an empty string.

The named event wait handle does not exist or is invalid.

The path was not found.

A Win32 error occurred.

The named event wait handle exists, but the user does not have the security access required to use it.

Applies to