ReactOS 0.4.16-dev-251-ga17b6e9
objects.cpp File Reference
#include "objects.h"
#include <wine/debug.h>
Include dependency graph for objects.cpp:

Go to the source code of this file.

Classes

class  SHDOCVW_Module
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shdocvw)
 
voidoperator new (size_t size)
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, size_t size)
 
EXTERN_C VOID SHDOCVW_Init (HINSTANCE hInstance)
 
EXTERN_C HRESULT SHDOCVW_DllCanUnloadNow (VOID)
 
EXTERN_C HRESULT CMruLongList_CreateInstance (DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3)
 
EXTERN_C HRESULT CMruPidlList_CreateInstance (DWORD_PTR dwUnused1, void **ppv, DWORD_PTR dwUnused3)
 
EXTERN_C HRESULT CMruClassFactory_CreateInstance (REFIID riid, void **ppv)
 
EXTERN_C HRESULT SHDOCVW_DllGetClassObject (REFCLSID rclsid, REFIID riid, LPVOID *ppv)
 
EXTERN_C HRESULT SHDOCVW_DllRegisterServer (VOID)
 
EXTERN_C HRESULT SHDOCVW_DllUnregisterServer (VOID)
 

Variables

static SHDOCVW_Module gModule
 

Function Documentation

◆ CMruClassFactory_CreateInstance()

EXTERN_C HRESULT CMruClassFactory_CreateInstance ( REFIID  riid,
void **  ppv 
)

Definition at line 1372 of file mrulist.cpp.

1373{
1374 CMruClassFactory *pFactory = new CMruClassFactory();
1375 if (!pFactory)
1376 return E_OUTOFMEMORY;
1377
1378 HRESULT hr = pFactory->QueryInterface(riid, ppv);
1379 pFactory->Release();
1380 return hr;
1381}
STDMETHODIMP QueryInterface(REFIID riid, void **ppvObj) override
Definition: mrulist.cpp:1335
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
ULONG Release()
HRESULT hr
Definition: shlfolder.c:183

Referenced by SHDOCVW_DllGetClassObject().

◆ CMruLongList_CreateInstance()

EXTERN_C HRESULT CMruLongList_CreateInstance ( DWORD_PTR  dwUnused1,
void **  ppv,
DWORD_PTR  dwUnused3 
)

Definition at line 711 of file mrulist.cpp.

712{
713 UNREFERENCED_PARAMETER(dwUnused1);
714 UNREFERENCED_PARAMETER(dwUnused3);
715
716 TRACE("%p %p %p\n", dwUnused1, ppv, dwUnused3);
717
718 if (!ppv)
719 return E_POINTER;
720
721 CMruLongList *pMruList = new CMruLongList();
722 *ppv = static_cast<IMruDataList*>(pMruList);
723 TRACE("%p\n", *ppv);
724
725 return S_OK;
726}
#define S_OK
Definition: intsafe.h:52
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:325
#define TRACE(s)
Definition: solgame.cpp:4
#define E_POINTER
Definition: winerror.h:2365

Referenced by CMruClassFactory::CreateInstance(), and SHDOCVW_DllGetClassObject().

◆ CMruPidlList_CreateInstance()

EXTERN_C HRESULT CMruPidlList_CreateInstance ( DWORD_PTR  dwUnused1,
void **  ppv,
DWORD_PTR  dwUnused3 
)

Definition at line 1245 of file mrulist.cpp.

1246{
1247 UNREFERENCED_PARAMETER(dwUnused1);
1248 UNREFERENCED_PARAMETER(dwUnused3);
1249
1250 TRACE("%p %p %p\n", dwUnused1, ppv, dwUnused3);
1251
1252 if (!ppv)
1253 return E_POINTER;
1254
1255 *ppv = NULL;
1256
1257 CMruPidlList *pMruList = new CMruPidlList();
1258 if (pMruList == NULL)
1259 return E_OUTOFMEMORY;
1260
1261 *ppv = static_cast<IMruPidlList*>(pMruList);
1262 TRACE("%p\n", *ppv);
1263 return S_OK;
1264}
#define NULL
Definition: types.h:112

Referenced by CMruClassFactory::CreateInstance(), and SHDOCVW_DllGetClassObject().

◆ operator delete() [1/2]

void operator delete ( void ptr)
noexcept

Definition at line 18 of file objects.cpp.

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

◆ operator delete() [2/2]

void operator delete ( void ptr,
size_t  size 
)
noexcept

Definition at line 23 of file objects.cpp.

24{
26}

◆ operator new()

void * operator new ( size_t  size)

Definition at line 13 of file objects.cpp.

14{
15 return ::LocalAlloc(LMEM_FIXED, size);
16}
GLsizeiptr size
Definition: glext.h:5919
#define LMEM_FIXED
Definition: winbase.h:394

◆ SHDOCVW_DllCanUnloadNow()

EXTERN_C HRESULT SHDOCVW_DllCanUnloadNow ( VOID  )

Definition at line 47 of file objects.cpp.

48{
49 return gModule.DllCanUnloadNow();
50}
static SHDOCVW_Module gModule
Definition: objects.cpp:38

Referenced by DllCanUnloadNow().

◆ SHDOCVW_DllGetClassObject()

EXTERN_C HRESULT SHDOCVW_DllGetClassObject ( REFCLSID  rclsid,
REFIID  riid,
LPVOID ppv 
)

Definition at line 57 of file objects.cpp.

58{
59 HRESULT hr = gModule.DllGetClassObject(rclsid, riid, ppv);
60 if (SUCCEEDED(hr))
61 return hr;
62
64 {
65 if (IsEqualGUID(rclsid, CLSID_MruLongList) ||
66 IsEqualGUID(rclsid, CLSID_MruPidlList))
67 {
69 }
70 }
71 else if (IsEqualGUID(riid, IID_IMruDataList))
72 {
73 return CMruLongList_CreateInstance(0, ppv, 0);
74 }
75 else if (IsEqualGUID(riid, IID_IMruPidlList))
76 {
77 return CMruPidlList_CreateInstance(0, ppv, 0);
78 }
79
81}
const GUID IID_IUnknown
const GUID IID_IClassFactory
#define SUCCEEDED(hr)
Definition: intsafe.h:50
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
EXTERN_C HRESULT CMruClassFactory_CreateInstance(REFIID riid, void **ppv)
Definition: mrulist.cpp:1372
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663

Referenced by DllGetClassObject().

◆ SHDOCVW_DllRegisterServer()

EXTERN_C HRESULT SHDOCVW_DllRegisterServer ( VOID  )

Definition at line 84 of file objects.cpp.

85{
86 return gModule.DllRegisterServer(FALSE);
87}
#define FALSE
Definition: types.h:117

Referenced by DllRegisterServer().

◆ SHDOCVW_DllUnregisterServer()

EXTERN_C HRESULT SHDOCVW_DllUnregisterServer ( VOID  )

Definition at line 90 of file objects.cpp.

91{
92 return gModule.DllUnregisterServer(FALSE);
93}

Referenced by DllUnregisterServer().

◆ SHDOCVW_Init()

EXTERN_C VOID SHDOCVW_Init ( HINSTANCE  hInstance)

Definition at line 41 of file objects.cpp.

42{
43 gModule.Init(ObjectMap, hInstance, NULL);
44}
HINSTANCE hInstance
Definition: charmap.c:19

Referenced by DllMain().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shdocvw  )

Variable Documentation

◆ gModule