Overview
Chapter 22 you should know what an interface is. You've already seen two standard COM interfaces: IUnknown and IClassFactory. Now you're ready for "applied" COM, or at least one aspect of it—integrating with other applications via Automation (formerly known as OLE Automation). You'll learn about the COM IDispatch interface, which enables C++ programs to communicate with Microsoft Visual Basic for Applications (VBA) programs and with programs written in other scripting languages. In addition, IDispatch is the key to getting your COM object onto a Web page. You'll use the MFC library implementation of IDispatch to write C++ Automation component and client programs. We'll also explore both out-of-process components and in-process components.But before we jump into C++ Automation programming, you need to know how the rest of the world writes programs. In this chapter, you'll get some exposure to VBA as it is implemented in Microsoft Excel. You'll run your C++ components from Excel, and you'll run Excel from a C++ client program.