Export (0) Print
Expand All
ATL
Expand Minimize

DECLARE_CLASSFACTORY2 

Declares CComClassFactory2 to be the class factory.


DECLARE_CLASSFACTORY2( 
      lic  
)

Parameters

lic

[in] A class that implements VerifyLicenseKey, GetLicenseKey, and IsLicenseValid.

CComCoClass includes the DECLARE_CLASSFACTORY macro, which specifies CComClassFactory as the default class factory. However, by including the DECLARE_CLASSFACTORY2 macro in your object's class definition, you override this default.

class CMyClass : ..., public CComCoClass< ... >
{
   ...
   DECLARE_CLASSFACTORY2(CMyLicense)
   ...
};

Community Additions

ADD
Show:
© 2014 Microsoft