ReactOS 0.4.16-dev-297-gc569aee
objsel.c
Go to the documentation of this file.
1/*
2 * Object Picker Dialog
3 *
4 * Copyright 2005 Thomas Weidenmueller <w3seek@reactos.com>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
19 */
20
21#include "objsel_private.h"
22#include "rpcproxy.h"
23
24#include "wine/debug.h"
25
27
30
31/***********************************************************************
32 * DllEntryPoint
33 */
35{
36 switch(fdwReason)
37 {
39 hInstance = hinstDLL;
41 break;
42 }
43 return TRUE;
44}
45
46
47/***********************************************************************
48 * DllGetClassObject (OBJSEL.@)
49 */
51{
52 TRACE("(%s, %s, %p)\n", debugstr_guid(rclsid), debugstr_guid(iid), ppv);
53
54 *ppv = NULL;
55
56 if (IsEqualGUID(rclsid, &CLSID_DsObjectPicker))
57 return IClassFactory_QueryInterface(&OBJSEL_ClassFactory.IClassFactory_iface, iid, ppv);
58
59 FIXME("CLSID: %s, IID: %s\n", debugstr_guid(rclsid), debugstr_guid(iid));
61}
62
63
64/***********************************************************************
65 * DllCanUnloadNow (OBJSEL.@)
66 */
68{
69 return dll_refs != 0 ? S_FALSE : S_OK;
70}
71
72
73/***********************************************************************
74 * DllRegisterServer (OBJSEL.@)
75 */
77{
79}
80
81
82/***********************************************************************
83 * DllUnregisterServer (OBJSEL.@)
84 */
86{
88}
89
90
91/**********************************************************************
92 * OBJSEL_IDsObjectPicker_Destroy (also IUnknown)
93 */
95{
97 0,
98 This);
99}
100
101
102static inline IDsObjectPickerImpl *impl_from_IDsObjectPicker(IDsObjectPicker *iface)
103{
104 return CONTAINING_RECORD(iface, IDsObjectPickerImpl, IDsObjectPicker_iface);
105}
106
107/**********************************************************************
108 * OBJSEL_IDsObjectPicker_AddRef (also IUnknown)
109 */
110static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker * iface)
111{
113 ULONG ref;
114
115 TRACE("\n");
116
117 if (This == NULL) return E_POINTER;
118
120
121 if (ref == 1)
122 {
124 }
125
126 return ref;
127}
128
129
130/**********************************************************************
131 * OBJSEL_IDsObjectPicker_Release (also IUnknown)
132 */
133static ULONG WINAPI OBJSEL_IDsObjectPicker_Release(IDsObjectPicker * iface)
134{
136 ULONG ref;
137
138 TRACE("\n");
139
140 if (This == NULL) return E_POINTER;
141
143
144 if (ref == 0)
145 {
148 }
149
150 return ref;
151}
152
153
154/**********************************************************************
155 * OBJSEL_IDsObjectPicker_QueryInterface (also IUnknown)
156 */
158 IDsObjectPicker * iface,
159 REFIID riid,
160 LPVOID *ppvObj)
161{
162 TRACE("\n\tIID:\t%s\n",debugstr_guid(riid));
163
164 if (ppvObj == NULL) return E_POINTER;
165
167 IsEqualGUID(riid, &IID_IDsObjectPicker))
168 {
169 *ppvObj = iface;
171 return S_OK;
172 }
173
174 FIXME("- no interface IID: %s\n", debugstr_guid(riid));
175 return E_NOINTERFACE;
176}
177
178
179/**********************************************************************
180 * OBJSEL_IDsObjectPicker_Initialize
181 */
183 IDsObjectPicker * iface,
184 PDSOP_INIT_INFO pInitInfo)
185{
186 FIXME("stub!\n");
187 return S_OK;
188}
189
190
191/**********************************************************************
192 * OBJSEL_IDsObjectPicker_InvokeDialog
193 */
195 IDsObjectPicker * iface,
197 IDataObject** ppdoSelections)
198{
199 FIXME("stub!\n");
200 return S_FALSE;
201}
202
203
204/**********************************************************************
205 * IDsObjectPicker_Vtbl
206 */
207static IDsObjectPickerVtbl IDsObjectPicker_Vtbl =
208{
214};
215
216
217/**********************************************************************
218 * OBJSEL_IDsObjectPicker_Create
219 */
221{
224 sizeof(IDsObjectPickerImpl));
225 if (Instance != NULL)
226 {
227 Instance->IDsObjectPicker_iface.lpVtbl = &IDsObjectPicker_Vtbl;
228 OBJSEL_IDsObjectPicker_AddRef(&Instance->IDsObjectPicker_iface);
229
230 *ppvObj = Instance;
231 return S_OK;
232 }
233 else
234 return E_OUTOFMEMORY;
235}
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
DWORD LPVOID fImpLoad
Definition: misc.cpp:142
const GUID IID_IUnknown
static HWND hwndParent
Definition: cryptui.c:300
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define GetProcessHeap()
Definition: compat.h:736
#define DLL_PROCESS_ATTACH
Definition: compat.h:131
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
BOOL WINAPI DisableThreadLibraryCalls(IN HMODULE hLibModule)
Definition: loader.c:85
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define debugstr_guid
Definition: kernel32.h:35
ClassFactoryImpl OBJSEL_ClassFactory
Definition: factory.c:168
static VOID OBJSEL_IDsObjectPicker_Destroy(IDsObjectPickerImpl *This)
Definition: objsel.c:94
static HRESULT WINAPI OBJSEL_IDsObjectPicker_Initialize(IDsObjectPicker *iface, PDSOP_INIT_INFO pInitInfo)
Definition: objsel.c:182
HRESULT WINAPI DllRegisterServer(void)
Definition: objsel.c:76
static HRESULT WINAPI OBJSEL_IDsObjectPicker_QueryInterface(IDsObjectPicker *iface, REFIID riid, LPVOID *ppvObj)
Definition: objsel.c:157
static ULONG WINAPI OBJSEL_IDsObjectPicker_Release(IDsObjectPicker *iface)
Definition: objsel.c:133
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID fImpLoad)
Definition: objsel.c:34
static IDsObjectPickerImpl * impl_from_IDsObjectPicker(IDsObjectPicker *iface)
Definition: objsel.c:102
static HINSTANCE hInstance
Definition: objsel.c:29
HRESULT WINAPI DllUnregisterServer(void)
Definition: objsel.c:85
HRESULT WINAPI OBJSEL_IDsObjectPicker_Create(LPVOID *ppvObj)
Definition: objsel.c:220
static ULONG WINAPI OBJSEL_IDsObjectPicker_AddRef(IDsObjectPicker *iface)
Definition: objsel.c:110
static IDsObjectPickerVtbl IDsObjectPicker_Vtbl
Definition: objsel.c:207
LONG dll_refs
Definition: objsel.c:28
static HRESULT WINAPI OBJSEL_IDsObjectPicker_InvokeDialog(IDsObjectPicker *iface, HWND hwndParent, IDataObject **ppdoSelections)
Definition: objsel.c:194
HRESULT WINAPI DllCanUnloadNow(void)
Definition: objsel.c:67
HRESULT WINAPI DllGetClassObject(REFCLSID rclsid, REFIID iid, LPVOID *ppv)
Definition: objsel.c:50
long LONG
Definition: pedump.c:60
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
#define REFIID
Definition: guiddef.h:118
#define REFCLSID
Definition: guiddef.h:117
HRESULT __wine_unregister_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:110
HRESULT __wine_register_resources(HMODULE module) DECLSPEC_HIDDEN
Definition: register.c:98
#define TRACE(s)
Definition: solgame.cpp:4
IClassFactory IClassFactory_iface
Definition: factory.c:26
Definition: send.c:48
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_WMI_INSTANCE_CONFIG _In_opt_ PWDF_OBJECT_ATTRIBUTES _Out_opt_ WDFWMIINSTANCE * Instance
Definition: wdfwmi.h:481
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_POINTER
Definition: winerror.h:2365
#define CLASS_E_CLASSNOTAVAILABLE
Definition: winerror.h:2663