Stand-Alone Attributes

 

For the latest documentation on Visual Studio 2017 RC, see Visual Studio 2017 RC Documentation.

A stand-alone attribute does not operate on a C++ keyword but is more like a line of code. Stand-alone attribute statements require a semicolon at the end of the line.

AttributeDescription
cpp_quoteEmits the specified string, without the quote characters, into the generated header file.
customLets you define your own attribute.
db_commandCreates an OLE DB command.
emitidlDetermines whether all subsequent IDL attributes will be processed and placed in the generated .idl file.
idl_moduleSpecifies an entry point in a DLL.
idl_quoteAllows you to use IDL constructs that are not supported in the current version of Visual C++ and have them pass through to the generated .idl file.
importSpecifies another .idl, .odl, or .h file containing definitions you want to reference from your main .idl file.
importidlInserts the specified .idl file into the generated .idl file
importlibMakes types that have already been compiled into another type library available to the type library being created.
includeSpecifies one or more header files to be included in the generated .idl file.
includelibCauses an .idl or .h file to be included in the generated .idl file.
library_blockPlaces a construct inside the .idl file's library block.
moduleDefines the library block in the .idl file.
no_injected_textPrevents the compiler from injecting code as a result of attribute use.
pragmaEmits the specified string, without the quote characters, into the generated .idl file.

Attributes by Usage

Show: