importlib

library (library-name){ importlib(file-to-import); . . . }

file-to-import
The name and location of the imported file at MIDL compile-time.

Example

library BrowseHelper 
{ 
    importlib("stdole32.tlb"); 
    importlib("mydisp.tlb"); 
//remainder of library definition 
}; 
 

Remarks

The importlib directive makes types that have already been compiled into another type library available to the type library being created. All importlib directives must precede the other type descriptions in the library. Note that the imported library, as well as the generated library, must be distributed with the application so that it is available at run time.

In most cases you should use the MIDL import directive to reference definitions from another .IDL file in your .IDL file. This method provides your type library with all the information from the original file, whereas importlib only brings in the contents of the type library.

Note  The importlib directive makes any type defined in the imported library accessible from within the library being compiled. To avoid ambiguity when there are duplicate references, we recommend that you qualify each such reference with the appropriate library name, as follows:

library_name.type
 

In the absence of such qualification, MIDL resolves duplicate reference ambiguity as follows:

See Also

library, import, Importing System Header Files, Importing Files and Type Libraries, ODL File Syntax, ODL File Example, Generating a Type Library With MIDL