This documentation is archived and is not being maintained.

importlib

Makes types that have already been compiled into another type library available to the type library being created.

[ importlib(
   tlb_file
) ];

Parameter

tlb_file
The name of a .tlb file that you want imported into the type library of the current project.

Attribute Context

Applies to Anywhere
Repeatable No
Required attributes None
Invalid attributes None

For more information, see Attribute Contexts.

Remarks

The importlib C++ attribute causes an importlib statement to be placed in the library block of the generated .idl file. The importlib attribute has the same functionality as the importlib MIDL attribute.

Example

The following code shows an example of how to use importlib:

// cpp_attr_ref_importlib.cpp
// compile with: /LD
[module(name="MyLib")];
[importlib(importlib.tlb)];

See Also

Compiler Attributes | Stand-Alone Attributes | import | importidl | include | includelib | Attributes Samples

Show: