Implementing Concurrency Management and the Busy Dialog Box

In the previous section, I mentioned some additions to the EKoala3 sample to support concurrency management—a few menu items, the implementation of the IPersist interface, and a message filter—all of which allow you to see what happens when a server blocks or delays incoming calls.

In talking about concurrency management, keep in mind that the IMessageFilter::HandleInComingCall function is used only for a process that receives external calls, while the other members, RetryRejectedCall and MessagePending, are expressly for a process that makes calls into a remote object. For this reason, EKoala3's message filter implements only HandleInComingCall. To demonstrate the other two functions, we'll use a modification of the ObjectUser sample—ObjectUser2—which installs its own message filter to display the busy dialog box at the appropriate times.

In this section, we'll first look at the EKoala3 modifications that allow us to simulate a blocked server or a delayed call. Then we'll take a brief look at the OLE UI library, which provides the standard implementation of the busy dialog box. We'll then see ObjectUser2 and how it employs this dialog box to tell the end user when the server is not responding to calls.