ReactOS  0.4.12-dev-102-g4b7f1e0
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 665 of file atlcom.h.

Constructor & Destructor Documentation

◆ ~CComClassFactory()

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

Definition at line 672 of file atlcom.h.

673  {
674  }

Member Function Documentation

◆ CreateInstance()

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

Definition at line 677 of file atlcom.h.

678  {
679  HRESULT hResult;
680 
682 
683  if (ppvObj == NULL)
684  return E_POINTER;
685  *ppvObj = NULL;
686 
687  if (pUnkOuter != NULL && InlineIsEqualUnknown(riid) == FALSE)
688  hResult = CLASS_E_NOAGGREGATION;
689  else
690  hResult = m_pfnCreateInstance(pUnkOuter, riid, ppvObj);
691  return hResult;
692  }
#define ATLASSERT(x)
Definition: CComVariant.cpp:9
REFIID riid
Definition: precomp.h:44
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
BOOL WINAPI InlineIsEqualUnknown(REFGUID rguid1)
Definition: atlbase.h:336
_ATL_CREATORFUNC * m_pfnCreateInstance
Definition: atlcom.h:670
#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 694 of file atlcom.h.

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

◆ SetVoid()

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

Definition at line 703 of file atlcom.h.

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

Member Data Documentation

◆ m_pfnCreateInstance

_ATL_CREATORFUNC* ATL::CComClassFactory::m_pfnCreateInstance

Definition at line 670 of file atlcom.h.


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