Skip to content

Latest commit

 

History

History
87 lines (73 loc) · 1.89 KB

File metadata and controls

87 lines (73 loc) · 1.89 KB
title licensed | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic language-reference
f1_keywords
vc-attr.licensed
dev_langs
C++
helpviewer_keywords
licensed attribute
ms.assetid 09cf3b4a-d3f2-43e3-9180-d420333b23bf
caps.latest.revision 11
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

licensed

Indicates that the COM object to which it applies is licensed, and must be instantiated using IClassFactory2.

Syntax

  
[licensed]  
  

Remarks

The licensed C++ attribute has the same functionality as the licensed MIDL attribute.

Example

// cpp_attr_ref_licensed.cpp  
// compile with: /LD  
#include "unknwn.h"  
[object, uuid("00000000-0000-0000-0000-000000000001")]  
__interface IMyI : IUnknown {  
   HRESULT f();  
};  
  
[coclass, version("2.1"), uuid(12345678-1111-2222-3333-123456789012),   
licensed, threading(free), progid(some.name)]  
class CSample : public IMyI {  
public:  
   int nSize;  
};  
  
[module(name="MyLibrary", version="1.0", helpstring="My Library Block")];  

Requirements

Attribute Context

Applies to class, struct
Repeatable No
Required attributes coclass
Invalid attributes None

For more information, see Attribute Contexts.

See Also

IDL Attributes
Class Attributes