ReactOS 0.4.15-dev-7942-gd23573b
CClassFactory Class Reference
Inheritance diagram for CClassFactory:
Collaboration diagram for CClassFactory:

Public Member Functions

STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT WINAPI CreateInstance (LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject)
 
HRESULT WINAPI LockServer (BOOL fLock)
 
 CClassFactory (LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, IID *riidInst)
 
virtual ~CClassFactory ()
 
STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT WINAPI CreateInstance (LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject)
 
HRESULT WINAPI LockServer (BOOL fLock)
 
 CClassFactory (LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, IID *riidInst)
 
virtual ~CClassFactory ()
 
STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT WINAPI CreateInstance (LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject)
 
HRESULT WINAPI LockServer (BOOL fLock)
 
 CClassFactory (LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, IID *riidInst)
 
virtual ~CClassFactory ()
 
STDMETHODIMP QueryInterface (REFIID InterfaceId, PVOID *Interface)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
HRESULT WINAPI CreateInstance (LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObject)
 
HRESULT WINAPI LockServer (BOOL fLock)
 
 CClassFactory (LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, IID *riidInst)
 
virtual ~CClassFactory ()
 
- 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 ()
 

Protected Attributes

LONG m_Ref
 
LPFNCREATEINSTANCE m_lpfnCI
 
IIDm_IID
 

Additional Inherited Members

- Public Types inherited from IClassFactory
typedef IClassFactoryLPCLASSFACTORY
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 14 of file classfactory.cpp.

Constructor & Destructor Documentation

◆ CClassFactory() [1/4]

CClassFactory::CClassFactory ( LPFNCREATEINSTANCE  lpfnCI,
PLONG  pcRefDll,
IID riidInst 
)
inline

Definition at line 38 of file classfactory.cpp.

38 : m_Ref(1), m_lpfnCI(lpfnCI), m_IID(riidInst)
39 {};
LPFNCREATEINSTANCE m_lpfnCI
LPFNCREATEINSTANCE lpfnCI
Definition: shellole.c:61

◆ ~CClassFactory() [1/4]

virtual CClassFactory::~CClassFactory ( )
inlinevirtual

Definition at line 41 of file classfactory.cpp.

41{};

◆ CClassFactory() [2/4]

CClassFactory::CClassFactory ( LPFNCREATEINSTANCE  lpfnCI,
PLONG  pcRefDll,
IID riidInst 
)
inline

Definition at line 36 of file classfactory.cpp.

36 : m_Ref(1), m_lpfnCI(lpfnCI), m_IID(riidInst)
37 {};

◆ ~CClassFactory() [2/4]

virtual CClassFactory::~CClassFactory ( )
inlinevirtual

Definition at line 39 of file classfactory.cpp.

39{};

◆ CClassFactory() [3/4]

CClassFactory::CClassFactory ( LPFNCREATEINSTANCE  lpfnCI,
PLONG  pcRefDll,
IID riidInst 
)
inline

Definition at line 38 of file classfactory.cpp.

38 : m_Ref(1), m_lpfnCI(lpfnCI), m_IID(riidInst)
39 {};

◆ ~CClassFactory() [3/4]

virtual CClassFactory::~CClassFactory ( )
inlinevirtual

Definition at line 41 of file classfactory.cpp.

41{};

◆ CClassFactory() [4/4]

CClassFactory::CClassFactory ( LPFNCREATEINSTANCE  lpfnCI,
PLONG  pcRefDll,
IID riidInst 
)
inline

Definition at line 38 of file classfactory.cpp.

38 : m_Ref(1), m_lpfnCI(lpfnCI), m_IID(riidInst)
39 {};

◆ ~CClassFactory() [4/4]

virtual CClassFactory::~CClassFactory ( )
inlinevirtual

Definition at line 41 of file classfactory.cpp.

41{};

Member Function Documentation

◆ CreateInstance() [1/4]

HRESULT WINAPI CClassFactory::CreateInstance ( LPUNKNOWN  pUnkOuter,
REFIID  riid,
LPVOID ppvObject 
)

Definition at line 67 of file classfactory.cpp.

71{
72 *ppvObject = NULL;
73
75 {
76 return m_lpfnCI(pUnkOuter, riid, ppvObject);
77 }
78
79 return E_NOINTERFACE;
80}
#define NULL
Definition: types.h:112
REFIID riid
Definition: atlbase.h:39
const GUID IID_IUnknown
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ CreateInstance() [2/4]

