RpcAsyncAbortCall

The server calls RpcAsyncAbortCall to abort an asynchronous call.

RPC_STATUS  RPC_ENTRY RpcAsyncAbortCall(
PRPC_ASYNC_STATE pAsync, 
unsigned long ExceptionCode
) ;
pAsync
Pointer to the RPC_ASYNC_STATE structure that contains asynchronous call information.
ExceptionCode
An application-specific exception code.

Return Values

Value Meaning
RPC_S_OK Call was canceled successfully.
RPC_S_INVALID_ASYNC_HANDLE The asynchronous handle is invalid.

Remarks

The server calls RpcAsyncAbortCall when circumstances require it to abort an asynchronous call before completion. For example, the caller may not have the necessary permissions to make the request, or the server may be too busy to process the call. Use the ExceptionCode parameter to specify the reason for the abort. The run-time environment propagates the exception code to the client as a fault.

See Also

Asynchronous RPC, RPC_ASYNC_STATE, RpcAsyncCancelCall, RpcAsyncCompleteCall, RpcAsyncGetCallHandle, RpcAsyncGetCallStatus, RpcAsyncInitializeHandle, RpcAsyncRegisterInfo, RpcServerTestCancel