Attribute Macro intercom_attributes::com_class
source · [−]#[com_class]
Expand description
Defines a COM class that implements one or more COM interfaces.
ⓘ
#[com_class(CLSID, interfaces...)]
struct S { /* ... */ }
CLSID
- A unique ID of the exposed class. The clients use the class ID to specify the class when they want to construct an object. The value must be a valid GUID,AUTO_GUID
orNO_GUID
.interfaces
- Any number of interfaces that the class implements.
Associated types: struct
, enum
If the CLSID
is specified as NO_GUID
, the class cannot be constructed
by the clients. It can still be returned as a return value from other
intercom methods.