现在的位置: 首页 > 综合 > 正文

DECLARE_CLASSFACTORY_SINGLETON 宏

2013年04月01日 ⁄ 综合 ⁄ 共 492字 ⁄ 字号 评论关闭

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.

抱歉!评论已关闭.