| description | Learn more about: includelib (C++) | |
|---|---|---|
| title | includelib (C++ COM Attribute) | |
| ms.date | 10/02/2018 | |
| f1_keywords |
|
|
| helpviewer_keywords |
|
|
| ms.assetid | cd90ea6e-5ae8-4f11-b8d1-662db95412b2 |
Causes an .idl or .h file to be included in the generated .idl file.
[ includelib(name.idl) ];name.idl
The name of the .idl file that you want included as part of the generated .idl file.
The includelib C++ attribute causes an .idl or .h file to be included in the generated .idl file, after the importlib statement.
The following code is shown in a .cpp file:
// cpp_attr_ref_includelib.cpp
// compile with: /LD
[module(name="MyLib")];
[includelib("includelib.idl")];| Attribute context | Value |
|---|---|
| Applies to | Anywhere |
| Repeatable | Yes |
| Required attributes | None |
| Invalid attributes | None |
For more information, see Attribute Contexts.
IDL Attributes
Stand-Alone Attributes
import
importidl
include
importlib