ReactOS 0.4.15-dev-8207-gd73a838
ATL::CComClassFactory Class Reference

#include <atlcom.h>

Inheritance diagram for ATL::CComClassFactory:
Collaboration diagram for ATL::CComClassFactory:

Public Member Functions

virtual ~CComClassFactory ()
 
STDMETHOD() CreateInstance (LPUNKNOWN pUnkOuter, REFIID riid, void **ppvObj)
 
STDMETHOD() LockServer (BOOL fLock)
 
void SetVoid (void *pv)
 
- Public Member Functions inherited from IClassFactory
HRESULT CreateInstance ([in, unique] IUnknown *pUnkOuter, [in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
HRESULT RemoteCreateInstance ([in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 
HRESULT LockServer ([in] BOOL fLock)
 
HRESULT RemoteLockServer ([in] BOOL fLock)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComGlobalsThreadModel >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 

Public Attributes

_ATL_CREATORFUNC * m_pfnCreateInstance
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Additional Inherited Members

- Public Types inherited from IClassFactory
typedef IClassFactoryLPCLASSFACTORY
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 

Detailed Description

Definition at line 723 of file atlcom.h.

Constructor & Destructor Documentation

◆ ~CComClassFactory()

virtual ATL::CComClassFactory::~CComClassFactory ( )
inlinevirtual

Definition at line 730 of file atlcom.h.

731 {
732 }

Member Function Documentation

◆ CreateInstance()

STDMETHOD() ATL::CComClassFactory::CreateInstance ( LPUNKNOWN  pUnkOuter,
REFIID  riid,
void **  ppvObj 
)
inline

Definition at line 735 of file atlcom.h.

736 {
737 HRESULT hResult;
738
740
741 if (ppvObj == NULL)
742 return E_POINTER;
743 *ppvObj = NULL;
744
745 if (pUnkOuter != NULL && InlineIsEqualUnknown(riid) == FALSE)
746 hResult = CLASS_E_NOAGGREGATION;
747 else
748 hResult = m_pfnCreateInstance(pUnkOuter, riid, ppvObj);
749 return hResult;
750 }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
_ATL_CREATORFUNC * m_pfnCreateInstance
Definition: atlcom.h:728
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
REFIID riid
Definition: atlbase.h:39
BOOL WINAPI InlineIsEqualUnknown(REFGUID rguid1)
Definition: atlbase.h:374
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define E_POINTER
Definition: winerror.h:2365

◆ LockServer()

STDMETHOD() ATL::CComClassFactory::LockServer ( BOOL  fLock)
inline

Implements IClassFactory.

Definition at line 752 of file atlcom.h.

753 {
754 if (fLock)
755 _pAtlModule->Lock();
756 else
757 _pAtlModule->Unlock();
758 return S_OK;
759 }
#define S_OK
Definition: intsafe.h:52

◆ SetVoid()

void ATL::CComClassFactory::SetVoid ( void pv)
inline

Definition at line 761 of file atlcom.h.

762 {
763 m_pfnCreateInstance = (_ATL_CREATORFUNC *)pv;
764 }

Member Data Documentation

◆ m_pfnCreateInstance

_ATL_CREATORFUNC* ATL::CComClassFactory::m_pfnCreateInstance

Definition at line 728 of file atlcom.h.

Referenced by CreateInstance(), and SetVoid().


The documentation for this class was generated from the following file: