Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

include (C++)

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)];
Attribute Context

Applies to

Anywhere

Repeatable

No

Required attributes

None

Invalid attributes

None

For more information, see Attribute Contexts.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.