ReactOS 0.4.16-dev-2-g02a6913
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 1290 of file mrulist.cpp.

Constructor & Destructor Documentation

◆ CMruClassFactory()

CMruClassFactory::CMruClassFactory ( )
inline

Definition at line 1296 of file mrulist.cpp.

1297 {
1299 }
static void SHDOCVW_LockModule(void)
Definition: shdocvw.h:59

◆ ~CMruClassFactory()

virtual CMruClassFactory::~CMruClassFactory ( )
inlinevirtual

Definition at line 1300 of file mrulist.cpp.

1301 {
1303 }
static void SHDOCVW_UnlockModule(void)
Definition: shdocvw.h:60

Member Function Documentation

◆ CreateInstance()

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

Implements IClassFactory.

Definition at line 1349 of file mrulist.cpp.

1350{
1351 if (pUnkOuter)
1352 return CLASS_E_NOAGGREGATION;
1353
1354 if (IsEqualGUID(riid, IID_IMruDataList))
1356
1357 if (IsEqualGUID(riid, IID_IMruPidlList))
1359
1360 return E_NOINTERFACE;
1361}
REFIID riid
Definition: atlbase.h:39
EXTERN_C HRESULT CMruPidlList_CreateInstance(DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3)
Definition: mrulist.cpp:1245
EXTERN_C HRESULT CMruLongList_CreateInstance(DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3)
Definition: mrulist.cpp:711
#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 1363 of file mrulist.cpp.

1364{
1365 if (fLock)
1367 else
1369 return S_OK;
1370}
#define S_OK
Definition: intsafe.h:52

◆ operator delete()

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

Definition at line 1329 of file mrulist.cpp.

1330 {
1332 }
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 1325 of file mrulist.cpp.

1326 {
1327 return ::LocalAlloc(LPTR, size);
1328 }
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 1335 of file mrulist.cpp.

1336{
1337 if (!ppvObj)
1338 return E_POINTER;
1340 {
1341 *ppvObj = static_cast<IClassFactory*>(this);
1342 AddRef();
1343 return S_OK;
1344 }
1345 ERR("%s: E_NOINTERFACE\n", debugstr_guid(&riid));
1346 return E_NOINTERFACE;
1347}
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
const GUID IID_IClassFactory
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 1307 of file mrulist.cpp.

1308 {
1309 return ::InterlockedIncrement(&m_cRefs);
1310 }

◆ STDMETHODIMP_() [2/2]

CMruClassFactory::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 1311 of file mrulist.cpp.

1312 {
1314 {
1315 delete this;
1316 return 0;
1317 }
1318 return m_cRefs;
1319 }
#define InterlockedDecrement
Definition: armddk.h:52

Member Data Documentation

◆ m_cRefs

LONG CMruClassFactory::m_cRefs = 1
protected

Definition at line 1293 of file mrulist.cpp.

Referenced by STDMETHODIMP_().


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