Export (0) Print
Expand All
COM
id
in
int
odl
out
ptr
ref
Expand Minimize

licensed attribute

The [licensed] attribute indicates that the coclass to which it applies is licensed, and must be instantiated using IClassFactory2.


[
    licensed
    [ , attribute-list ] 
]
coclass classname 
{
  coclass-definition
};

Parameters

attribute-list

Specifies zero or more attributes that apply to the coclass statement. Allowable coclass attributes are [helpstring], [helpcontext], [licensed], [version], [control], and [hidden].

classname

Specifies the name by which the component object is known in the type library.

coclass-definition

Specifies statements that make up the coclass definition.

Remarks

Licensing is a feature of COM that provides control over object creation. Licensed objects can be created only by clients that are authorized to use them. Licensing is implemented in COM through the IClassFactory2 interface and by support for a license key that can be passed at run time.

Flags

TYPEFLAG_FLICENSED

Examples

[
    uuid(12345678-1234-1234-1234-123456789ABC), 
    licensed, 
    helpstring("A meaningfulcomment"
]
coclass MyClass
{
    // coclass definition statements
};

See also

coclass
Contents of a Type Library
control
Generating a Type Library With MIDL
helpstring
helpcontext
hidden
ODL File Syntax
TYPEFLAGS
version

 

 

Community Additions

ADD
Show:
© 2014 Microsoft