3.1.4.2.2 RpcNetEventReceiveData (Opnum 1)

The RpcNetEventReceiveData method retrieves a buffer with one or more NET_EVENT_DATA_HEADER structures, followed by the event payload. The size of the buffer is determined by the server.

 DWORD RpcNetEventReceiveData (
   [in] PSESSION_HANDLE SessionHandle,
   [out] EVENT_BUFFER* EventBuffer
 );

SessionHandle:  Contains an RPC context handle (as specified in section 2.2.1.1) returned by the RpcNetEventOpenSession (section 3.1.4.2.1) method.

EventBuffer: An out parameter that receives an EVENT_BUFFER (section 2.2.2.1).

Return Values: The method MUST return ERROR_SUCCESS (0x00000000) on success or a nonzero Win32 error code value if an error occurred. All error values MUST be treated the same.

The opnum field value for this method is 1.

When processing this call, the server MUST do the following:

  • When the RpcNetEventReceiveData method is called, the server MUST first check its Session Table for an event session object where the Session Handle matches the value supplied in the SessionHandle member, and if a match cannot be found, fail the call.

  • When a match can be found, if the Outstanding RpcNetEventReceiveData Call of the event session is not empty, the server MUST fail this call to RpcNetEventReceiveData.

  • When the Outstanding RpcNetEventReceiveData Call of the event session is empty, the server MUST determine, in any implementation-specific manner, an appropriate number of events to return. If enough events are already in the Queued Event List, the events MUST be removed from the list and returned in the EventBuffer member.  If the Lost Event Count is nonzero, the server MUST also include a NET_EVENT_LOST structure (section 2.3.2.3) at the end of the EventBuffer.

  • When the Outstanding RpcNetEventReceiveData Call of the event session is not empty, the server MUST store the pending call in the Outstanding RpcNetEventReceiveData Call of the event session to be completed later when enough events are collected in the Queued Event List or the Data Completion Timer expires.

Exceptions Thrown: Exceptions SHOULD NOT be thrown beyond those thrown by the underlying RPC protocol specified in [MS-RPCE].