defaultbind

[interface-attribute-list] interface | dispinterface interface-name
{
[bindable
, defaultbind[, attribute-list]] returntype function-name(params)
}

Example

[uuid(. . .)] interface MyObject : IUnknown
{
    properties:
    methods:
        [id(1), propget, bindable, defaultbind, displaybind] 
        long Size(void);

        [id(1), propput, bindable, defaultbind, displaybind] 
        HRESULT Size([in]long lSize);
}
 

Remarks

The defaultbind attribute indicates the single, bindable property that best represents the object. Properties that have the defaultbind attribute must also have the bindable attribute. Only one property in an interface or dispinterface can have the defaultbind attribute.

This attribute is used by containers that have a user model involving binding to an object rather than binding to a property of an object. An object can support data binding but not have this attribute.

Flags

FUNCFLAG_FDEFAULTBIND, VARFLAG_FDEFAULTBIND

See Also

TYPEFLAGS, ODL File Syntax, ODL File Example, Generating a Type Library With MIDL