Compiler Attributes

 

The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.

Compiler attributes provide a variety of functionality.

AttributeDescription
emitidlDetermines whether all subsequent IDL attributes will be processed and placed in the generated .idl file.
event_receiverCreates an event receiver.
event_sourceCreates an event source.
exportCauses a data structure to be placed in the .idl file.
implementsSpecifies dispatch interfaces that are forced to be members of the IDL coclass.
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.
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.
no_injected_textPrevents the compiler from injecting code as a result of attribute use.
satypeSpecifies the data type of the SAFEARRAY.
versionIdentifies a particular version among multiple versions of an interface or class.

Attributes by Group

Show: