RpcServerTestCancel function (rpcdce.h)
The server calls RpcServerTestCancel to test for client cancel requests.
Syntax
RPC_STATUS RpcServerTestCancel(
RPC_BINDING_HANDLE BindingHandle
);
Parameters
BindingHandle
Call to test for cancel commands. If a value of zero is specified, the server impersonates the client that is being served by this server thread.
Return value
Value | Meaning |
---|---|
|
The call was canceled by the client. The server must still complete or abort the call. |
|
There is no active call on the current thread. |
|
The call was not canceled. |
|
The handle is not valid. |
Remarks
The server calls RpcServerTestCancel to find out if the client has requested cancelation of an outstanding call. The RpcServerTestCancel function only indicates whether a client has canceled the call; state is not changed on the server or client. The canceled call must still be completed or aborted by the RPC server, using RpcAsyncCompleteCall or RpcAsyncAbortCall function calls, respectively.
The BindingHandle 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 the RpcServerTestCancel(RpcAsyncGetCallHandle(pAsync)) function to test for a cancel message using the asynchronous handle to obtain the binding handle.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 2000 Professional [desktop apps only] |
Minimum supported server | Windows 2000 Server [desktop apps only] |
Target Platform | Windows |
Header | rpcdce.h (include Rpc.h) |
Library | Rpcrt4.lib |
DLL | Rpcrt4.dll |