RpcServerTestCancel

The server calls RpcServerTestCancel to test for client cancel requests.

#include <rpc.h>

RPC_STATUS RPC_ENTRY RpcServerTestCancel(

    RPC_BINDING_HANDLE  BindingHandle

   );

Parameters

BindingHandle
Specifies the thread on which to test for cancels.

Return Values

Value Meaning
RPC_S_OK The call was canceled.
RPC_S_NO_CALL_ACTIVE There is no active call on the current thread.
RPC_S_CALL_IN_PROGRESS The call was not canceled.
RPC_S_INVALID_BINDING The handle is not valid.

Remarks

The server calls RpcServerTestCancel to find out if the client has requested cancellation of an outstanding call. The Binding Handle parameter specifies the call on which to test. If the parameter has a value of zero, the call on the current thread is tested. The server can call RpcServerTestCancel(RpcAsyncGetCallHandle(pAsync)) to test for cancels using the asynchronous handle to obtain the binding handle.

See Also

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