INtime SDK Help
OpenEvent, RtOpenEvent (iwin32)
INtime SDK v7 > About INtime > Alternate APIs > iwin32 API > iwin32 API > OpenEvent, RtOpenEvent (iwin32)

Searches for an existing event with the given name and returns its handle.

HANDLE OpenEvent(
    DWORD dwDesiredAccess,
    BOOLEAN bInheritHandle,
    LPCTSTR lpName
);

HANDLE RtOpenEvent(
    DWORD dwDesiredAccess,
    BOOLEAN bInheritHandle,
    LPCTSTR lpName
);

Parameters

dwDesiredAccess
Ignored.
bInheritHandle
Ignored.
lpName
Pointer to a null-terminated string that names the event to open. Name comparisons are case-sensitive.

Remarks

RtOpenEvent can also be used from a Windows application to obtain the handle of an iwin32 event.

OpenEvent enables multiple processes to open handles of the same event object. The function succeeds only if some process has already created the event using CreateEvent. The calling process can use the returned handle in any function that requires a handle to an event object.

To close the handle, use CloseHandle. When the process terminates, the system automatically closes the handle. When the last handle closes, the event object is destroyed.

Return Values

A handle to the event object
Success.
NULL
Failure. For extended error information, see GetLastError.

Requirements

Versions Defined in Include Link to
INtime 3.0 intime/rt/include/iwin32.h
intime/rt/include/winbase.h
iwin32.h
windows.h
iwin32.lib

Notes

See Also

CloseHandle, CreateEvent, PulseEvent, ResetEvent, SetEvent, iwin32 API, iwin32 Overview