ReactOS 0.4.15-dev-8241-g63935f8
CMruClassFactory Class Reference
Inheritance diagram for CMruClassFactory:
Collaboration diagram for CMruClassFactory:

Public Member Functions

 CMruClassFactory ()
 
virtual ~CMruClassFactory ()
 
STDMETHODIMP QueryInterface (REFIID riid, void **ppvObj) override
 
 STDMETHODIMP_ (ULONG) AddRef() override
 
 STDMETHODIMP_ (ULONG) Release()
 
STDMETHODIMP CreateInstance (IUnknown *pUnkOuter, REFIID riid, void **ppvObject)
 
STDMETHODIMP LockServer (BOOL fLock)
 
- 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 ()
 

Static Public Member Functions

static voidoperator new (size_t size)
 
static void operator delete (void *ptr)
 

Protected Attributes

LONG m_cRefs = 1
 

Additional Inherited Members

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

Detailed Description

Definition at line 1316 of file mrulist.cpp.

Constructor & Destructor Documentation

◆ CMruClassFactory()

CMruClassFactory::CMruClassFactory ( )
inline

Definition at line 1322 of file mrulist.cpp.

1323 {
1325 }
#define InterlockedIncrement
Definition: armddk.h:53
LONG SHDOCVW_refCount
Definition: shdocvw_main.c:44

◆ ~CMruClassFactory()

virtual CMruClassFactory::~CMruClassFactory ( )
inlinevirtual

Definition at line 1326 of file mrulist.cpp.

1327 {
1329 }
#define InterlockedDecrement
Definition: armddk.h:52

Member Function Documentation

◆ CreateInstance()

STDMETHODIMP CMruClassFactory::CreateInstance ( IUnknown pUnkOuter,
REFIID  riid,
void **  ppvObject 
)

Implements IClassFactory.

Definition at line 1375 of file mrulist.cpp.

1376{
1377 if (pUnkOuter)
1378 return CLASS_E_NOAGGREGATION;
1379
1380 if (IsEqualGUID(riid, IID_IMruDataList))
1382
1383 if (IsEqualGUID(riid, IID_IMruPidlList))
1385
1386 return E_NOINTERFACE;
1387}
REFIID riid
Definition: atlbase.h:39
EXTERN_C HRESULT CMruPidlList_CreateInstance(DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3)
Definition: mrulist.cpp:1271
EXTERN_C HRESULT CMruLongList_CreateInstance(DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3)
Definition: mrulist.cpp:737
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
_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
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662

◆ LockServer()

STDMETHODIMP CMruClassFactory::LockServer ( BOOL  fLock)

Implements IClassFactory.

Definition at line 1389 of file mrulist.cpp.

1390{
1391 if (fLock)
1393 else
1394 ::InterlockedDecrement(&SHDOCVW_refCount);
1395 return S_OK;
1396}
#define S_OK
Definition: intsafe.h:52

◆ operator delete()

static void CMruClassFactory::operator delete ( void ptr)
inlinestatic

Definition at line 1355 of file mrulist.cpp.

1356 {
1358 }
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
static PVOID ptr
Definition: dispmode.c:27

◆ operator new()

static void * CMruClassFactory::operator new ( size_t  size)
inlinestatic

Definition at line 1351 of file mrulist.cpp.

1352 {
1353 return ::LocalAlloc(LPTR, size);
1354 }
GLsizeiptr size
Definition: glext.h:5919
#define LPTR
Definition: winbase.h:381

◆ QueryInterface()

STDMETHODIMP CMruClassFactory::QueryInterface ( REFIID  riid,
void **  ppvObj 
)
override

Implements IUnknown.

Definition at line 1361 of file mrulist.cpp.

1362{
1363 if (!ppvObj)
1364 return E_POINTER;
1366 {
1367 *ppvObj = static_cast<IClassFactory*>(this);
1368 AddRef();
1369 return S_OK;
1370 }
1371 ERR("%s: E_NOINTERFACE\n", debugstr_guid(&riid));
1372 return E_NOINTERFACE;
1373}
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define ERR(fmt,...)
Definition: debug.h:113
ULONG AddRef()
#define debugstr_guid
Definition: kernel32.h:35
#define E_POINTER
Definition: winerror.h:2365

Referenced by CMruClassFactory_CreateInstance().

◆ STDMETHODIMP_() [1/2]

CMruClassFactory::STDMETHODIMP_ ( ULONG  )
inlineoverride

Definition at line 1333 of file mrulist.cpp.

1334 {
1335 return ::InterlockedIncrement(&m_cRefs);
1336 }

◆ STDMETHODIMP_() [2/2]

CMruClassFactory::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 1337 of file mrulist.cpp.

1338 {
1340 {
1341 delete this;
1342 return 0;
1343 }
1344 return m_cRefs;
1345 }

Member Data Documentation

◆ m_cRefs

LONG CMruClassFactory::m_cRefs = 1
protected

Definition at line 1319 of file mrulist.cpp.

Referenced by STDMETHODIMP_().


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