Importing System Header Files

While it is often possible to use the #include directive to include header files in your IDL file, it is not recommended. The MIDL compiler will generate stubs for all functions defined in the IDL file being compiled. Usually a header file contains a number of prototypes that you neither need nor want to include in your stub files, and a #include effectively puts all those definitions into your main IDL file. Furthermore, if there are nonremotable types defined in the header file, the IDL file may not compile.

There are two ways to include type definitions from header files in an IDL file: