梁某人

发展才是硬道理

导航

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.

posted on 2005-07-27 00:55  涛仔28  阅读(891)  评论(0编辑  收藏  举报