Interface Attributes
The following attributes apply to the interface (or __interface) C++ keyword.
Attribute |
Description |
---|---|
Specifies the UUID that directs the MIDL compiler to define both synchronous and asynchronous versions of a COM interface. |
|
Lets you define your own attributes. |
|
Places an interface in the .idl file as a dispatch interface. |
|
Places an interface in the .idl file as a dual interface. |
|
Causes a data structure to be placed in the .idl file. |
|
Specifies a context ID that lets the user view information about this element in the Help file. |
|
Sets the name of the Help file for a type library. |
|
Specifies a character string that is used to describe the element to which it applies. |
|
Specifies the ID of a help topic in an .hlp or .chm file. |
|
Specifies the name of the DLL to use to perform document string lookup (localization). |
|
Indicates that the item exists but should not be displayed in a user-oriented browser. |
|
Places a construct inside the .idl file's library block. |
|
Allows you to use the MIDL compiler as a header generator when used in the interface header. When used in an individual function, designates a local procedure for which no stubs are generated. |
|
Specifies that the IDispatch implementation includes only the properties and methods listed in the interface description and cannot be extended with additional members at run time. This attribute is only valid on a dual interface. |
|
Identifies an interface as an Object Description Language (ODL) interface. |
|
Identifies a custom interface. |
|
Indicates that an interface is compatible with Automation. |
|
Specifies the default pointer attribute for all pointers except top-level pointers that appear in parameter lists. |
|
Designates a pointer as a full pointer. |
|
Designates which members of the library cannot be called arbitrarily. |
|
Provides the unique ID for the library |
You must observe these rules for defining an interface:
Default calling convention is __stdcall.
A GUID is supplied for you if you do not supply one.
No overloaded methods are allowed.
When not specifying the uuid attribute and using the same interface name in different attribute projects, the same GUID is generated.