// Thread call was rejected, so try again.
            int IOleMessageFilter.RetryRejectedCall(IntPtr hTaskCallee, int dwTickCount, SERVERCALL dwRejectType)
            {
                if (dwTickCount < MaxRetryMilliseconds
                    && dwRejectType == SERVERCALL.SERVERCALL_RETRYLATER)
                {
                    // Retry after a short 100ms sleep or immediately depending on how long we've been waiting.
                    return dwTickCount < QuickRetryMilliseconds ? FlagRetryImmediately : FlagSleepThenRetry;
                }

                // Too busy; cancel call.
                return FlagCancel;
            }
Пример #2
0
            // Thread call was rejected, so try again.
            int IOleMessageFilter.RetryRejectedCall(IntPtr hTaskCallee, int dwTickCount, SERVERCALL dwRejectType)
            {
                if (dwTickCount < MaxRetryMilliseconds &&
                    dwRejectType == SERVERCALL.SERVERCALL_RETRYLATER)
                {
                    // Retry after a short 100ms sleep or immediately depending on how long we've been waiting.
                    return(dwTickCount < QuickRetryMilliseconds ? FlagRetryImmediately : FlagSleepThenRetry);
                }

                // Too busy; cancel call.
                return(FlagCancel);
            }