ReactOS  0.4.14-dev-831-gef8c9239
shxiface.c
Go to the documentation of this file.
1 #include "precomp.h"
2 
3 #define NDEBUG
4 #include <debug.h>
5 
7 
10  REFIID iid,
11  PVOID *pvObject)
12 {
15  iid,
16  pvObject);
17 }
18 
21 {
23  return IDeskMonitor_AddRef(This);
24 }
25 
28 {
30  return IDeskMonitor_Release(This);
31 }
32 
35  LPFNADDPROPSHEETPAGE pfnAddPage,
36  LPARAM lParam)
37 {
40  pfnAddPage,
41  lParam);
42 }
43 
46  EXPPS uPageID,
47  LPFNADDPROPSHEETPAGE pfnReplacePage,
48  LPARAM lParam)
49 {
52  uPageID,
53  pfnReplacePage,
54  lParam);
55 }
56 
57 static IShellPropSheetExtVtbl efvtIShellPropSheetExt =
58 {
64 };
65 
68  REFIID iid,
69  PVOID *pvObject)
70 {
73  iid,
74  pvObject);
75 }
76 
79 {
81  return IDeskMonitor_AddRef(This);
82 }
83 
86 {
88  return IDeskMonitor_Release(This);
89 }
90 
93  LPCITEMIDLIST pidlFolder,
94  IDataObject *pdtobj,
95  HKEY hkeyProgID)
96 {
99  pidlFolder,
100  pdtobj,
101  hkeyProgID);
102 }
103 
104 static IShellExtInitVtbl efvtIShellExtInit =
105 {
110 };
111 
114  REFIID iid,
115  PVOID *pvObject)
116 {
119  iid,
120  pvObject);
121 }
122 
125 {
127  return IDeskMonitor_AddRef(This);
128 }
129 
132 {
134  return IDeskMonitor_Release(This);
135 }
136 
139  IUnknown * pUnkOuter,
140  REFIID riid,
141  PVOID *ppvObject)
142 {
143  if (pUnkOuter != NULL &&
144  !IsEqualIID(riid,
145  &IID_IUnknown))
146  {
147  return CLASS_E_NOAGGREGATION;
148  }
149 
151  ppvObject);
152 }
153 
156  BOOL fLock)
157 {
158  if (fLock)
160  else
162 
163  return S_OK;
164 }
165 
166 static IClassFactoryVtbl efvtIClassFactory =
167 {
173 };
174 
175 VOID
177 {
178  This->lpIShellPropSheetExtVtbl = &efvtIShellPropSheetExt;
179  This->lpIShellExtInitVtbl = &efvtIShellExtInit;
180  This->lpIClassFactoryVtbl = &efvtIClassFactory;
181 
183 }
184 
187  REFIID riid,
188  LPVOID *ppv)
189 {
190  if (ppv == NULL)
191  return E_INVALIDARG;
192 
193  *ppv = NULL;
194  if (IsEqualCLSID(rclsid,
196  {
198  ppv);
199  }
200 
201  DPRINT1("DllGetClassObject: CLASS_E_CLASSNOTAVAILABLE\n");
203 }
204 
207 {
208  return dll_refs == 0 ? S_OK : S_FALSE;
209 }
HRESULT IDeskMonitor_Initialize(PDESKMONITOR This, LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)
Definition: deskmon.c:655
#define REFIID
Definition: guiddef.h:118
REFIID riid
Definition: precomp.h:44
#define REFCLSID
Definition: guiddef.h:117
static HRESULT STDMETHODCALLTYPE IDeskMonitor_IClassFactory_QueryInterface(IClassFactory *iface, REFIID iid, PVOID *pvObject)
Definition: shxiface.c:113
static ULONG STDMETHODCALLTYPE IDeskMonitor_IShellExtInit_AddRef(IShellExtInit *iface)
Definition: shxiface.c:78
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT WINAPI DllCanUnloadNow(VOID)
Definition: shxiface.c:206
static ULONG STDMETHODCALLTYPE IDeskMonitor_IClassFactory_Release(IClassFactory *iface)
Definition: shxiface.c:131
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
Definition: prsht.h:309
static HRESULT STDMETHODCALLTYPE IDeskMonitor_IShellExtInit_QueryInterface(IShellExtInit *iface, REFIID iid, PVOID *pvObject)
Definition: shxiface.c:67
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663
HRESULT STDMETHODCALLTYPE IDeskMonitor_QueryInterface(PDESKMONITOR This, REFIID iid, PVOID *pvObject)
Definition: deskmon.c:621
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
static ULONG STDMETHODCALLTYPE IDeskMonitor_IShellPropSheetExt_Release(IShellPropSheetExt *iface)
Definition: shxiface.c:27
HRESULT IDeskMonitor_ReplacePage(PDESKMONITOR This, EXPPS uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam)
Definition: deskmon.c:701
static HRESULT STDMETHODCALLTYPE IDeskMonitor_IShellPropSheetExt_AddPages(IShellPropSheetExt *iface, LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
Definition: shxiface.c:34
#define S_FALSE
Definition: winerror.h:2357
#define E_INVALIDARG
Definition: ddrawi.h:101
static HRESULT STDMETHODCALLTYPE IDeskMonitor_IClassFactory_LockServer(IClassFactory *iface, BOOL fLock)
Definition: shxiface.c:155
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
HRESULT IDeskMonitor_Constructor(REFIID riid, LPVOID *ppv)
Definition: deskmon.c:711
#define interface_to_impl(instance, iface)
Definition: dwnl.c:36
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID *ppv)
Definition: shxiface.c:186
static ULONG STDMETHODCALLTYPE IDeskMonitor_IShellExtInit_Release(IShellExtInit *iface)
Definition: shxiface.c:85
static IShellPropSheetExtVtbl efvtIShellPropSheetExt
Definition: shxiface.c:57
static IShellExtInitVtbl efvtIShellExtInit
Definition: shxiface.c:104
static ULONG STDMETHODCALLTYPE IDeskMonitor_IShellPropSheetExt_AddRef(IShellPropSheetExt *iface)
Definition: shxiface.c:20
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
#define WINAPI
Definition: msvc.h:6
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
ULONG IDeskMonitor_Release(PDESKMONITOR This)
Definition: deskmon.c:602
static HRESULT STDMETHODCALLTYPE IDeskMonitor_IShellExtInit_Initialize(IShellExtInit *iface, LPCITEMIDLIST pidlFolder, IDataObject *pdtobj, HKEY hkeyProgID)
Definition: shxiface.c:92
LONG dll_refs
Definition: shxiface.c:6
#define InterlockedDecrement
Definition: armddk.h:52
static ULONG STDMETHODCALLTYPE IDeskMonitor_IClassFactory_AddRef(IClassFactory *iface)
Definition: shxiface.c:124
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define CLASS_E_NOAGGREGATION
Definition: winerror.h:2662
static IClassFactoryVtbl efvtIClassFactory
Definition: shxiface.c:166
ULONG IDeskMonitor_AddRef(PDESKMONITOR This)
Definition: deskmon.c:590
#define S_OK
Definition: intsafe.h:59
#define InterlockedIncrement
Definition: armddk.h:53
#define DPRINT1
Definition: precomp.h:8
static HRESULT STDMETHODCALLTYPE IDeskMonitor_IClassFactory_CreateInstance(IClassFactory *iface, IUnknown *pUnkOuter, REFIID riid, PVOID *ppvObject)
Definition: shxiface.c:138
VOID IDeskMonitor_InitIface(PDESKMONITOR This)
Definition: shxiface.c:176
static HRESULT STDMETHODCALLTYPE IDeskMonitor_IShellPropSheetExt_QueryInterface(IShellPropSheetExt *iface, REFIID iid, PVOID *pvObject)
Definition: shxiface.c:9
HRESULT IDeskMonitor_AddPages(PDESKMONITOR This, LPFNADDPROPSHEETPAGE pfnAddPage, LPARAM lParam)
Definition: deskmon.c:677
unsigned int ULONG
Definition: retypes.h:1
#define IsEqualCLSID(rclsid1, rclsid2)
Definition: guiddef.h:96
LPARAM lParam
Definition: combotst.c:139
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
static const GUID CLSID_IDeskMonitor
Definition: deskmon.h:78
static HRESULT STDMETHODCALLTYPE IDeskMonitor_IShellPropSheetExt_ReplacePage(IShellPropSheetExt *iface, EXPPS uPageID, LPFNADDPROPSHEETPAGE pfnReplacePage, LPARAM lParam)
Definition: shxiface.c:45