Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
wine-mirror
GitHub Repository: wine-mirror/wine
Path: blob/master/dlls/actxprxy/usrmarshal.c
4395 views
1
/*
2
* Miscellaneous Marshaling Routines
3
*
4
* Copyright 2006 Robert Shearman (for CodeWeavers)
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 <stdarg.h>
22
#include <string.h>
23
24
#define COBJMACROS
25
26
#include "windef.h"
27
#include "winbase.h"
28
#include "wingdi.h"
29
#include "winuser.h"
30
#include "winerror.h"
31
#include "objbase.h"
32
#include "servprov.h"
33
#include "comcat.h"
34
#include "docobj.h"
35
#include "shobjidl.h"
36
37
#include "wine/debug.h"
38
39
WINE_DEFAULT_DEBUG_CHANNEL(actxprxy);
40
41
HRESULT CALLBACK IServiceProvider_QueryService_Proxy(
42
IServiceProvider* This,
43
REFGUID guidService,
44
REFIID riid,
45
void** ppvObject)
46
{
47
TRACE("(%p, %s, %s, %p)\n", This, debugstr_guid(guidService),
48
debugstr_guid(riid), ppvObject);
49
50
return IServiceProvider_RemoteQueryService_Proxy(This, guidService, riid,
51
(IUnknown **)ppvObject);
52
}
53
54
HRESULT __RPC_STUB IServiceProvider_QueryService_Stub(
55
IServiceProvider* This,
56
REFGUID guidService,
57
REFIID riid,
58
IUnknown** ppvObject)
59
{
60
TRACE("(%p, %s, %s, %p)\n", This, debugstr_guid(guidService),
61
debugstr_guid(riid), ppvObject);
62
63
return IServiceProvider_QueryService(This, guidService, riid,
64
(void **)ppvObject);
65
}
66
67
HRESULT CALLBACK ICatInformation_EnumClassesOfCategories_Proxy(
68
ICatInformation *This,
69
ULONG cImplemented,
70
CATID rgcatidImpl[],
71
ULONG cRequired,
72
CATID rgcatidReq[],
73
IEnumCLSID** ppenumClsid )
74
{
75
TRACE("(%p)\n", This);
76
return ICatInformation_RemoteEnumClassesOfCategories_Proxy( This, cImplemented, rgcatidImpl,
77
cRequired, rgcatidReq, ppenumClsid );
78
}
79
80
HRESULT __RPC_STUB ICatInformation_EnumClassesOfCategories_Stub(
81
ICatInformation *This,
82
ULONG cImplemented,
83
CATID rgcatidImpl[],
84
ULONG cRequired,
85
CATID rgcatidReq[],
86
IEnumCLSID** ppenumClsid )
87
{
88
TRACE("(%p)\n", This);
89
return ICatInformation_EnumClassesOfCategories( This, cImplemented, rgcatidImpl,
90
cRequired, rgcatidReq, ppenumClsid );
91
}
92
93
HRESULT CALLBACK ICatInformation_IsClassOfCategories_Proxy(
94
ICatInformation *This,
95
REFCLSID rclsid,
96
ULONG cImplemented,
97
CATID rgcatidImpl[],
98
ULONG cRequired,
99
CATID rgcatidReq[] )
100
{
101
TRACE("(%p)\n", This);
102
return ICatInformation_RemoteIsClassOfCategories_Proxy( This, rclsid, cImplemented, rgcatidImpl,
103
cRequired, rgcatidReq );
104
}
105
106
HRESULT __RPC_STUB ICatInformation_IsClassOfCategories_Stub(
107
ICatInformation *This,
108
REFCLSID rclsid,
109
ULONG cImplemented,
110
CATID rgcatidImpl[],
111
ULONG cRequired,
112
CATID rgcatidReq[] )
113
{
114
TRACE("(%p)\n", This);
115
return ICatInformation_IsClassOfCategories( This, rclsid, cImplemented, rgcatidImpl,
116
cRequired, rgcatidReq );
117
}
118
119
HRESULT CALLBACK IPrint_Print_Proxy(
120
IPrint *This,
121
DWORD grfFlags,
122
DVTARGETDEVICE **pptd,
123
PAGESET **ppPageSet,
124
STGMEDIUM *pstgmOptions,
125
IContinueCallback *pcallback,
126
LONG nFirstPage,
127
LONG *pcPagesPrinted,
128
LONG *pnLastPage )
129
{
130
TRACE("(%p)\n", This);
131
return IPrint_RemotePrint_Proxy( This, grfFlags, pptd, ppPageSet, (RemSTGMEDIUM *)pstgmOptions,
132
pcallback, nFirstPage, pcPagesPrinted, pnLastPage );
133
}
134
135
HRESULT __RPC_STUB IPrint_Print_Stub(
136
IPrint *This,
137
DWORD grfFlags,
138
DVTARGETDEVICE **pptd,
139
PAGESET **ppPageSet,
140
RemSTGMEDIUM *pstgmOptions,
141
IContinueCallback *pcallback,
142
LONG nFirstPage,
143
LONG *pcPagesPrinted,
144
LONG *pnLastPage )
145
{
146
TRACE("(%p)\n", This);
147
return IPrint_Print( This, grfFlags, pptd, ppPageSet, (STGMEDIUM *)pstgmOptions,
148
pcallback, nFirstPage, pcPagesPrinted, pnLastPage );
149
}
150
151
HRESULT CALLBACK IEnumOleDocumentViews_Next_Proxy(
152
IEnumOleDocumentViews *This,
153
ULONG cViews,
154
IOleDocumentView **rgpView,
155
ULONG *pcFetched )
156
{
157
TRACE("(%p)\n", This);
158
return IEnumOleDocumentViews_RemoteNext_Proxy( This, cViews, rgpView, pcFetched );
159
}
160
161
HRESULT __RPC_STUB IEnumOleDocumentViews_Next_Stub(
162
IEnumOleDocumentViews *This,
163
ULONG cViews,
164
IOleDocumentView **rgpView,
165
ULONG *pcFetched )
166
{
167
TRACE("(%p)\n", This);
168
return IEnumOleDocumentViews_Next( This, cViews, rgpView, pcFetched );
169
}
170
171
HRESULT CALLBACK IEnumShellItems_Next_Proxy(
172
IEnumShellItems *This,
173
ULONG celt,
174
IShellItem **rgelt,
175
ULONG *pceltFetched)
176
{
177
ULONG fetched;
178
TRACE("(%p)->(%ld, %p, %p)\n", This, celt, rgelt, pceltFetched);
179
if (!pceltFetched) pceltFetched = &fetched;
180
return IEnumShellItems_RemoteNext_Proxy(This, celt, rgelt, pceltFetched);
181
}
182
183
HRESULT __RPC_STUB IEnumShellItems_Next_Stub(
184
IEnumShellItems *This,
185
ULONG celt,
186
IShellItem **rgelt,
187
ULONG *pceltFetched)
188
{
189
HRESULT hr;
190
TRACE("(%p)->(%ld, %p, %p)\n", This, celt, rgelt, pceltFetched);
191
*pceltFetched = 0;
192
hr = IEnumShellItems_Next(This, celt, rgelt, pceltFetched);
193
if (hr == S_OK) *pceltFetched = celt;
194
return hr;
195
}
196
197
HRESULT CALLBACK IModalWindow_Show_Proxy(
198
IModalWindow *This,
199
HWND hwndOwner)
200
{
201
TRACE("(%p)->(%p)\n", This, hwndOwner);
202
return IModalWindow_RemoteShow_Proxy(This, hwndOwner);
203
}
204
205
HRESULT __RPC_STUB IModalWindow_Show_Stub(
206
IModalWindow *This,
207
HWND hwndOwner)
208
{
209
TRACE("(%p)->(%p)\n", This, hwndOwner);
210
return IModalWindow_Show(This, hwndOwner);
211
}
212
213
HRESULT __RPC_STUB IFolderView2_GetGroupBy_Stub(
214
IFolderView2 *This,
215
PROPERTYKEY *pkey,
216
BOOL *ascending)
217
{
218
TRACE("(%p)->(%p %p)\n", This, pkey, ascending);
219
return IFolderView2_GetGroupBy(This, pkey, ascending);
220
}
221
222
HRESULT __RPC_STUB IFolderView2_GetGroupBy_Proxy(
223
IFolderView2 *This,
224
PROPERTYKEY *pkey,
225
BOOL *ascending)
226
{
227
TRACE("(%p)->(%p %p)\n", This, pkey, ascending);
228
return IFolderView2_RemoteGetGroupBy_Proxy(This, pkey, ascending);
229
}
230
231
HRESULT __RPC_STUB IParentAndItem_GetParentAndItem_Stub(
232
IParentAndItem *This,
233
PIDLIST_ABSOLUTE *parent,
234
IShellFolder **folder,
235
PITEMID_CHILD *child)
236
{
237
TRACE("(%p)->(%p %p %p)\n", This, parent, folder, child);
238
return IParentAndItem_GetParentAndItem(This, parent, folder, child);
239
}
240
241
HRESULT __RPC_STUB IParentAndItem_GetParentAndItem_Proxy(
242
IParentAndItem *This,
243
PIDLIST_ABSOLUTE *parent,
244
IShellFolder **folder,
245
PITEMID_CHILD *child)
246
{
247
TRACE("(%p)->(%p %p %p)\n", This, parent, folder, child);
248
return IParentAndItem_RemoteGetParentAndItem_Proxy(This, parent, folder, child);
249
}
250
251
HRESULT CALLBACK IEnumObjects_Next_Proxy(IEnumObjects *This, ULONG celt, REFIID riid, void **rgelt, ULONG *pceltFetched)
252
{
253
ULONG fetched;
254
TRACE("(%p)->(%ld, %p, %p, %p)\n", This, celt, debugstr_guid(riid), rgelt, pceltFetched);
255
if (!pceltFetched) pceltFetched = &fetched;
256
return IEnumObjects_RemoteNext_Proxy(This, celt, riid, rgelt, pceltFetched);
257
}
258
259
HRESULT __RPC_STUB IEnumObjects_Next_Stub(IEnumObjects *This, ULONG celt, REFIID riid, void **rgelt, ULONG *pceltFetched)
260
{
261
HRESULT hr;
262
TRACE("(%p)->(%ld, %p, %p, %p)\n", This, celt, debugstr_guid(riid), rgelt, pceltFetched);
263
*pceltFetched = 0;
264
hr = IEnumObjects_Next(This, celt, riid, rgelt, pceltFetched);
265
return hr;
266
}
267
268