|
RtkCreateEvent creates an RTSS event. A handle is returned to the newly created event.
Syntax
HANDLE RtkCreateEvent( RTSSINST RtssInst, PULONG pErrorCode, LPSECURITY_ATTRIBUTES pSecurity, BOOL bManualReset, BOOL InitialState, PUNICODE_STRING lpName );
Parameters
RtssInst
An RTSSINST value returned from a call to RtkRtssAttach.
pErrorCode
A pointer to a location where additional error information may be returned. This location need not be defined; the user may pass a NULL value. If defined, this location is set to NULL if no error occurred.
pSecurity (ignored)
A pointer to a SECURITY_ATTRIBUTES structure.
bManualReset, bInitialState, lpName
A pointer to a PUNICODE_STRING specifying the name of the event object. The name is limited to RTX_MAX_PATH characters and can contain any character except the backslash path-separator character (\). Name comparison is case-sensitive.
Return Values
A handle to the event object if the function succeeds
NOTE: If the named event object existed before the function call, pErrorCode is set to ERROR_ALREADY_EXISTS.
NULL if the function fails
Remarks
The handle returned by RtkCreateEvent has EVENT_ALL_ACCESS access to the new event object and can be used in any function that requires a handle to a event object.
Any thread of the calling process can specify the event-object handle in a call to RtkWaitForSingleObject. This wait function returns when the state of the specified object is signaled.
Multiple processes can have handles of the same event object, enabling use of the object for process synchronization. The available object-sharing mechanism is: A process can specify the name of a event object in a call to RtkOpenEvent or RtkCreateEvent.
RtkCloseHandle closes an event-object 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 | Rtkapi.h |
Library | rtx_rtk.lib |
See Also: