Release 1.5.29.
[wine] / dlls / msdaps / usrmarshal.c
1 /*
2  *    Misc marshaling routines
3  *
4  * Copyright 2009 Huw Davies
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 #include <stdarg.h>
21 #include <string.h>
22
23 #define COBJMACROS
24 #define NONAMELESSUNION
25 #define NONAMELESSSTRUCT
26
27 #include "windef.h"
28 #include "winbase.h"
29 #include "wingdi.h"
30 #include "winuser.h"
31 #include "winerror.h"
32 #include "objbase.h"
33 #include "oleauto.h"
34 #include "oledb.h"
35
36 #include "row_server.h"
37
38 #include "wine/debug.h"
39
40 WINE_DEFAULT_DEBUG_CHANNEL(oledb);
41
42 HRESULT CALLBACK IDBCreateCommand_CreateCommand_Proxy(IDBCreateCommand* This, IUnknown *pUnkOuter,
43                                                       REFIID riid, IUnknown **ppCommand)
44 {
45     HRESULT hr;
46     IErrorInfo *error;
47
48     TRACE("(%p, %p, %s, %p)\n", This, pUnkOuter, debugstr_guid(riid), ppCommand);
49     hr = IDBCreateCommand_RemoteCreateCommand_Proxy(This, pUnkOuter, riid, ppCommand, &error);
50     if(error)
51     {
52         SetErrorInfo(0, error);
53         IErrorInfo_Release(error);
54     }
55     return hr;
56 }
57
58 HRESULT __RPC_STUB IDBCreateCommand_CreateCommand_Stub(IDBCreateCommand* This, IUnknown *pUnkOuter,
59                                                        REFIID riid, IUnknown **ppCommand, IErrorInfo **ppErrorInfoRem)
60 {
61     HRESULT hr;
62
63     TRACE("(%p, %p, %s, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid), ppCommand, ppErrorInfoRem);
64
65     *ppErrorInfoRem = NULL;
66     hr = IDBCreateCommand_CreateCommand(This, pUnkOuter, riid, ppCommand);
67     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
68
69     return hr;
70 }
71
72 HRESULT CALLBACK IDBCreateSession_CreateSession_Proxy(IDBCreateSession* This, IUnknown *pUnkOuter,
73                                                       REFIID riid, IUnknown **ppDBSession)
74 {
75     HRESULT hr;
76     IErrorInfo *error;
77
78     TRACE("(%p, %p, %s, %p)\n", This, pUnkOuter, debugstr_guid(riid), ppDBSession);
79     hr = IDBCreateSession_RemoteCreateSession_Proxy(This, pUnkOuter, riid, ppDBSession, &error);
80     if(error)
81     {
82         SetErrorInfo(0, error);
83         IErrorInfo_Release(error);
84     }
85     return hr;
86 }
87
88 HRESULT __RPC_STUB IDBCreateSession_CreateSession_Stub(IDBCreateSession* This, IUnknown *pUnkOuter,
89                                                        REFIID riid, IUnknown **ppDBSession, IErrorInfo **ppErrorInfoRem)
90 {
91     HRESULT hr;
92     TRACE("(%p, %p, %s, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid),
93           ppDBSession, ppErrorInfoRem);
94
95     *ppErrorInfoRem = NULL;
96     hr = IDBCreateSession_CreateSession(This, pUnkOuter, riid, ppDBSession);
97     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
98
99     return hr;
100 }
101
102 HRESULT CALLBACK IDBProperties_GetProperties_Proxy(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
103                                                    ULONG *pcPropertySets, DBPROPSET **prgPropertySets)
104 {
105     HRESULT hr;
106     IErrorInfo *error;
107
108     TRACE("(%p, %d, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets,
109           prgPropertySets);
110     hr = IDBProperties_RemoteGetProperties_Proxy(This, cPropertyIDSets, rgPropertyIDSets,
111                                                  pcPropertySets, prgPropertySets, &error);
112     if(error)
113     {
114         SetErrorInfo(0, error);
115         IErrorInfo_Release(error);
116     }
117     return hr;
118 }
119
120 HRESULT __RPC_STUB IDBProperties_GetProperties_Stub(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
121                                                     ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
122 {
123     HRESULT hr;
124
125     TRACE("(%p, %d, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets,
126           prgPropertySets, ppErrorInfoRem);
127     *pcPropertySets = 0;
128     *ppErrorInfoRem = NULL;
129     hr = IDBProperties_GetProperties(This, cPropertyIDSets, rgPropertyIDSets,
130         pcPropertySets, prgPropertySets);
131     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
132
133     return hr;
134 }
135
136 HRESULT CALLBACK IDBProperties_GetPropertyInfo_Proxy(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
137                                                      ULONG *pcPropertyInfoSets, DBPROPINFOSET **prgPropertyInfoSets,
138                                                      OLECHAR **ppDescBuffer)
139 {
140     FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
141           prgPropertyInfoSets, ppDescBuffer);
142     return E_NOTIMPL;
143 }
144
145 HRESULT __RPC_STUB IDBProperties_GetPropertyInfo_Stub(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
146                                                       ULONG *pcPropertyInfoSets, DBPROPINFOSET **prgPropertyInfoSets,
147                                                       ULONG *pcOffsets, DBBYTEOFFSET **prgDescOffsets, ULONG *pcbDescBuffer,
148                                                       OLECHAR **ppDescBuffer, IErrorInfo **ppErrorInfoRem)
149 {
150     FIXME("(%p, %d, %p, %p, %p, %p, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
151           prgPropertyInfoSets, pcOffsets, prgDescOffsets, pcbDescBuffer, ppDescBuffer, ppErrorInfoRem);
152     return E_NOTIMPL;
153 }
154
155 HRESULT CALLBACK IDBProperties_SetProperties_Proxy(IDBProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
156 {
157     ULONG prop_set, prop, total_props = 0;
158     HRESULT hr;
159     IErrorInfo *error;
160     DBPROPSTATUS *status;
161
162     TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
163
164     for(prop_set = 0; prop_set < cPropertySets; prop_set++)
165         total_props += rgPropertySets[prop_set].cProperties;
166
167     if(total_props == 0) return S_OK;
168
169     status = CoTaskMemAlloc(total_props * sizeof(*status));
170     if(!status) return E_OUTOFMEMORY;
171
172     hr = IDBProperties_RemoteSetProperties_Proxy(This, cPropertySets, rgPropertySets,
173                                                  total_props, status, &error);
174     if(error)
175     {
176         SetErrorInfo(0, error);
177         IErrorInfo_Release(error);
178     }
179
180     total_props = 0;
181     for(prop_set = 0; prop_set < cPropertySets; prop_set++)
182         for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
183             rgPropertySets[prop_set].rgProperties[prop].dwStatus = status[total_props++];
184
185     CoTaskMemFree(status);
186     return hr;
187 }
188
189 HRESULT __RPC_STUB IDBProperties_SetProperties_Stub(IDBProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
190                                                     ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
191 {
192     ULONG prop_set, prop, total_props = 0;
193     HRESULT hr;
194
195     TRACE("(%p, %d, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, cTotalProps,
196           rgPropStatus, ppErrorInfoRem);
197
198     *ppErrorInfoRem = NULL;
199     hr = IDBProperties_SetProperties(This, cPropertySets, rgPropertySets);
200     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
201
202     for(prop_set = 0; prop_set < cPropertySets; prop_set++)
203         for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
204             rgPropStatus[total_props++] = rgPropertySets[prop_set].rgProperties[prop].dwStatus;
205
206     return hr;
207 }
208
209 HRESULT CALLBACK IDBInitialize_Initialize_Proxy(IDBInitialize* This)
210 {
211     HRESULT hr;
212     IErrorInfo *error;
213
214     TRACE("(%p)\n", This);
215     hr = IDBInitialize_RemoteInitialize_Proxy(This, &error);
216     if(error)
217     {
218         SetErrorInfo(0, error);
219         IErrorInfo_Release(error);
220     }
221     return hr;
222 }
223
224 HRESULT __RPC_STUB IDBInitialize_Initialize_Stub(IDBInitialize* This, IErrorInfo **ppErrorInfoRem)
225 {
226     HRESULT hr;
227     TRACE("(%p, %p)\n", This, ppErrorInfoRem);
228
229     *ppErrorInfoRem = NULL;
230     hr = IDBInitialize_Initialize(This);
231     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
232
233     return hr;
234 }
235
236 HRESULT CALLBACK IDBInitialize_Uninitialize_Proxy(IDBInitialize* This)
237 {
238     IErrorInfo *error;
239     HRESULT hr;
240
241     TRACE("(%p)\n", This);
242     hr = IDBInitialize_RemoteUninitialize_Proxy(This, &error);
243     if(error)
244     {
245         SetErrorInfo(0, error);
246         IErrorInfo_Release(error);
247     }
248     return hr;
249 }
250
251 HRESULT __RPC_STUB IDBInitialize_Uninitialize_Stub(IDBInitialize* This, IErrorInfo **error)
252 {
253     HRESULT hr;
254
255     TRACE("(%p, %p)\n", This, error);
256     *error = NULL;
257     hr = IDBInitialize_Uninitialize(This);
258     if(FAILED(hr)) GetErrorInfo(0, error);
259
260     return hr;
261 }
262
263 HRESULT CALLBACK IDBDataSourceAdmin_CreateDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets,
264                                                            DBPROPSET rgPropertySets[], IUnknown *pUnkOuter,
265                                                            REFIID riid, IUnknown **ppDBSession)
266 {
267     ULONG prop_set, prop, total_props = 0;
268     HRESULT hr;
269     IErrorInfo *error;
270     DBPROPSTATUS *status;
271
272     TRACE("(%p, %d, %p, %p, %s, %p)\n", This, cPropertySets, rgPropertySets, pUnkOuter,
273           debugstr_guid(riid), ppDBSession);
274
275     for(prop_set = 0; prop_set < cPropertySets; prop_set++)
276         total_props += rgPropertySets[prop_set].cProperties;
277
278     if(total_props == 0) return S_OK;
279
280     status = CoTaskMemAlloc(total_props * sizeof(*status));
281     if(!status) return E_OUTOFMEMORY;
282
283     hr = IDBDataSourceAdmin_RemoteCreateDataSource_Proxy(This, cPropertySets, rgPropertySets, pUnkOuter,
284                                                          riid, ppDBSession, total_props, status, &error);
285     if(error)
286     {
287         SetErrorInfo(0, error);
288         IErrorInfo_Release(error);
289     }
290
291     total_props = 0;
292     for(prop_set = 0; prop_set < cPropertySets; prop_set++)
293         for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
294             rgPropertySets[prop_set].rgProperties[prop].dwStatus = status[total_props++];
295
296     CoTaskMemFree(status);
297     return hr;
298 }
299
300 HRESULT __RPC_STUB IDBDataSourceAdmin_CreateDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
301                                                             DBPROPSET *rgPropertySets, IUnknown *pUnkOuter,
302                                                             REFIID riid, IUnknown **ppDBSession, ULONG cTotalProps,
303                                                             DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
304 {
305     ULONG prop_set, prop, total_props = 0;
306     HRESULT hr;
307
308     TRACE("(%p, %d, %p, %p, %s, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, pUnkOuter,
309           debugstr_guid(riid), ppDBSession, cTotalProps, rgPropStatus, ppErrorInfoRem);
310
311     *ppErrorInfoRem = NULL;
312     hr = IDBDataSourceAdmin_CreateDataSource(This, cPropertySets, rgPropertySets, pUnkOuter, riid, ppDBSession);
313     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
314
315     for(prop_set = 0; prop_set < cPropertySets; prop_set++)
316         for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
317             rgPropStatus[total_props++] = rgPropertySets[prop_set].rgProperties[prop].dwStatus;
318
319     return hr;
320 }
321
322 HRESULT CALLBACK IDBDataSourceAdmin_DestroyDataSource_Proxy(IDBDataSourceAdmin* This)
323 {
324     IErrorInfo *error;
325     HRESULT hr;
326
327     TRACE("(%p)\n", This);
328     hr = IDBDataSourceAdmin_RemoteDestroyDataSource_Proxy(This, &error);
329     if(error)
330     {
331         SetErrorInfo(0, error);
332         IErrorInfo_Release(error);
333     }
334     return hr;
335 }
336
337 HRESULT __RPC_STUB IDBDataSourceAdmin_DestroyDataSource_Stub(IDBDataSourceAdmin* This, IErrorInfo **error)
338 {
339     HRESULT hr;
340
341     TRACE("(%p, %p)\n", This, error);
342     *error = NULL;
343     hr = IDBDataSourceAdmin_DestroyDataSource(This);
344     if(FAILED(hr)) GetErrorInfo(0, error);
345
346     return hr;
347 }
348
349 HRESULT CALLBACK IDBDataSourceAdmin_GetCreationProperties_Proxy(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
350                                                                 const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertyInfoSets,
351                                                                 DBPROPINFOSET **prgPropertyInfoSets, OLECHAR **ppDescBuffer)
352 {
353     FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
354           prgPropertyInfoSets, ppDescBuffer);
355     return E_NOTIMPL;
356 }
357
358 HRESULT __RPC_STUB IDBDataSourceAdmin_GetCreationProperties_Stub(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
359                                                                  const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertyInfoSets,
360                                                                  DBPROPINFOSET **prgPropertyInfoSets, DBCOUNTITEM *pcOffsets,
361                                                                  DBBYTEOFFSET **prgDescOffsets, ULONG *pcbDescBuffer,
362                                                                  OLECHAR **ppDescBuffer, IErrorInfo **error)
363 {
364     HRESULT hr;
365
366     TRACE("(%p, %d, %p, %p, %p, %p, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
367           prgPropertyInfoSets, pcOffsets, prgDescOffsets, pcbDescBuffer, ppDescBuffer, error);
368     *error = NULL;
369     hr = IDBDataSourceAdmin_GetCreationProperties(This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
370         prgPropertyInfoSets, ppDescBuffer);
371     if(FAILED(hr)) GetErrorInfo(0, error);
372
373     return hr;
374 }
375
376 HRESULT CALLBACK IDBDataSourceAdmin_ModifyDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
377 {
378     IErrorInfo *error;
379     HRESULT hr;
380
381     TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
382     hr = IDBDataSourceAdmin_RemoteModifyDataSource_Proxy(This, cPropertySets, rgPropertySets, &error);
383     if(error)
384     {
385         SetErrorInfo(0, error);
386         IErrorInfo_Release(error);
387     }
388
389     return hr;
390 }
391
392 HRESULT __RPC_STUB IDBDataSourceAdmin_ModifyDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
393                                                             DBPROPSET *rgPropertySets, IErrorInfo **error)
394 {
395     HRESULT hr;
396
397     TRACE("(%p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, error);
398     *error = NULL;
399     hr = IDBDataSourceAdmin_ModifyDataSource(This, cPropertySets, rgPropertySets);
400     if(FAILED(hr)) GetErrorInfo(0, error);
401
402     return hr;
403 }
404
405 HRESULT CALLBACK ISessionProperties_GetProperties_Proxy(ISessionProperties* This, ULONG cPropertyIDSets,
406                                                         const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertySets,
407                                                         DBPROPSET **prgPropertySets)
408 {
409     FIXME("(%p, %d, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets,
410           pcPropertySets, prgPropertySets);
411     return E_NOTIMPL;
412 }
413
414 HRESULT __RPC_STUB ISessionProperties_GetProperties_Stub(ISessionProperties* This, ULONG cPropertyIDSets,
415                                                          const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertySets,
416                                                          DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
417 {
418     FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets,
419           pcPropertySets, prgPropertySets, ppErrorInfoRem);
420     return E_NOTIMPL;
421 }
422
423 HRESULT CALLBACK ISessionProperties_SetProperties_Proxy(ISessionProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
424 {
425     ULONG prop_set, prop, total_props = 0;
426     HRESULT hr;
427     IErrorInfo *error;
428     DBPROPSTATUS *status;
429
430     TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
431
432     for(prop_set = 0; prop_set < cPropertySets; prop_set++)
433         total_props += rgPropertySets[prop_set].cProperties;
434
435     if(total_props == 0) return S_OK;
436
437     status = CoTaskMemAlloc(total_props * sizeof(*status));
438     if(!status) return E_OUTOFMEMORY;
439
440     hr = ISessionProperties_RemoteSetProperties_Proxy(This, cPropertySets, rgPropertySets,
441                                                       total_props, status, &error);
442     if(error)
443     {
444         SetErrorInfo(0, error);
445         IErrorInfo_Release(error);
446     }
447
448     total_props = 0;
449     for(prop_set = 0; prop_set < cPropertySets; prop_set++)
450         for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
451             rgPropertySets[prop_set].rgProperties[prop].dwStatus = status[total_props++];
452
453     CoTaskMemFree(status);
454     return hr;
455 }
456
457 HRESULT __RPC_STUB ISessionProperties_SetProperties_Stub(ISessionProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
458                                                          ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
459 {
460     ULONG prop_set, prop, total_props = 0;
461     HRESULT hr;
462
463     TRACE("(%p, %d, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, cTotalProps,
464           rgPropStatus, ppErrorInfoRem);
465
466     *ppErrorInfoRem = NULL;
467     hr = ISessionProperties_SetProperties(This, cPropertySets, rgPropertySets);
468     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
469
470     for(prop_set = 0; prop_set < cPropertySets; prop_set++)
471         for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
472             rgPropStatus[total_props++] = rgPropertySets[prop_set].rgProperties[prop].dwStatus;
473
474     return hr;
475 }
476
477 HRESULT CALLBACK IOpenRowset_OpenRowset_Proxy(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
478                                               REFIID riid, ULONG cPropertySets, DBPROPSET rgPropertySets[], IUnknown **ppRowset)
479 {
480     FIXME("(%p, %p, %p, %p, %s, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
481           cPropertySets, rgPropertySets, ppRowset);
482     return E_NOTIMPL;
483 }
484
485 HRESULT __RPC_STUB IOpenRowset_OpenRowset_Stub(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
486                                                REFIID riid, ULONG cPropertySets, DBPROPSET *rgPropertySets,
487                                                IUnknown **ppRowset, ULONG cTotalProps, DBPROPSTATUS *rgPropStatus,
488                                                IErrorInfo **ppErrorInfoRem)
489 {
490     FIXME("(%p, %p, %p, %p, %s, %d, %p, %p, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
491           cPropertySets, rgPropertySets, ppRowset, cTotalProps, rgPropStatus, ppErrorInfoRem);
492     return E_NOTIMPL;
493 }
494
495 HRESULT CALLBACK IBindResource_Bind_Proxy(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
496                                           REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
497                                           DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
498 {
499     HRESULT hr;
500
501     TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
502           debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppUnk);
503
504     if(pUnkOuter)
505     {
506         FIXME("Aggregation not supported\n");
507         return CLASS_E_NOAGGREGATION;
508     }
509
510     hr = IBindResource_RemoteBind_Proxy(This, pUnkOuter, pwszURL, dwBindURLFlags, rguid, riid, pAuthenticate,
511                                         pImplSession ? pImplSession->pUnkOuter : NULL, pImplSession ? pImplSession->piid : NULL,
512                                         pImplSession ? &pImplSession->pSession : NULL, pdwBindStatus, ppUnk);
513     return hr;
514 }
515
516 HRESULT __RPC_STUB IBindResource_Bind_Stub(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
517                                            REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
518                                            IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
519 {
520     HRESULT hr;
521     DBIMPLICITSESSION impl_session;
522     IWineRowServer *server;
523     IMarshal *marshal;
524     IUnknown *obj;
525
526     TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
527           debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppUnk);
528
529     *ppUnk = NULL;
530
531     if(IsEqualGUID(rguid, &DBGUID_ROWSET))
532         hr = CoCreateInstance(&CLSID_wine_rowset_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&server);
533     else if(IsEqualGUID(rguid, &DBGUID_ROW))
534         hr = CoCreateInstance(&CLSID_wine_row_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&server);
535     else
536     {
537         hr = E_NOTIMPL;
538         FIXME("Unhandled object %s\n", debugstr_guid(rguid));
539     }
540
541     if(FAILED(hr)) return hr;
542
543     impl_session.pUnkOuter = pSessionUnkOuter;
544     impl_session.piid = piid;
545     impl_session.pSession = NULL;
546
547     IWineRowServer_GetMarshal(server, &marshal);
548
549     hr = IBindResource_Bind(This, (IUnknown*)marshal, pwszURL, dwBindURLFlags, rguid, &IID_IUnknown, pAuthenticate,
550                             ppSession ? &impl_session : NULL, pdwBindStatus, &obj);
551
552     IMarshal_Release(marshal);
553     if(FAILED(hr))
554     {
555         IWineRowServer_Release(server);
556         return hr;
557     }
558
559     IWineRowServer_SetInnerUnk(server, obj);
560     hr = IUnknown_QueryInterface(obj, riid, (void**)ppUnk);
561     IUnknown_Release(obj);
562
563     if(ppSession) *ppSession = impl_session.pSession;
564     return hr;
565 }
566
567 HRESULT CALLBACK ICreateRow_CreateRow_Proxy(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
568                                             REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
569                                             DBBINDURLSTATUS *pdwBindStatus, LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
570 {
571     HRESULT hr;
572
573     TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
574           debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppwszNewURL, ppUnk);
575
576     if(pUnkOuter)
577     {
578         FIXME("Aggregation not supported\n");
579         return CLASS_E_NOAGGREGATION;
580     }
581
582     hr = ICreateRow_RemoteCreateRow_Proxy(This, pUnkOuter, pwszURL, dwBindURLFlags, rguid, riid, pAuthenticate,
583                                           pImplSession ? pImplSession->pUnkOuter : NULL, pImplSession ? pImplSession->piid : NULL,
584                                           pImplSession ? &pImplSession->pSession : NULL, pdwBindStatus, ppwszNewURL, ppUnk);
585     return hr;
586 }
587
588 HRESULT __RPC_STUB ICreateRow_CreateRow_Stub(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
589                                              REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
590                                              IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus,
591                                              LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
592 {
593     HRESULT hr;
594     DBIMPLICITSESSION impl_session;
595     IWineRowServer *row_server;
596     IMarshal *marshal;
597     IUnknown *obj;
598
599     TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
600           debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppwszNewURL,
601           ppUnk);
602
603     *ppUnk = NULL;
604
605     hr = CoCreateInstance(&CLSID_wine_row_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&row_server);
606     if(FAILED(hr)) return hr;
607
608     impl_session.pUnkOuter = pSessionUnkOuter;
609     impl_session.piid = piid;
610     impl_session.pSession = NULL;
611
612     IWineRowServer_GetMarshal(row_server, &marshal);
613
614     hr = ICreateRow_CreateRow(This, (IUnknown*) marshal, pwszURL, dwBindURLFlags, rguid, &IID_IUnknown, pAuthenticate,
615                               ppSession ? &impl_session : NULL, pdwBindStatus, ppwszNewURL, &obj);
616     IMarshal_Release(marshal);
617
618     if(FAILED(hr))
619     {
620         IWineRowServer_Release(row_server);
621         return hr;
622     }
623
624     IWineRowServer_SetInnerUnk(row_server, obj);
625     hr = IUnknown_QueryInterface(obj, riid, (void**)ppUnk);
626     IUnknown_Release(obj);
627
628     if(ppSession) *ppSession = impl_session.pSession;
629     return hr;
630 }
631
632 HRESULT CALLBACK IAccessor_AddRefAccessor_Proxy(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount)
633 {
634     FIXME("(%p)->(%08lx, %p): stub\n", This, hAccessor, pcRefCount);
635     return E_NOTIMPL;
636 }
637
638 HRESULT __RPC_STUB IAccessor_AddRefAccessor_Stub(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount,
639                                                  IErrorInfo **ppErrorInfoRem)
640 {
641     FIXME("(%p)->(%08lx, %p, %p): stub\n", This, hAccessor, pcRefCount, ppErrorInfoRem);
642     return E_NOTIMPL;
643 }
644
645 HRESULT CALLBACK IAccessor_CreateAccessor_Proxy(IAccessor* This, DBACCESSORFLAGS dwAccessorFlags, DBCOUNTITEM cBindings,
646                                                 const DBBINDING rgBindings[], DBLENGTH cbRowSize, HACCESSOR *phAccessor,
647                                                 DBBINDSTATUS rgStatus[])
648 {
649     HRESULT hr;
650     IErrorInfo *error;
651     DBCOUNTITEM i;
652
653     TRACE("(%p)->(%08x, %ld, %p, %ld, %p, %p)\n", This, dwAccessorFlags, cBindings, rgBindings,
654           cbRowSize, phAccessor, rgStatus);
655
656     for(i = 0; i < cBindings; i++)
657     {
658         TRACE("%ld: ord %ld val off %ld len off %ld stat off %ld part %04x mem_owner %d max_len %ld type %04x\n",
659               i, rgBindings[i].iOrdinal, rgBindings[i].obValue, rgBindings[i].obLength, rgBindings[i].obStatus,
660               rgBindings[i].dwPart, rgBindings[i].dwMemOwner, rgBindings[i].cbMaxLen, rgBindings[i].wType);
661     }
662
663     hr = IAccessor_RemoteCreateAccessor_Proxy(This, dwAccessorFlags, cBindings, (DBBINDING *)rgBindings,
664                                               cbRowSize, phAccessor, rgStatus, &error);
665     if(error)
666     {
667         SetErrorInfo(0, error);
668         IErrorInfo_Release(error);
669     }
670
671     TRACE("returning %08x accessor %lx\n", hr, *phAccessor);
672     return hr;
673 }
674
675 HRESULT __RPC_STUB IAccessor_CreateAccessor_Stub(IAccessor* This, DBACCESSORFLAGS dwAccessorFlags, DBCOUNTITEM cBindings,
676                                                  DBBINDING *rgBindings, DBLENGTH cbRowSize, HACCESSOR *phAccessor,
677                                                  DBBINDSTATUS *rgStatus, IErrorInfo **ppErrorInfoRem)
678 {
679     HRESULT hr;
680
681     TRACE("(%p)->(%08x, %ld, %p, %ld, %p, %p, %p)\n", This, dwAccessorFlags, cBindings, rgBindings,
682           cbRowSize, phAccessor, rgStatus, ppErrorInfoRem);
683
684     *ppErrorInfoRem = NULL;
685     hr = IAccessor_CreateAccessor(This, dwAccessorFlags, cBindings, rgBindings,
686                                   cbRowSize, phAccessor, rgStatus);
687     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
688
689     return hr;
690 }
691
692 HRESULT CALLBACK IAccessor_GetBindings_Proxy(IAccessor* This, HACCESSOR hAccessor, DBACCESSORFLAGS *pdwAccessorFlags,
693                                              DBCOUNTITEM *pcBindings, DBBINDING **prgBindings)
694 {
695     FIXME("(%p): stub\n", This);
696     return E_NOTIMPL;
697 }
698
699 HRESULT __RPC_STUB IAccessor_GetBindings_Stub(IAccessor* This, HACCESSOR hAccessor, DBACCESSORFLAGS *pdwAccessorFlags,
700                                               DBCOUNTITEM *pcBindings, DBBINDING **prgBindings, IErrorInfo **ppErrorInfoRem)
701 {
702     FIXME("(%p): stub\n", This);
703     return E_NOTIMPL;
704 }
705
706 HRESULT CALLBACK IAccessor_ReleaseAccessor_Proxy(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount)
707 {
708     HRESULT hr;
709     IErrorInfo *error;
710     DBREFCOUNT ref;
711
712     TRACE("(%p)->(%lx, %p)\n", This, hAccessor, pcRefCount);
713
714     hr = IAccessor_RemoteReleaseAccessor_Proxy(This, hAccessor, &ref, &error);
715
716     if(pcRefCount) *pcRefCount = ref;
717     if(error)
718     {
719         SetErrorInfo(0, error);
720         IErrorInfo_Release(error);
721     }
722     return hr;
723 }
724
725 HRESULT __RPC_STUB IAccessor_ReleaseAccessor_Stub(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount,
726                                                   IErrorInfo **ppErrorInfoRem)
727 {
728     HRESULT hr;
729
730     TRACE("(%p)->(%lx, %p, %p)\n", This, hAccessor, pcRefCount, ppErrorInfoRem);
731
732     *ppErrorInfoRem = NULL;
733
734     hr = IAccessor_ReleaseAccessor(This, hAccessor, pcRefCount);
735
736     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
737     return hr;
738 }
739
740 HRESULT CALLBACK IRowsetInfo_GetProperties_Proxy(IRowsetInfo* This, const ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
741                                                  ULONG *pcPropertySets, DBPROPSET **prgPropertySets)
742 {
743     HRESULT hr;
744     IErrorInfo *error;
745     ULONG i;
746
747     TRACE("(%p)->(%d, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets);
748
749     for(i = 0; i < cPropertyIDSets; i++)
750     {
751         unsigned int j;
752         TRACE("%d: %s %d props\n", i, debugstr_guid(&rgPropertyIDSets[i].guidPropertySet), rgPropertyIDSets[i].cPropertyIDs);
753         for(j = 0; j < rgPropertyIDSets[i].cPropertyIDs; j++)
754             TRACE("\t%u: prop id %d\n", j, rgPropertyIDSets[i].rgPropertyIDs[j]);
755     }
756
757     hr = IRowsetInfo_RemoteGetProperties_Proxy(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, &error);
758
759     if(error)
760     {
761         SetErrorInfo(0, error);
762         IErrorInfo_Release(error);
763     }
764     return hr;
765 }
766
767 HRESULT __RPC_STUB IRowsetInfo_GetProperties_Stub(IRowsetInfo* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
768                                                   ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
769 {
770     HRESULT hr;
771
772     TRACE("(%p)->(%d, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, ppErrorInfoRem);
773
774     *ppErrorInfoRem = NULL;
775
776     hr = IRowsetInfo_GetProperties(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets);
777     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
778     TRACE("returning %08x\n", hr);
779     return hr;
780 }
781
782 HRESULT CALLBACK IRowsetInfo_GetReferencedRowset_Proxy(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset)
783 {
784     FIXME("(%p)->(%ld, %s, %p): stub\n", This, iOrdinal, debugstr_guid(riid), ppReferencedRowset);
785     return E_NOTIMPL;
786 }
787
788 HRESULT __RPC_STUB IRowsetInfo_GetReferencedRowset_Stub(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset,
789                                                         IErrorInfo **ppErrorInfoRem)
790 {
791     FIXME("(%p)->(%ld, %s, %p, %p): stub\n", This, iOrdinal, debugstr_guid(riid), ppReferencedRowset, ppErrorInfoRem);
792     return E_NOTIMPL;
793 }
794
795 HRESULT CALLBACK IRowsetInfo_GetSpecification_Proxy(IRowsetInfo* This, REFIID riid, IUnknown **ppSpecification)
796 {
797     FIXME("(%p)->(%s, %p): stub\n", This, debugstr_guid(riid), ppSpecification);
798     return E_NOTIMPL;
799 }
800
801 HRESULT __RPC_STUB IRowsetInfo_GetSpecification_Stub(IRowsetInfo* This, REFIID riid, IUnknown **ppSpecification, IErrorInfo **ppErrorInfoRem)
802 {
803     FIXME("(%p)->(%s, %p, %p): stub\n", This, debugstr_guid(riid), ppSpecification, ppErrorInfoRem);
804     return E_NOTIMPL;
805 }
806
807 HRESULT CALLBACK ICommand_Cancel_Proxy(ICommand* This)
808 {
809     FIXME("(%p): stub\n", This);
810     return E_NOTIMPL;
811 }
812
813 HRESULT __RPC_STUB ICommand_Cancel_Stub(ICommand* This, IErrorInfo **ppErrorInfoRem)
814 {
815     FIXME("(%p)->(%p): stub\n", This, ppErrorInfoRem);
816     return E_NOTIMPL;
817 }
818
819 HRESULT CALLBACK ICommand_Execute_Proxy(ICommand* This, IUnknown *pUnkOuter, REFIID riid,
820                                         DBPARAMS *pParams, DBROWCOUNT *pcRowsAffected, IUnknown **ppRowset)
821 {
822     HRESULT hr;
823     DBROWCOUNT affected;
824
825     *ppRowset = NULL;
826
827     TRACE("(%p)->(%p, %s, %p, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid), pParams,
828           pcRowsAffected, ppRowset);
829
830     if(pParams)
831     {
832         FIXME("Unhandled params {%p, %ld, %08lx}\n", pParams->pData, pParams->cParamSets, pParams->hAccessor);
833         return E_NOTIMPL;
834     }
835
836     if(pUnkOuter)
837     {
838         FIXME("Aggregation not supported\n");
839         return CLASS_E_NOAGGREGATION;
840     }
841
842     hr = ICommand_RemoteExecute_Proxy(This, pUnkOuter, riid, 0, 0, NULL, 0, NULL, NULL, 0, NULL, NULL, &affected,
843                                       ppRowset);
844
845     TRACE("Execute returns %08x\n", hr);
846
847     if(pcRowsAffected) *pcRowsAffected = affected;
848
849     return hr;
850 }
851
852 HRESULT __RPC_STUB ICommand_Execute_Stub(ICommand* This, IUnknown *pUnkOuter, REFIID riid, HACCESSOR hAccessor,
853                                          DB_UPARAMS cParamSets, GUID *pGuid, ULONG ulGuidOffset, RMTPACK *pInputParams,
854                                          RMTPACK *pOutputParams, DBCOUNTITEM cBindings, DBBINDING *rgBindings,
855                                          DBSTATUS *rgStatus, DBROWCOUNT *pcRowsAffected, IUnknown **ppRowset)
856 {
857     IWineRowServer *rowset_server;
858     IMarshal *marshal;
859     IUnknown *obj = NULL;
860     HRESULT hr;
861
862     TRACE("(%p)->(%p, %s, %08lx, %ld, %p, %d, %p, %p, %ld, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid),
863           hAccessor, cParamSets, pGuid, ulGuidOffset, pInputParams, pOutputParams, cBindings, rgBindings, rgStatus,
864           pcRowsAffected, ppRowset);
865
866     *ppRowset = NULL;
867
868     hr = CoCreateInstance(&CLSID_wine_rowset_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&rowset_server);
869     if(FAILED(hr)) return hr;
870
871     IWineRowServer_GetMarshal(rowset_server, &marshal);
872
873     hr = ICommand_Execute(This, (IUnknown*)marshal, &IID_IUnknown, NULL, pcRowsAffected, &obj);
874
875     IMarshal_Release(marshal);
876
877     if(FAILED(hr))
878     {
879         IWineRowServer_Release(rowset_server);
880         return hr;
881     }
882
883     IWineRowServer_SetInnerUnk(rowset_server, obj);
884     hr = IUnknown_QueryInterface(obj, riid, (void**)ppRowset);
885     IUnknown_Release(obj);
886
887     return hr;
888 }
889
890 HRESULT CALLBACK ICommand_GetDBSession_Proxy(ICommand* This, REFIID riid, IUnknown **ppSession)
891 {
892     FIXME("(%p)->(%s, %p): stub\n", This, debugstr_guid(riid), ppSession);
893     return E_NOTIMPL;
894 }
895
896 HRESULT __RPC_STUB ICommand_GetDBSession_Stub(ICommand* This, REFIID riid, IUnknown **ppSession, IErrorInfo **ppErrorInfoRem)
897 {
898     FIXME("(%p)->(%s, %p, %p): stub\n", This, debugstr_guid(riid), ppSession, ppErrorInfoRem);
899     return E_NOTIMPL;
900 }
901
902 HRESULT CALLBACK ICommandText_GetCommandText_Proxy(ICommandText* This, GUID *pguidDialect, LPOLESTR *ppwszCommand)
903 {
904     FIXME("(%p)->(%p, %p): stub\n", This, pguidDialect, ppwszCommand);
905     return E_NOTIMPL;
906 }
907
908 HRESULT __RPC_STUB ICommandText_GetCommandText_Stub(ICommandText* This, GUID *pguidDialect,
909                                                     LPOLESTR *ppwszCommand, IErrorInfo **ppErrorInfoRem)
910 {
911     FIXME("(%p)->(%p, %p, %p): stub\n", This, pguidDialect, ppwszCommand, ppErrorInfoRem);
912     return E_NOTIMPL;
913 }
914
915 HRESULT CALLBACK ICommandText_SetCommandText_Proxy(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand)
916 {
917     HRESULT hr;
918     IErrorInfo *error;
919
920     TRACE("(%p)->(%s, %s)\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand));
921
922     hr = ICommandText_RemoteSetCommandText_Proxy(This, rguidDialect, pwszCommand, &error);
923     if(error)
924     {
925         SetErrorInfo(0, error);
926         IErrorInfo_Release(error);
927     }
928     return hr;
929 }
930
931 HRESULT __RPC_STUB ICommandText_SetCommandText_Stub(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand,
932                                                     IErrorInfo **ppErrorInfoRem)
933 {
934     HRESULT hr;
935
936     TRACE("(%p)->(%s, %s, %p)\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand),
937           ppErrorInfoRem);
938
939     *ppErrorInfoRem = NULL;
940     hr = ICommandText_SetCommandText(This, rguidDialect, pwszCommand);
941     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
942
943     return hr;
944 }
945
946 HRESULT CALLBACK IDBAsynchNotify_OnLowResource_Proxy(IDBAsynchNotify* This, DB_DWRESERVE dwReserved)
947 {
948     FIXME("(%p)->(%08lx): stub\n", This, dwReserved);
949     return E_NOTIMPL;
950 }
951
952 HRESULT __RPC_STUB IDBAsynchNotify_OnLowResource_Stub(IDBAsynchNotify* This, DB_DWRESERVE dwReserved)
953 {
954     FIXME("(%p)->(%08lx): stub\n", This, dwReserved);
955     return E_NOTIMPL;
956 }
957
958 HRESULT CALLBACK IDBAsynchNotify_OnProgress_Proxy(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
959                                                   DBCOUNTITEM ulProgress, DBCOUNTITEM ulProgressMax, DBASYNCHPHASE eAsynchPhase,
960                                                   LPOLESTR pwszStatusText)
961 {
962     TRACE("(%p)->(%lx, %d, %ld, %ld, %d, %s)\n", This, hChapter, eOperation, ulProgress, ulProgressMax,
963           eAsynchPhase, debugstr_w(pwszStatusText));
964
965     return IDBAsynchNotify_RemoteOnProgress_Proxy(This, hChapter, eOperation, ulProgress, ulProgressMax, eAsynchPhase,
966                                                   pwszStatusText);
967 }
968
969 HRESULT __RPC_STUB IDBAsynchNotify_OnProgress_Stub(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
970                                                    DBCOUNTITEM ulProgress, DBCOUNTITEM ulProgressMax, DBASYNCHPHASE eAsynchPhase,
971                                                    LPOLESTR pwszStatusText)
972 {
973     TRACE("(%p)->(%lx, %d, %ld, %ld, %d, %s)\n", This, hChapter, eOperation, ulProgress, ulProgressMax,
974           eAsynchPhase, debugstr_w(pwszStatusText));
975     return IDBAsynchNotify_OnProgress(This, hChapter, eOperation, ulProgress, ulProgressMax, eAsynchPhase,
976                                       pwszStatusText);
977 }
978
979 HRESULT CALLBACK IDBAsynchNotify_OnStop_Proxy(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
980                                               HRESULT hrStatus, LPOLESTR pwszStatusText)
981 {
982     TRACE("(%p)->(%lx, %d, %08x, %s)\n", This, hChapter, eOperation, hrStatus, debugstr_w(pwszStatusText));
983     return IDBAsynchNotify_RemoteOnStop_Proxy(This, hChapter, eOperation, hrStatus, pwszStatusText);
984 }
985
986 HRESULT __RPC_STUB IDBAsynchNotify_OnStop_Stub(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
987                                                HRESULT hrStatus, LPOLESTR pwszStatusText)
988 {
989     TRACE("(%p)->(%lx, %d, %08x, %s)\n", This, hChapter, eOperation, hrStatus, debugstr_w(pwszStatusText));
990     return IDBAsynchNotify_OnStop(This, hChapter, eOperation, hrStatus, pwszStatusText);
991 }
992
993 HRESULT CALLBACK IDBAsynchStatus_Abort_Proxy(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation)
994 {
995     FIXME("(%p)->(%lx, %d): stub\n", This, hChapter, eOperation);
996     return E_NOTIMPL;
997 }
998
999 HRESULT __RPC_STUB IDBAsynchStatus_Abort_Stub(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1000                                               IErrorInfo **ppErrorInfoRem)
1001 {
1002     FIXME("(%p)->(%lx, %d, %p): stub\n", This, hChapter, eOperation, ppErrorInfoRem);
1003     return E_NOTIMPL;
1004 }
1005
1006 HRESULT CALLBACK IDBAsynchStatus_GetStatus_Proxy(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1007                                                  DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase,
1008                                                  LPOLESTR *ppwszStatusText)
1009 {
1010     FIXME("(%p)->(%lx, %d, %p, %p, %p, %p): stub\n", This, hChapter, eOperation, pulProgress, pulProgressMax,
1011           peAsynchPhase, ppwszStatusText);
1012     return E_NOTIMPL;
1013 }
1014
1015 HRESULT __RPC_STUB IDBAsynchStatus_GetStatus_Stub(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1016                                                   DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase,
1017                                                   LPOLESTR *ppwszStatusText, IErrorInfo **ppErrorInfoRem)
1018 {
1019     FIXME("(%p)->(%lx, %d, %p, %p, %p, %p, %p): stub\n", This, hChapter, eOperation, pulProgress, pulProgressMax,
1020           peAsynchPhase, ppwszStatusText, ppErrorInfoRem);
1021     return E_NOTIMPL;
1022 }
1023
1024 HRESULT CALLBACK IRowsetNotify_OnRowChange_Proxy(IRowsetNotify* This, IRowset *rowset, DBCOUNTITEM rows, HROW *hrows, DBREASON reason,
1025                                                  DBEVENTPHASE phase, BOOL cantdeny)
1026 {
1027     TRACE("(%p)->(%p %ld %p %d %d %d)\n", This, rowset, rows, hrows, reason, phase, cantdeny);
1028     return IRowsetNotify_RemoteOnRowChange_Proxy(This, rowset, rows, hrows, reason, phase, cantdeny);
1029 }
1030
1031 HRESULT __RPC_STUB IRowsetNotify_OnRowChange_Stub(IRowsetNotify* This, IRowset *rowset, DBCOUNTITEM rows, HROW *hrows, DBREASON reason,
1032                                                   DBEVENTPHASE phase, BOOL cantdeny)
1033 {
1034     TRACE("(%p)->(%p %ld %p %d %d %d)\n", This, rowset, rows, hrows, reason, phase, cantdeny);
1035     return IRowsetNotify_OnRowChange(This, rowset, rows, hrows, reason, phase, cantdeny);
1036 }
1037
1038 HRESULT CALLBACK IRowsetNotify_OnFieldChange_Proxy(IRowsetNotify* This, IRowset *rowset, HROW row, DBORDINAL ccols, DBORDINAL *columns,
1039                                                    DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1040 {
1041     TRACE("(%p)->(%p %lx %ld %p %d %d %d)\n", This, rowset, row, ccols, columns, reason, phase, cantdeny);
1042     return IRowsetNotify_RemoteOnFieldChange_Proxy(This, rowset, row, ccols, columns, reason, phase, cantdeny);
1043 }
1044
1045 HRESULT __RPC_STUB IRowsetNotify_OnFieldChange_Stub(IRowsetNotify* This, IRowset *rowset, HROW row, DBORDINAL ccols, DBORDINAL *columns,
1046                                                     DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1047 {
1048     TRACE("(%p)->(%p %lx %ld %p %d %d %d)\n", This, rowset, row, ccols, columns, reason, phase, cantdeny);
1049     return IRowsetNotify_OnFieldChange(This, rowset, row, ccols, columns, reason, phase, cantdeny);
1050 }
1051
1052 HRESULT CALLBACK IRowsetNotify_OnRowsetChange_Proxy(IRowsetNotify* This, IRowset *rowset, DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1053 {
1054     TRACE("(%p)->(%p %d %d %d)\n", This, rowset, reason, phase, cantdeny);
1055     return IRowsetNotify_RemoteOnRowsetChange_Proxy(This, rowset, reason, phase, cantdeny);
1056 }
1057
1058 HRESULT __RPC_STUB IRowsetNotify_OnRowsetChange_Stub(IRowsetNotify* This, IRowset *rowset, DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1059 {
1060     TRACE("(%p)->(%p %d %d %d)\n", This, rowset, reason, phase, cantdeny);
1061     return IRowsetNotify_OnRowsetChange(This, rowset, reason, phase, cantdeny);
1062 }