ReactOS 0.4.17-dev-1190-g4c812f4
IDefClFImpl Struct Reference
Inheritance diagram for IDefClFImpl:
Collaboration diagram for IDefClFImpl:

Public Member Functions

 IDefClFImpl ()
 
HRESULT Initialize (LPFNCREATEINSTANCE lpfnCI, PLONG pcRefDll, const IID *riidInstx)
 
STDMETHOD() CreateInstance (IUnknown *pUnkOuter, REFIID riid, LPVOID *ppvObject) override
 
STDMETHOD() LockServer (BOOL fLock) override
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~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 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 Attributes

IClassFactory IClassFactory_iface
 
LONG ref
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 

Private Attributes

CLSID * rclsid
 
LPFNCREATEINSTANCE lpfnCI
 
const IID * riidInst
 
LONG * pcRefDll
 

Additional Inherited Members

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

Detailed Description

Definition at line 191 of file shell32.cpp.

Constructor & Destructor Documentation

◆ IDefClFImpl()

IDefClFImpl::IDefClFImpl ( )

Definition at line 213 of file shell32.cpp.

214{
215 lpfnCI = NULL;
216 riidInst = NULL;
217 pcRefDll = NULL;
218 rclsid = NULL;
219}
const IID * riidInst
Definition: shell32.cpp:198
LONG * pcRefDll
Definition: shell32.cpp:199
CLSID * rclsid
Definition: shell32.cpp:196
LPFNCREATEINSTANCE lpfnCI
Definition: shell32.cpp:197
#define NULL
Definition: types.h:112

Member Function Documentation

◆ CreateInstance()

HRESULT WINAPI IDefClFImpl::CreateInstance ( IUnknown *  pUnkOuter,
REFIID  riid,
LPVOID *  ppvObject 
)
override

Definition at line 237 of file shell32.cpp.

238{
239 TRACE("%p->(%p,%s,%p)\n", this, pUnkOuter, shdebugstr_guid(&riid), ppvObject);
240
241 *ppvObject = NULL;
242
244 {
245 return lpfnCI(pUnkOuter, riid, ppvObject);
246 }
247
248 ERR("unknown IID requested %s\n", shdebugstr_guid(&riid));
249 return E_NOINTERFACE;
250}
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
const char * shdebugstr_guid(const struct _GUID *id)
Definition: debughlp.cpp:438
REFIID riid
Definition: atlbase.h:39
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
#define TRACE(s)
Definition: solgame.cpp:4
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ Initialize()

HRESULT IDefClFImpl::Initialize ( LPFNCREATEINSTANCE  lpfnCI,
PLONG  pcRefDll,
const IID *  riidInstx 
)

Definition at line 221 of file shell32.cpp.

222{
223 lpfnCI = lpfnCIx;
224 riidInst = riidInstx;
225 pcRefDll = pcRefDllx;
226
227 if (pcRefDll)
229
230 TRACE("(%p)%s\n", this, shdebugstr_guid(riidInst));
231 return S_OK;
232}
#define InterlockedIncrement
Definition: armddk.h:53
#define S_OK
Definition: intsafe.h:52

◆ LockServer()

HRESULT WINAPI IDefClFImpl::LockServer ( BOOL  fLock)
override

Implements IClassFactory.

Definition at line 255 of file shell32.cpp.

256{
257 TRACE("%p->(0x%x)\n", this, fLock);
258
259 if (fLock)
260 {
261 if (pcRefDll)
262 {
263 if (*pcRefDll == LONG_MAX)
264 ERR("pcRefDll is pinned, not incrementing\n");
265 else
267 }
268 _pAtlModule->Lock();
269 }
270 else
271 {
272 _pAtlModule->Unlock();
273 if (pcRefDll)
274 {
275 if (*pcRefDll == LONG_MAX)
276 ERR("pcRefDll is pinned, not decrementing\n");
277 else if (*pcRefDll > 0)
279 else
280 ERR("pcRefDll underflow\n");
281 }
282 }
283
284 return S_OK;
285}
#define InterlockedDecrement
Definition: armddk.h:52
#define LONG_MAX
Definition: limits.h:30

Member Data Documentation

◆ IClassFactory_iface

IClassFactory IDefClFImpl::IClassFactory_iface

Definition at line 411 of file shellole.c.

Referenced by IDefClF_fnConstructor().

◆ lpfnCI

LPFNCREATEINSTANCE IDefClFImpl::lpfnCI
private

Definition at line 197 of file shell32.cpp.

Referenced by CreateInstance(), IDefClF_fnConstructor(), IDefClFImpl(), and Initialize().

◆ pcRefDll

LONG * IDefClFImpl::pcRefDll
private

Definition at line 199 of file shell32.cpp.

Referenced by IDefClF_fnConstructor(), IDefClFImpl(), Initialize(), and LockServer().

◆ rclsid

CLSID * IDefClFImpl::rclsid
private

Definition at line 196 of file shell32.cpp.

Referenced by IDefClFImpl().

◆ ref

LONG IDefClFImpl::ref

Definition at line 412 of file shellole.c.

Referenced by IDefClF_fnConstructor().

◆ riidInst

const IID * IDefClFImpl::riidInst
private

Definition at line 198 of file shell32.cpp.

Referenced by CreateInstance(), IDefClF_fnConstructor(), IDefClFImpl(), and Initialize().


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