HRESULT WINAPI CClassFactory::CreateInstance ( LPUNKNOWN  pUnkOuter,
REFIID  riid,
LPVOID ppvObject 
)

◆ CreateInstance() [3/4]

HRESULT WINAPI CClassFactory::CreateInstance ( LPUNKNOWN  pUnkOuter,
REFIID  riid,
LPVOID ppvObject 
)

◆ CreateInstance() [4/4]

HRESULT WINAPI CClassFactory::CreateInstance ( LPUNKNOWN  pUnkOuter,
REFIID  riid,
LPVOID ppvObject 
)

◆ LockServer() [1/4]

HRESULT WINAPI CClassFactory::LockServer ( BOOL  fLock)

Implements IClassFactory.

Definition at line 84 of file classfactory.cpp.

86{
87 return E_NOTIMPL;
88}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ LockServer() [2/4]

HRESULT WINAPI CClassFactory::LockServer ( BOOL  fLock)

Implements IClassFactory.

◆ LockServer() [3/4]

HRESULT WINAPI CClassFactory::LockServer ( BOOL  fLock)

Implements IClassFactory.

◆ LockServer() [4/4]

HRESULT WINAPI CClassFactory::LockServer ( BOOL  fLock)

Implements IClassFactory.

◆ QueryInterface() [1/4]

HRESULT WINAPI CClassFactory::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

Definition at line 51 of file classfactory.cpp.

54{
55 *ppvObj = NULL;
57 {
58 *ppvObj = PVOID(this);
60 return S_OK;
61 }
62 return E_NOINTERFACE;
63}
#define InterlockedIncrement
Definition: armddk.h:53
#define S_OK
Definition: intsafe.h:52
const GUID IID_IClassFactory
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
void * PVOID
Definition: typedefs.h:50

◆ QueryInterface() [2/4]

STDMETHODIMP CClassFactory::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

◆ QueryInterface() [3/4]

STDMETHODIMP CClassFactory::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

◆ QueryInterface() [4/4]

STDMETHODIMP CClassFactory::QueryInterface ( REFIID  InterfaceId,
PVOID Interface 
)

◆ STDMETHODIMP_() [1/8]

CClassFactory::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 19 of file classfactory.cpp.

20 {
22 return m_Ref;
23 }

◆ STDMETHODIMP_() [2/8]

CClassFactory::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 16 of file classfactory.cpp.

17 {
19 return m_Ref;
20 }

◆ STDMETHODIMP_() [3/8]

CClassFactory::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 19 of file classfactory.cpp.

20 {
22 return m_Ref;
23 }

◆ STDMETHODIMP_() [4/8]

CClassFactory::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 19 of file classfactory.cpp.

20 {
22 return m_Ref;
23 }

◆ STDMETHODIMP_() [5/8]

CClassFactory::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 24 of file classfactory.cpp.

25 {
27 if (!m_Ref)
28 {
29 delete this;
30 return 0;
31 }
32 return m_Ref;
33 }
#define InterlockedDecrement
Definition: armddk.h:52

◆ STDMETHODIMP_() [6/8]

CClassFactory::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 21 of file classfactory.cpp.

22 {
24
25 if (!m_Ref)
26 {
27 delete this;
28 return 0;
29 }
30 return m_Ref;
31 }

◆ STDMETHODIMP_() [7/8]

CClassFactory::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 24 of file classfactory.cpp.

25 {
27 if (!m_Ref)
28 {
29 delete this;
30 return 0;
31 }
32 return m_Ref;
33 }

◆ STDMETHODIMP_() [8/8]

CClassFactory::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 24 of file classfactory.cpp.

25 {
27 if (!m_Ref)
28 {
29 delete this;
30 return 0;
31 }
32 return m_Ref;
33 }

Member Data Documentation

◆ m_IID

IID * CClassFactory::m_IID
protected

Definition at line 46 of file classfactory.cpp.

Referenced by CreateInstance().

◆ m_lpfnCI

LPFNCREATEINSTANCE CClassFactory::m_lpfnCI
protected

Definition at line 45 of file classfactory.cpp.

Referenced by CreateInstance().

◆ m_Ref

LONG CClassFactory::m_Ref
protected

Definition at line 44 of file classfactory.cpp.

Referenced by QueryInterface(), and STDMETHODIMP_().


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