Partager via


COleMessageFilter::SetRetryReply

Determines the calling application's action when it receives a busy response from a called application.

void SetRetryReply( 
   DWORD nRetryReply = 0  
);

Parameters

  • nRetryReply
    Number of milliseconds between retries.

Remarks

When a called application indicates that it is busy, the calling application may decide to wait until the server is no longer busy, to retry right away, or to retry after a specified interval. It may also decide to cancel the call altogether.

The caller's response is controlled by the functions SetRetryReply and SetMessagePendingDelay. SetRetryReply determines how long the calling application should wait between retries for a given call. SetMessagePendingDelay determines how long the calling application waits for a response from the server before taking further action.

Usually the defaults are acceptable and do not need to be changed. The framework retries the call every nRetryReply milliseconds until the call goes through or the message-pending delay has expired. A value of 0 for nRetryReply specifies an immediate retry, and – 1 specifies cancellation of the call.

When the message-pending delay has expired, the OLE "busy dialog box" (see COleBusyDialog) is displayed so that the user can choose to cancel or retry the call. Call EnableBusyDialog to enable or disable this dialog box.

When a keyboard or mouse message is pending during a call and the call has timed out (exceeded the message-pending delay), the "not responding" dialog box is displayed. Call EnableNotRespondingDialog to enable or disable this dialog box. Usually this state of affairs indicates that something has gone wrong and the user is getting impatient.

When the dialogs are disabled, the current "retry reply" is always used for calls to busy applications.

Requirements

Header: afxole.h

See Also

Reference

COleMessageFilter Class

Hierarchy Chart

COleBusyDialog Class

COleMessageFilter::EnableNotRespondingDialog

COleMessageFilter::EnableBusyDialog

COleMessageFilter::SetMessagePendingDelay