2.8.5 Background Processing

A client application may use a modified message loop in which it detects idle time (no messages to process) and performs a step of background processing before checking for new messages. As described Chapter 5, "Implementing OLE into Client Applications," the OLE DLLs require a client application to enter a separate message loop during an asynchronous operation and wait until an object (or all objects) is released. This message loop is necessary to process DDE messages between OLESVR.DLL and OLECLI.DLL.

Like any other message loop, there may be idle time during this OLE wait loop during which the application can perform some background task. By isolating the code needed to execute a step of this task, you can call it from any message loop in the application with the same results.