DECLARE_CLASSFACTORY
声明 CComClassFactory 是选件类工厂。
DECLARE_CLASSFACTORY( )
备注
CComCoClass 使用此宏声明您的对象的默认选件类工厂。
示例
class ATL_NO_VTABLE CMyClass :
public CComObjectRootEx<CComSingleThreadModel>,
public CComCoClass<CMyClass, &CLSID_MyClass>,
public IDispatchImpl<IMyClass, &IID_IMyClass, &LIBID_NVC_ATL_COMLib, /*wMajor =*/ 1, /*wMinor =*/ 0>,
public IDispatchImpl<IMyDualInterface, &__uuidof(IMyDualInterface), &LIBID_NVC_ATL_COMLib, /* wMajor = */ 1, /* wMinor = */ 0>
{
public:
DECLARE_CLASSFACTORY()
// Remainder of class declaration omitted
要求
Header: atlcom.h
请参见
参考
DECLARE_CLASSFACTORY_AUTO_THREAD
DECLARE_CLASSFACTORY_SINGLETON