ReactOS  0.4.15-dev-3193-g74513a7
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 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 666 of file atlcom.h.

Constructor & Destructor Documentation

◆ ~CComClassFactory()

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

Definition at line 673 of file atlcom.h.

674  {
675  }

Member Function Documentation

◆ CreateInstance()

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

Definition at line 678 of file atlcom.h.

679  {
680  HRESULT hResult;
681 
683 
684  if (ppvObj == NULL)
685  return E_POINTER;
686  *ppvObj = NULL;
687 
688  if (pUnkOuter != NULL && InlineIsEqualUnknown(riid) == FALSE)
689  hResult = CLASS_E_NOAGGREGATION;
690  else
691  hResult = m_pfnCreateInstance(pUnkOuter, riid, ppvObj);
692  return hResult;
693  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:10
REFIID riid
Definition: precomp.h:44
#define FALSE
Definition: types.h:117
LONG HRESULT
Definition: typedefs.h:79
BOOL WINAPI InlineIsEqualUnknown(REFGUID rguid1)
Definition: atlbase.h:324
_ATL_CREATORFUNC * m_pfnCreateInstance
Definition: atlcom.h:671
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
#define NULL
Definition: types.h:112
#define E_POINTER
Definition: winerror.h:2365

◆ LockServer()

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

Implements IClassFactory.

Definition at line 695 of file atlcom.h.

696  {
697  if (fLock)
698  _pAtlModule->Lock();
699  else
700  _pAtlModule->Unlock();
701  return S_OK;
702  }
#define S_OK
Definition: intsafe.h:52

◆ SetVoid()

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

Definition at line 704 of file atlcom.h.

705  {
706  m_pfnCreateInstance = (_ATL_CREATORFUNC *)pv;
707  }
_ATL_CREATORFUNC * m_pfnCreateInstance
Definition: atlcom.h:671

Member Data Documentation

◆ m_pfnCreateInstance

_ATL_CREATORFUNC* ATL::CComClassFactory::m_pfnCreateInstance

Definition at line 671 of file atlcom.h.

Referenced by CreateInstance(), and SetVoid().


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