While it is often possible to use the #include directive to include header files in your IDL file, it is not recommended that you do so. 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, your IDL file may not compile. There are two ways to include typedefs from header files in your IDL file:
//in helper.IDL:
interface dummy
{ #include "kitchensink.h"
#include "system.h"
}
//in main.IDL:
import "helper.IDL";