Upravit

Sdílet prostřednictvím


default attribute

The [default] attribute Indicates that the interface or dispinterface, defined within a coclass, represents the default programmability interface. This attribute is intended for use by macro languages.

[
    uuid(uuid-number) 
    [, attribute-list]
] 
coclass coclass-name
{
    [ default [, optional-interface-attribute] ]; 
    interface | dispinterface interface-name;
}

Parameters

uuid-number

Specifies a universally unique identification number for the coclass.

attribute-list

Specifies additional coclass attributes. Separate multiple attributes with commas.

coclass-name

Specifies the name by which other software components can reference this coclass.

optional-interface-attribute

The [source] attribute, which specifies that an interface or dispinterface is outgoing, is the only other attribute that can be used here.

interface-name

Specifies the name of the interface.

Remarks

A coclass may have at most two [default] members. One represents the outgoing (source) interface or dispinterface, and the other represents the incoming (sink) interface or dispinterface. If the [default] attribute is not specified for any member of the coclass or cotype, the first outgoing and incoming members that do not have the [restricted] attribute are treated as the defaults.

Flags

IMPLTYPEFLAG_FDEFAULT

Examples

[ 
    uuid(12345678-1234-1234-1234-123456789ABC), 
    helpstring("Hello Class"),appobject
]  
coclass Hello
{
    [default] interface IHello:IUnknown;
    interface IDispatch;
};

See also

coclass

TYPEFLAGS

ODL File Syntax

ODL File Example

Generating a Type Library With MIDL

restricted

source