Share via


Stand-Alone Attributes

 

The latest version of this topic can be found at Stand-Alone Attributes.

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.

Attribute Description
cpp_quote Emits the specified string, without the quote characters, into the generated header file.
custom Lets you define your own attribute.
db_command Creates an OLE DB command.
emitidl Determines whether all subsequent IDL attributes will be processed and placed in the generated .idl file.
idl_module Specifies an entry point in a DLL.
idl_quote Allows 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.
import Specifies another .idl, .odl, or .h file containing definitions you want to reference from your main .idl file.
importidl Inserts the specified .idl file into the generated .idl file
importlib Makes types that have already been compiled into another type library available to the type library being created.
include Specifies one or more header files to be included in the generated .idl file.
includelib Causes an .idl or .h file to be included in the generated .idl file.
library_block Places a construct inside the .idl file's library block.
module Defines the library block in the .idl file.
no_injected_text Prevents the compiler from injecting code as a result of attribute use.
pragma Emits the specified string, without the quote characters, into the generated .idl file.

See Also

Attributes by Usage