ReactOS 0.4.16-dev-258-g81860b4
objects.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS shdocvw
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Shell objects
5 * COPYRIGHT: Copyright 2024 Katayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
6 */
7
8#include "objects.h"
9
10#include <wine/debug.h>
12
13void *operator new(size_t size)
14{
15 return ::LocalAlloc(LMEM_FIXED, size);
16}
17
18void operator delete(void *ptr)
19{
21}
22
23void operator delete(void *ptr, size_t size)
24{
26}
27
28BEGIN_OBJECT_MAP(ObjectMap)
29 OBJECT_ENTRY(CLSID_SH_FavBand, CFavBand)
30 OBJECT_ENTRY(CLSID_ExplorerBand, CExplorerBand)
32
33class SHDOCVW_Module : public CComModule
34{
35public:
36};
37
39
42{
43 gModule.Init(ObjectMap, hInstance, NULL);
44}
45
48{
49 return gModule.DllCanUnloadNow();
50}
51
55
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}
82
85{
86 return gModule.DllRegisterServer(FALSE);
87}
88
91{
92 return gModule.DllUnregisterServer(FALSE);
93}
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
const WCHAR * class
Definition: main.c:68
#define EXTERN_C
Definition: basetyps.h:12
const GUID IID_IUnknown
const GUID IID_IClassFactory
HINSTANCE hInstance
Definition: charmap.c:19
#define NULL
Definition: types.h:112
#define FALSE
Definition: types.h:117
GLsizeiptr size
Definition: glext.h:5919
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define END_OBJECT_MAP()
Definition: atlcom.h:691
#define OBJECT_ENTRY(clsid, class)
Definition: atlcom.h:693
#define BEGIN_OBJECT_MAP(x)
Definition: atlcom.h:689
static PVOID ptr
Definition: dispmode.c:27
EXTERN_C HRESULT SHDOCVW_DllCanUnloadNow(VOID)
Definition: objects.cpp:47
static SHDOCVW_Module gModule
Definition: objects.cpp:38
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 SHDOCVW_DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: objects.cpp:57
EXTERN_C HRESULT SHDOCVW_DllUnregisterServer(VOID)
Definition: objects.cpp:90
EXTERN_C HRESULT SHDOCVW_DllRegisterServer(VOID)
Definition: objects.cpp:84
EXTERN_C HRESULT CMruClassFactory_CreateInstance(REFIID riid, void **ppv)
Definition: mrulist.cpp:1372
EXTERN_C VOID SHDOCVW_Init(HINSTANCE hInstance)
Definition: objects.cpp:41
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
HRESULT hr
Definition: shlfolder.c:183
uint32_t DWORD_PTR
Definition: typedefs.h:65
#define LMEM_FIXED
Definition: winbase.h:394
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663