Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

RpcAsyncAbortCall function

The server calls RpcAsyncAbortCall to abort an asynchronous call.

Syntax


RPC_STATUS  RPC_ENTRY RpcAsyncAbortCall(
  PRPC_ASYNC_STATE pAsync,
  unsigned long ExceptionCode
);

Parameters

pAsync

Pointer to the RPC_ASYNC_STATE structure that contains asynchronous call information.

ExceptionCode

A nonzero application-specific exception code. Can be an application-defined error code, or a standard RPC error code. For more information, see RPC Return Values.

Return value

ValueMeaning
RPC_S_OK

Call cancelation successful.

RPC_S_INVALID_ASYNC_HANDLE

Asynchronous handle is invalid.

 

Note  For a list of valid error codes, see RPC Return Values.

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.

When an asynchronous call is aborted with RpcAsyncAbortCall, no marshaling of the output arguments is performed, and all input arguments are freed by RPC. When RpcAsyncAbortCall is called, a call to the RpcAsyncCompleteCall function is not necessary. The RpcAsyncAbortCall function should be called only once for any asynchronous call; a second call may crash the process or fail in other unexpected ways.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

Rpcasync.h (include Rpc.h)

Library

Rpcrt4.lib

DLL

Rpcrt4.dll

See also

Asynchronous RPC
RPC_ASYNC_STATE
RpcAsyncCancelCall
RpcAsyncCompleteCall
RpcAsyncGetCallHandle
RpcAsyncGetCallStatus
RpcAsyncInitializeHandle
RpcServerTestCancel

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.