Compiler COM Support

The Visual C++ compiler has built-in classes and extensions that you can use instead of ATL. These classes allow you to use COM interfaces more easily, hiding most of the COM-related details and making your C++ code almost as easy to write as Visual Basic code.

The #import directive essentially converts the contents of a type library into C++ classes which describe the COM interface. The file types that can be used with #import are as follow:

• a type library (.TLB or .ODL) file

• an executable (.EXE) file

• a library (.DLL) file containing a type library resource (such as .OCX)

• a compound document holding a type library

• any other file format that can be understood by the LoadTypeLib API

For a basic explanation of COM/Compiler COM Support and how to use it, see http://msdn.microsoft.com/library/en-us/dnguion/html/msdn_drguion020298.asp.

| MainWin version 3.4 doesn’t support compiling with #import, which means that you need to use MainWin 4.0 or higher to use #import on Linux.

| If you wanted, you could also use pure COM to interact with the XSI SDK; however, ATL and Compiler COM Support already provide a lot of the groundwork.