Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

This client-based method gives the application an opportunity to display a dialog box so the user can retry or cancel the call, or switch to the task identified by threadIDCallee.

Syntax

DWORD RetryRejectedCall(
  HTASK 
threadIDCallee,
  DWORD 
dwTickCount,
  DWORD 
dwRejectType 
);

Parameters

threadIDCallee

[in] Handle of the server task that rejected the call.

dwTickCount

[in] Number of elapsed ticks since the call was made.

dwRejectType

[in] Specifies either SERVERCALL_REJECTED or SERVERCALL_RETRYLATER, as returned by the object application.

Return Value

-1

The call should be canceled. COM then returns RPC_E_CALL_REJECTED from the original method call.

Value >= 0 and <100

The call is to be retried immediately.

Value >= 100

COM will wait for this many milliseconds and then retry the call.

Remarks

COM calls RetryRejectedCallon the caller's IMessageFilterimmediately after receiving SERVERCALL_RETRYLATER or SERVERCALL_REJECTED from the IMessageFilter::HandleInComingCallmethod on the callee's IMessageFilter.

If a called task rejects a call, the application is probably in a state where it cannot handle such calls, possibly only temporarily. When this occurs, COM returns to the caller and issues IMessageFilter::RetryRejectedCallto determine if it should retry the rejected call.

Applications should silently retry calls that have returned with SERVERCALL_RETRYLATER.

If, after a reasonable amount of time has passed, about 30 seconds, the application should display the busy dialog box; a standard implementation of this dialog box is available in the OLEDLG library.

The callee can momentarily be in a state where calls can be handled.

The option to wait and retry is provided for special kinds of calling applications, such as background tasks executing macros or scripts, so they can retry the calls in a nonintrusive way.

If, after a dialog box is displayed, the user chooses to cancel, RetryRejectedCallreturns -1 and the call will appear to fail with RPC_E_CALL_REJECTED.

If a client implements IMessageFilterand calls a server method on a remote machine, RetryRejectedCallwill not be called.

To determine whether the platform supports this interface, see Determining Supported COM APIs.

Requirements

Header objidl.h, objidl.idl
Library ole32.lib, uuid.lib
Windows Embedded CE Windows CE 3.0 and later
Windows Mobile Windows Mobile Version 5.0 and later