RtOpenEvent

RtOpenEvent returns a handle of an existing named event object.

Syntax

HANDLE RtOpenEvent(
    DWORD DesiredAccess,
    BOOL bInheritHandle,
    LPCTSTR lpName
);

Parameters

DesiredAccess

Ignored. The access to the event object.

bInheritHandle

Ignored. If this value is TRUE, processes created by this process will inherit the handle. Otherwise, the processes do not inherit this handle.

lpName

A pointer to a null-terminated string that names the event to be opened. Name comparisons are case-sensitive.

Return Values

A handle to the event object if the function succeeds, a NULL value if the function fails

To get extended error information, call GetLastError.

Remarks

RtOpenEvent enables multiple processes to open handles of the same event object. The function succeeds only if some process has already created the event by using RtCreateEvent. The calling process can use the returned handle in any function that requires a handle of an event object, such as a wait function.

Use RtCloseHandle to close the handle. The system closes the handle automatically when the process terminates. The event object is destroyed when its last handle has been closed.

Requirements

Header Rtapi.h
Library rtapi_w32.lib (Windows), Rtx_Rtss.lib (RTSS)

See Also:

RtCloseHandle

RtCreateEvent

RtPulseEvent

RtResetEvent

RtSetEvent

IntervalZero.com | Support | Give Feedback