ReactOS  0.4.14-dev-376-gaedba84
CVfdFactory Class Reference

#include <vfdshcfact.h>

Inheritance diagram for CVfdFactory:
Collaboration diagram for CVfdFactory:

Public Member Functions

 CVfdFactory ()
 
 ~CVfdFactory ()
 
STDMETHODIMP QueryInterface (REFIID, LPVOID *)
 
 STDMETHODIMP_ (ULONG) AddRef()
 
 STDMETHODIMP_ (ULONG) Release()
 
STDMETHODIMP CreateInstance (LPUNKNOWN, REFIID, LPVOID *)
 
STDMETHODIMP LockServer (BOOL)
 
- 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 ()
 

Protected Attributes

ULONG m_cRefCnt
 

Additional Inherited Members

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

Detailed Description

Definition at line 18 of file vfdshcfact.h.

Constructor & Destructor Documentation

◆ CVfdFactory()

CVfdFactory::CVfdFactory ( )

Definition at line 25 of file vfdshcfact.cpp.

26 {
27  VFDTRACE(0, ("CVfdFactory::CVfdFactory()\n"));
28 
29  m_cRefCnt = 0L;
30 
31  g_cDllRefCnt++;
32 }
UINT g_cDllRefCnt
ULONG m_cRefCnt
Definition: vfdshcfact.h:21
#define VFDTRACE(LEVEL, STRING)
Definition: vfddbg.h:72
static const WCHAR L[]
Definition: oid.c:1250

◆ ~CVfdFactory()

CVfdFactory::~CVfdFactory ( )

Definition at line 37 of file vfdshcfact.cpp.

38 {
39  VFDTRACE(0, ("CVfdFactory::~CVfdFactory()\n"));
40 
41  g_cDllRefCnt--;
42 }
UINT g_cDllRefCnt
#define VFDTRACE(LEVEL, STRING)
Definition: vfddbg.h:72

Member Function Documentation

◆ CreateInstance()

STDMETHODIMP CVfdFactory::CreateInstance ( LPUNKNOWN  pUnkOuter,
REFIID  riid,
LPVOID ppvObj 
)

Definition at line 92 of file vfdshcfact.cpp.

96 {
97  VFDTRACE(0, ("CVfdFactory::CreateInstance()\n"));
98 
99  *ppvObj = NULL;
100 
101  // Shell extensions typically don't support
102  // aggregation (inheritance)
103 
104  if (pUnkOuter) {
105  return CLASS_E_NOAGGREGATION;
106  }
107 
108  // Create the main shell extension object.
109  // The shell will then call QueryInterface with IID_IShellExtInit
110  // -- this is how shell extensions are initialized.
111 
112  LPCVFDSHEXT pVfdShExt = new CVfdShExt;
113 
114  if (!pVfdShExt) {
115  return E_OUTOFMEMORY;
116  }
117 
118  return pVfdShExt->QueryInterface(riid, ppvObj);
119 }
REFIID riid
Definition: precomp.h:44
STDMETHODIMP QueryInterface(REFIID, LPVOID *)
Definition: vfdshext.cpp:55
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
smooth NULL
Definition: ftsmooth.c:416
#define VFDTRACE(LEVEL, STRING)
Definition: vfddbg.h:72
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662

◆ LockServer()

STDMETHODIMP CVfdFactory::LockServer ( BOOL  fLock)

Implements IClassFactory.

Definition at line 121 of file vfdshcfact.cpp.

122 {
123  VFDTRACE(0, ("CVfdFactory::LockServer()\n"));
124  UNREFERENCED_PARAMETER(fLock);
125  return NOERROR;
126 }
#define NOERROR
Definition: winerror.h:2354
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:323
#define VFDTRACE(LEVEL, STRING)
Definition: vfddbg.h:72

◆ QueryInterface()

STDMETHODIMP CVfdFactory::QueryInterface ( REFIID  riid,
LPVOID ppv 
)

Definition at line 47 of file vfdshcfact.cpp.

50 {
51  VFDTRACE(0, ("CVfdFactory::QueryInterface()\n"));
52 
53  *ppv = NULL;
54 
57  *ppv = (LPCLASSFACTORY)this;
58 
59  AddRef();
60 
61  return NOERROR;
62  }
63 
64  return E_NOINTERFACE;
65 }
#define E_NOINTERFACE
Definition: winerror.h:2364
#define NOERROR
Definition: winerror.h:2354
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
const GUID IID_IUnknown
#define VFDTRACE(LEVEL, STRING)
Definition: vfddbg.h:72
ULONG AddRef()
const GUID IID_IClassFactory
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
IClassFactory * LPCLASSFACTORY
Definition: unknwn.idl:70

Referenced by DllGetClassObject().

◆ STDMETHODIMP_() [1/2]

CVfdFactory::STDMETHODIMP_ ( ULONG  )

◆ STDMETHODIMP_() [2/2]

CVfdFactory::STDMETHODIMP_ ( ULONG  )

Member Data Documentation

◆ m_cRefCnt

ULONG CVfdFactory::m_cRefCnt
protected

Definition at line 21 of file vfdshcfact.h.

Referenced by CVfdFactory(), and STDMETHODIMP_().


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