CComCoClass

template< class T**, const CLSID*** pclsid >
class CComCoClass

Parameters

T

Your class, derived from CComCoClass.

pclsid

A pointer to the CLSID of the object.

CComCoClass provides methods for retrieving an object’s CLSID and setting error information. Any class object that can be created externally should be derived from CComCoClass.

CComCoClass also defines the default class factory and aggregation model for your object. CComCoClass uses the following two macros:

You can override either of these defaults by specifying another macro in your class definition. For example, to use CComClassFactory2 instead of CComClassFactory, specify the DECLARE_CLASSFACTORY2 macro:

class CMyClass : ...,
   public CComCoClass<CMyClass, &CLSID_CMyClass>
{
public:
   DECLARE_CLASSFACTORY2(CMyLicense)

   ...
};

#include <atlcom.h>

Class Members