CeEventRead (Compact 7)
3/12/2014
This function obtains event data from a ring buffer.
Syntax
EXTERN_C
ULONG
EVNTAPI
CeEventRead(
_in HANDLE hSubscription,
_out PEVENT_DESCRIPTOR pEventDescriptor,
_out_ecount_opt(cUserData) PEVENT_DATA_DESCRIPTOR pUserData,
_in ULONG cUserData,
_out_opt ULONG* pcUserData
);
Parameters
- hSubscription
[in] Handle to a subscription.
- pEventDescriptor
[out] Pointer to an EVENT_DESCRIPTOR structure.
- pUserData
[in] Pointer to user data.
- cUserData
[in] The number of bytes in pUserData so that the buffer can be verified by the kernel.
- pcUserData
[out] The number of bytes returned.
Return Value
A valid pointer to an EVENT_DESCRIPTOR indicates success. ERROR_INVALID_EVENT_COUNT indicates that an event matching the subscriber’s keyword and level mask was overwritten in the circular buffer before the subscriber read it.
Remarks
When the returned handle from the CeEventSubscribe function is signaled that there is an event qualifying for the subscriber, the subscriber calls this function. The PEVENT_DESCRIPTOR pointer is always returned, but the user’s event data in pUserData may not be.
A user can call this function with a pUserData set to NULL. In this case, the size of the data is returned in pcUserData.
A user can call this function with a valid pUserData. If the buffer is too small for all the data, ERROR_INSUFFICIENET_BUFFER is returned and the size of the data is returned in pcUserData. If the buffer is large enough for the data, NO_ERROR is returned, and pcUserData returns the size of the buffer used.
Requirements
Header |
EvntCons.h |
Library |
filesys.dll |