DECLARE_CLASSFACTORY
宣告 CComClassFactory 是 Class Factory。
DECLARE_CLASSFACTORY( )
備註
CComCoClass 使用這個巨集來宣告物件預設的 Class Factory。
範例
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