3.3.4.1 EcDoAsyncWaitEx Method (Opnum 0)

The EcDoAsyncWaitEx method is an asynchronous call that the server does not complete until events are pending on the Session Context, up to a 5-minute duration of no client activity. If no events are available within 5 minutes of the time that the client last accessed the server<36> through a call to the EcDoRpcExt2 method, as specified in section 3.1.4.2, the server returns the call and does not set the NotificationPending flag in the pulFlagsOut parameter. If an event is pending, the server completes the call immediately and returns the NotificationPending flag in the pulFlagsOut parameter. This call requires an active asynchronous context handle to be returned from the EcDoAsyncConnectEx method on the EMSMDB interface, as specified in section 3.1.4.1. The asynchronous context handle is associated with the Session Context.

This method is part of notification handling. For more information about notifications, see [MS-OXCNOTIF].

 long __stdcall EcDoAsyncWaitEx(
      [in] ACXH acxh,
      [in] unsigned long ulFlagsIn,
      [out] unsigned long *pulFlagsOut
 );

acxh: An asynchronous context handle. On input, the client MUST pass a valid asynchronous context handle that was created by calling the EcDoAsyncConnectEx method on the EMSMDB interface. The server uses the asynchronous context handle to identify the Session Context to use for this call. If the asynchronous context handle is not valid, the server successfully completes the call, setting the NotificationPending flag in the pulFlagsOut parameter.

ulFlagsIn: Unused. Reserved for future use. Client MUST pass a value of 0x00000000.

pulFlagsOut: The output flags for the client. Flag values are specified in the following table.

Flag name

Value

Description

NotificationPending

0x00000001

Signals that events are pending for the client on the Session Context on the server. The client MUST call the EcDoRpcExt2 method (with additional data in the ROP request buffer if there is additional data to send to the server, or with an empty ROP request buffer if there is no additional data to send to the server). The server will return the event details in the ROP response buffer.

Return Values: If the method succeeds, the return value is 0. If the method fails, the return value is an implementation-specific error code or one of the protocol-defined error codes listed in the following table.

Error code name

Value

Meaning

Rejected

0x000007EE

An EcDoAsyncWaitEx method call is already outstanding on this asynchronous context handle.<37>

Exiting

0x000003ED

The server is shutting down.

Exceptions Thrown: No exceptions are thrown beyond those thrown by the underlying RPC protocol as specified in [MS-RPCE].