| title | include (C++) | Microsoft Docs | |
|---|---|---|
| ms.custom | ||
| ms.date | 11/04/2016 | |
| ms.reviewer | ||
| ms.suite | ||
| ms.technology |
|
|
| ms.tgt_pltfrm | ||
| ms.topic | language-reference | |
| f1_keywords |
|
|
| dev_langs |
|
|
| helpviewer_keywords |
|
|
| ms.assetid | d23f8b91-fe5b-48fa-9371-8bd73af7b8e3 | |
| caps.latest.revision | 10 | |
| author | mikeblome | |
| ms.author | mblome | |
| manager | ghogen |
Specifies one or more header files to be included in the generated .idl file.
[ include(
header_file
) ];
header_file
The name of a file that you want included in the generated .idl file.
The include C++ attribute causes an #include statement to be placed below the import "docobj.idl" statement in the generated .idl file.
The include C++ attribute has the same functionality as the include MIDL attribute.
The following code shows an example of how to use include. For this example, the file include.h contains only a #include statement.
// cpp_attr_ref_include.cpp
// compile with: /LD
[module(name="MyLib")];
[include(cpp_attr_ref_include.h)];
| Applies to | Anywhere |
| Repeatable | No |
| Required attributes | None |
| Invalid attributes | None |
For more information, see Attribute Contexts.
IDL Attributes
Stand-Alone Attributes
import
importidl
includelib
importlib