Esta documentación está archivada y no tiene mantenimiento.

DECLARE_CLASSFACTORY_EX

Declares cf to be the class factory.


DECLARE_CLASSFACTORY_EX( 
      cf  
)

Parameters

cf

[in] The name of the class that implements your class factory object.

The cf parameter must derive from CComClassFactory and override the CreateInstance method.

CComCoClass includes the DECLARE_CLASSFACTORY macro, which specifies CComClassFactory as the default class factory. However, by including the DECLARE_CLASSFACTORY_EX macro in your object's class definition, you override this default.

class CMyClass : ..., public CComCoClass< ... >
{
   ...
   DECLARE_CLASSFACTORY_EX(CMyClassFactory)
   ...
};
Mostrar: