Export (0) Print
Expand All

ICancelMethodCalls::Cancel method

Requests that a method call be canceled.

Syntax


HRESULT Cancel(
  [in]  ULONG ulSeconds
);

Parameters

ulSeconds [in]

The number of seconds to wait for the server to complete the outbound call after the client requests cancellation.

Return value

This method can return one of these values.

Return codeDescription
S_OK

The cancellation request was made.

RPC_S_CALL_CANCELED

The call was already canceled.

CO_E_CANCEL_DISABLED

Call cancellation is not enabled on the thread that is processing the call.

RPC_E_CALL_COMPLETE

The call was completed during the timeout interval.

 

Remarks

The Cancel method only issues a cancel request. A return value of S_OK does not mean that the call was canceled, only that an attempt was made to cancel the call. The behavior of the cancel object on receiving a cancel request is entirely at the discretion of the implementer.

If a method that returns an HRESULT is canceled, the return value will be RPC_S_CALL_CANCELED.

Requirements

Minimum supported client

Windows 2000 Professional [desktop apps only]

Minimum supported server

Windows 2000 Server [desktop apps only]

Header

ObjIdl.h

IDL

ObjIdl.Idl

IID

IID_ICancelMethodCalls is defined as 00000029-0000-0000-C000-000000000046

See also

ICancelMethodCalls

 

 

Community Additions

ADD
Show:
© 2014 Microsoft