Understanding IDL
In its most basic COM form, an IDL file is pretty straightforward. A representative file is shown in Figure 1.
An IDL file is specific to a COM server, which is an EXE or DLL. There can be one or many COM classes (declared as CoClass) in a server. These, and the interfaces they use, would be declared in the IDL file for this server as in Figure 1. Ultimately, an IDL file is compiled using MIDL.EXE. C++ proxy/stub header files and a TLB file type library are the result. TLB files are often included in the resources of the DLL of EXE of the server.
There are a few tools available for use with IDL. Visual C++ ships with a tool called an "OLE-COM Object Viewer." You can use this tool to examine type libraries currently registered on your system (or standalone TLB files). The tool will reverse engineer the IDL file for you to examine. This is a very useful tool for debugging, and irreplaceable for figuring out the proper structure of method calls when you have incomplete, outdated, or just plain bad documentation for a COM server.