DECLARE_CLASSFACTORY_SINGLETON 宏
DECLARE_CLASSFACTORY_SINGLETON
This macro declares CComClassFactorySingleton to be the class factory.
DECLARE_CLASSFACTORY_SINGLETON( obj)
Parameters
- obj
- [in] The name of your class object.
Remarks
For example:
class CMyClass : ..., public CComCoClass< ... > { ... DECLARE_CLASSFACTORY_SINGLETON(CMyClass) ... };
CComCoClass includes the DECLARE_CLASSFACTORY macro, which specifies CComClassFactory as the default class factory. However, by including the DECLARE_CLASSFACTORY_SINGLETON macro in the class definition of your object, you override this default.