Share via


CComClassFactorySingleton::m_spObj

The CComObjectGlobal object constructed by CComClassFactorySingleton.

CComPtr<IUnknown> m_spObj;

Remarks

Each call to the CreateInstance method simply queries this object for an interface pointer.

Note that the current form of m_spObj presents a breaking change from the way that CComClassFactorySingleton worked in previous versions of ATL. In previous versions the CComClassFactorySingleton object was created at the same time as the class factory, during server initialization. In Visual C++.NET 2003, the object is created lazily, on the first request. This change could cause errors in programs that rely on early initialization.

Requirements

Header: atlcom.h

See Also

Reference

CComClassFactorySingleton Class