ntdll: Use an __ms_va_list in sscanf (Clang).
[wine/multimedia.git] / dlls / msdaps / usrmarshal.c
blob1243e4804648c64fcafd6103c2ff377d16e1d836
1 /*
2 * Misc marshaling routines
4 * Copyright 2009 Huw Davies
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.
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.
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
20 #include <stdarg.h>
21 #include <string.h>
23 #define COBJMACROS
25 #include "windef.h"
26 #include "winbase.h"
27 #include "wingdi.h"
28 #include "winuser.h"
29 #include "winerror.h"
30 #include "objbase.h"
31 #include "oleauto.h"
32 #include "oledb.h"
34 #include "row_server.h"
36 #include "wine/debug.h"
38 WINE_DEFAULT_DEBUG_CHANNEL(oledb);
40 HRESULT CALLBACK IDBCreateCommand_CreateCommand_Proxy(IDBCreateCommand* This, IUnknown *pUnkOuter,
41 REFIID riid, IUnknown **ppCommand)
43 HRESULT hr;
44 IErrorInfo *error;
46 TRACE("(%p, %p, %s, %p)\n", This, pUnkOuter, debugstr_guid(riid), ppCommand);
47 hr = IDBCreateCommand_RemoteCreateCommand_Proxy(This, pUnkOuter, riid, ppCommand, &error);
48 if(error)
50 SetErrorInfo(0, error);
51 IErrorInfo_Release(error);
53 return hr;
56 HRESULT __RPC_STUB IDBCreateCommand_CreateCommand_Stub(IDBCreateCommand* This, IUnknown *pUnkOuter,
57 REFIID riid, IUnknown **ppCommand, IErrorInfo **ppErrorInfoRem)
59 HRESULT hr;
61 TRACE("(%p, %p, %s, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid), ppCommand, ppErrorInfoRem);
63 *ppErrorInfoRem = NULL;
64 hr = IDBCreateCommand_CreateCommand(This, pUnkOuter, riid, ppCommand);
65 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
67 return hr;
70 HRESULT CALLBACK IDBCreateSession_CreateSession_Proxy(IDBCreateSession* This, IUnknown *pUnkOuter,
71 REFIID riid, IUnknown **ppDBSession)
73 HRESULT hr;
74 IErrorInfo *error;
76 TRACE("(%p, %p, %s, %p)\n", This, pUnkOuter, debugstr_guid(riid), ppDBSession);
77 hr = IDBCreateSession_RemoteCreateSession_Proxy(This, pUnkOuter, riid, ppDBSession, &error);
78 if(error)
80 SetErrorInfo(0, error);
81 IErrorInfo_Release(error);
83 return hr;
86 HRESULT __RPC_STUB IDBCreateSession_CreateSession_Stub(IDBCreateSession* This, IUnknown *pUnkOuter,
87 REFIID riid, IUnknown **ppDBSession, IErrorInfo **ppErrorInfoRem)
89 HRESULT hr;
90 TRACE("(%p, %p, %s, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid),
91 ppDBSession, ppErrorInfoRem);
93 *ppErrorInfoRem = NULL;
94 hr = IDBCreateSession_CreateSession(This, pUnkOuter, riid, ppDBSession);
95 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
97 return hr;
100 HRESULT CALLBACK IDBProperties_GetProperties_Proxy(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
101 ULONG *pcPropertySets, DBPROPSET **prgPropertySets)
103 HRESULT hr;
104 IErrorInfo *error;
106 TRACE("(%p, %d, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets,
107 prgPropertySets);
108 hr = IDBProperties_RemoteGetProperties_Proxy(This, cPropertyIDSets, rgPropertyIDSets,
109 pcPropertySets, prgPropertySets, &error);
110 if(error)
112 SetErrorInfo(0, error);
113 IErrorInfo_Release(error);
115 return hr;
118 HRESULT __RPC_STUB IDBProperties_GetProperties_Stub(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
119 ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
121 HRESULT hr;
123 TRACE("(%p, %d, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets,
124 prgPropertySets, ppErrorInfoRem);
125 *pcPropertySets = 0;
126 *ppErrorInfoRem = NULL;
127 hr = IDBProperties_GetProperties(This, cPropertyIDSets, rgPropertyIDSets,
128 pcPropertySets, prgPropertySets);
129 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
131 return hr;
134 HRESULT CALLBACK IDBProperties_GetPropertyInfo_Proxy(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
135 ULONG *pcPropertyInfoSets, DBPROPINFOSET **prgPropertyInfoSets,
136 OLECHAR **ppDescBuffer)
138 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
139 prgPropertyInfoSets, ppDescBuffer);
140 return E_NOTIMPL;
143 HRESULT __RPC_STUB IDBProperties_GetPropertyInfo_Stub(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
144 ULONG *pcPropertyInfoSets, DBPROPINFOSET **prgPropertyInfoSets,
145 ULONG *pcOffsets, DBBYTEOFFSET **prgDescOffsets, ULONG *pcbDescBuffer,
146 OLECHAR **ppDescBuffer, IErrorInfo **ppErrorInfoRem)
148 FIXME("(%p, %d, %p, %p, %p, %p, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
149 prgPropertyInfoSets, pcOffsets, prgDescOffsets, pcbDescBuffer, ppDescBuffer, ppErrorInfoRem);
150 return E_NOTIMPL;
153 HRESULT CALLBACK IDBProperties_SetProperties_Proxy(IDBProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
155 ULONG prop_set, prop, total_props = 0;
156 HRESULT hr;
157 IErrorInfo *error;
158 DBPROPSTATUS *status;
160 TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
162 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
163 total_props += rgPropertySets[prop_set].cProperties;
165 if(total_props == 0) return S_OK;
167 status = CoTaskMemAlloc(total_props * sizeof(*status));
168 if(!status) return E_OUTOFMEMORY;
170 hr = IDBProperties_RemoteSetProperties_Proxy(This, cPropertySets, rgPropertySets,
171 total_props, status, &error);
172 if(error)
174 SetErrorInfo(0, error);
175 IErrorInfo_Release(error);
178 total_props = 0;
179 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
180 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
181 rgPropertySets[prop_set].rgProperties[prop].dwStatus = status[total_props++];
183 CoTaskMemFree(status);
184 return hr;
187 HRESULT __RPC_STUB IDBProperties_SetProperties_Stub(IDBProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
188 ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
190 ULONG prop_set, prop, total_props = 0;
191 HRESULT hr;
193 TRACE("(%p, %d, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, cTotalProps,
194 rgPropStatus, ppErrorInfoRem);
196 *ppErrorInfoRem = NULL;
197 hr = IDBProperties_SetProperties(This, cPropertySets, rgPropertySets);
198 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
200 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
201 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
202 rgPropStatus[total_props++] = rgPropertySets[prop_set].rgProperties[prop].dwStatus;
204 return hr;
207 HRESULT CALLBACK IDBInitialize_Initialize_Proxy(IDBInitialize* This)
209 HRESULT hr;
210 IErrorInfo *error;
212 TRACE("(%p)\n", This);
213 hr = IDBInitialize_RemoteInitialize_Proxy(This, &error);
214 if(error)
216 SetErrorInfo(0, error);
217 IErrorInfo_Release(error);
219 return hr;
222 HRESULT __RPC_STUB IDBInitialize_Initialize_Stub(IDBInitialize* This, IErrorInfo **ppErrorInfoRem)
224 HRESULT hr;
225 TRACE("(%p, %p)\n", This, ppErrorInfoRem);
227 *ppErrorInfoRem = NULL;
228 hr = IDBInitialize_Initialize(This);
229 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
231 return hr;
234 HRESULT CALLBACK IDBInitialize_Uninitialize_Proxy(IDBInitialize* This)
236 IErrorInfo *error;
237 HRESULT hr;
239 TRACE("(%p)\n", This);
240 hr = IDBInitialize_RemoteUninitialize_Proxy(This, &error);
241 if(error)
243 SetErrorInfo(0, error);
244 IErrorInfo_Release(error);
246 return hr;
249 HRESULT __RPC_STUB IDBInitialize_Uninitialize_Stub(IDBInitialize* This, IErrorInfo **error)
251 HRESULT hr;
253 TRACE("(%p, %p)\n", This, error);
254 *error = NULL;
255 hr = IDBInitialize_Uninitialize(This);
256 if(FAILED(hr)) GetErrorInfo(0, error);
258 return hr;
261 HRESULT CALLBACK IDBDataSourceAdmin_CreateDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets,
262 DBPROPSET rgPropertySets[], IUnknown *pUnkOuter,
263 REFIID riid, IUnknown **ppDBSession)
265 ULONG prop_set, prop, total_props = 0;
266 HRESULT hr;
267 IErrorInfo *error;
268 DBPROPSTATUS *status;
270 TRACE("(%p, %d, %p, %p, %s, %p)\n", This, cPropertySets, rgPropertySets, pUnkOuter,
271 debugstr_guid(riid), ppDBSession);
273 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
274 total_props += rgPropertySets[prop_set].cProperties;
276 if(total_props == 0) return S_OK;
278 status = CoTaskMemAlloc(total_props * sizeof(*status));
279 if(!status) return E_OUTOFMEMORY;
281 hr = IDBDataSourceAdmin_RemoteCreateDataSource_Proxy(This, cPropertySets, rgPropertySets, pUnkOuter,
282 riid, ppDBSession, total_props, status, &error);
283 if(error)
285 SetErrorInfo(0, error);
286 IErrorInfo_Release(error);
289 total_props = 0;
290 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
291 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
292 rgPropertySets[prop_set].rgProperties[prop].dwStatus = status[total_props++];
294 CoTaskMemFree(status);
295 return hr;
298 HRESULT __RPC_STUB IDBDataSourceAdmin_CreateDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
299 DBPROPSET *rgPropertySets, IUnknown *pUnkOuter,
300 REFIID riid, IUnknown **ppDBSession, ULONG cTotalProps,
301 DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
303 ULONG prop_set, prop, total_props = 0;
304 HRESULT hr;
306 TRACE("(%p, %d, %p, %p, %s, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, pUnkOuter,
307 debugstr_guid(riid), ppDBSession, cTotalProps, rgPropStatus, ppErrorInfoRem);
309 *ppErrorInfoRem = NULL;
310 hr = IDBDataSourceAdmin_CreateDataSource(This, cPropertySets, rgPropertySets, pUnkOuter, riid, ppDBSession);
311 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
313 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
314 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
315 rgPropStatus[total_props++] = rgPropertySets[prop_set].rgProperties[prop].dwStatus;
317 return hr;
320 HRESULT CALLBACK IDBDataSourceAdmin_DestroyDataSource_Proxy(IDBDataSourceAdmin* This)
322 IErrorInfo *error;
323 HRESULT hr;
325 TRACE("(%p)\n", This);
326 hr = IDBDataSourceAdmin_RemoteDestroyDataSource_Proxy(This, &error);
327 if(error)
329 SetErrorInfo(0, error);
330 IErrorInfo_Release(error);
332 return hr;
335 HRESULT __RPC_STUB IDBDataSourceAdmin_DestroyDataSource_Stub(IDBDataSourceAdmin* This, IErrorInfo **error)
337 HRESULT hr;
339 TRACE("(%p, %p)\n", This, error);
340 *error = NULL;
341 hr = IDBDataSourceAdmin_DestroyDataSource(This);
342 if(FAILED(hr)) GetErrorInfo(0, error);
344 return hr;
347 HRESULT CALLBACK IDBDataSourceAdmin_GetCreationProperties_Proxy(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
348 const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertyInfoSets,
349 DBPROPINFOSET **prgPropertyInfoSets, OLECHAR **ppDescBuffer)
351 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
352 prgPropertyInfoSets, ppDescBuffer);
353 return E_NOTIMPL;
356 HRESULT __RPC_STUB IDBDataSourceAdmin_GetCreationProperties_Stub(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
357 const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertyInfoSets,
358 DBPROPINFOSET **prgPropertyInfoSets, DBCOUNTITEM *pcOffsets,
359 DBBYTEOFFSET **prgDescOffsets, ULONG *pcbDescBuffer,
360 OLECHAR **ppDescBuffer, IErrorInfo **error)
362 HRESULT hr;
364 TRACE("(%p, %d, %p, %p, %p, %p, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
365 prgPropertyInfoSets, pcOffsets, prgDescOffsets, pcbDescBuffer, ppDescBuffer, error);
366 *error = NULL;
367 hr = IDBDataSourceAdmin_GetCreationProperties(This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
368 prgPropertyInfoSets, ppDescBuffer);
369 if(FAILED(hr)) GetErrorInfo(0, error);
371 return hr;
374 HRESULT CALLBACK IDBDataSourceAdmin_ModifyDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
376 IErrorInfo *error;
377 HRESULT hr;
379 TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
380 hr = IDBDataSourceAdmin_RemoteModifyDataSource_Proxy(This, cPropertySets, rgPropertySets, &error);
381 if(error)
383 SetErrorInfo(0, error);
384 IErrorInfo_Release(error);
387 return hr;
390 HRESULT __RPC_STUB IDBDataSourceAdmin_ModifyDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
391 DBPROPSET *rgPropertySets, IErrorInfo **error)
393 HRESULT hr;
395 TRACE("(%p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, error);
396 *error = NULL;
397 hr = IDBDataSourceAdmin_ModifyDataSource(This, cPropertySets, rgPropertySets);
398 if(FAILED(hr)) GetErrorInfo(0, error);
400 return hr;
403 HRESULT CALLBACK ISessionProperties_GetProperties_Proxy(ISessionProperties* This, ULONG cPropertyIDSets,
404 const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertySets,
405 DBPROPSET **prgPropertySets)
407 IErrorInfo *error;
408 HRESULT hr;
410 TRACE("(%p, %d, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets,
411 pcPropertySets, prgPropertySets);
413 hr = ISessionProperties_RemoteGetProperties_Proxy(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets,
414 prgPropertySets, &error);
415 if(error)
417 SetErrorInfo(0, error);
418 IErrorInfo_Release(error);
421 return hr;
424 HRESULT __RPC_STUB ISessionProperties_GetProperties_Stub(ISessionProperties* This, ULONG cPropertyIDSets,
425 const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertySets,
426 DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
428 HRESULT hr;
430 TRACE("(%p, %d, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets,
431 pcPropertySets, prgPropertySets, ppErrorInfoRem);
433 hr = ISessionProperties_GetProperties(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets);
434 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
436 return hr;
439 HRESULT CALLBACK ISessionProperties_SetProperties_Proxy(ISessionProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
441 ULONG prop_set, prop, total_props = 0;
442 HRESULT hr;
443 IErrorInfo *error;
444 DBPROPSTATUS *status;
446 TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
448 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
449 total_props += rgPropertySets[prop_set].cProperties;
451 if(total_props == 0) return S_OK;
453 status = CoTaskMemAlloc(total_props * sizeof(*status));
454 if(!status) return E_OUTOFMEMORY;
456 hr = ISessionProperties_RemoteSetProperties_Proxy(This, cPropertySets, rgPropertySets,
457 total_props, status, &error);
458 if(error)
460 SetErrorInfo(0, error);
461 IErrorInfo_Release(error);
464 total_props = 0;
465 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
466 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
467 rgPropertySets[prop_set].rgProperties[prop].dwStatus = status[total_props++];
469 CoTaskMemFree(status);
470 return hr;
473 HRESULT __RPC_STUB ISessionProperties_SetProperties_Stub(ISessionProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
474 ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
476 ULONG prop_set, prop, total_props = 0;
477 HRESULT hr;
479 TRACE("(%p, %d, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, cTotalProps,
480 rgPropStatus, ppErrorInfoRem);
482 *ppErrorInfoRem = NULL;
483 hr = ISessionProperties_SetProperties(This, cPropertySets, rgPropertySets);
484 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
486 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
487 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
488 rgPropStatus[total_props++] = rgPropertySets[prop_set].rgProperties[prop].dwStatus;
490 return hr;
493 HRESULT CALLBACK IOpenRowset_OpenRowset_Proxy(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
494 REFIID riid, ULONG cPropertySets, DBPROPSET rgPropertySets[], IUnknown **ppRowset)
496 FIXME("(%p, %p, %p, %p, %s, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
497 cPropertySets, rgPropertySets, ppRowset);
498 return E_NOTIMPL;
501 HRESULT __RPC_STUB IOpenRowset_OpenRowset_Stub(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
502 REFIID riid, ULONG cPropertySets, DBPROPSET *rgPropertySets,
503 IUnknown **ppRowset, ULONG cTotalProps, DBPROPSTATUS *rgPropStatus,
504 IErrorInfo **ppErrorInfoRem)
506 FIXME("(%p, %p, %p, %p, %s, %d, %p, %p, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
507 cPropertySets, rgPropertySets, ppRowset, cTotalProps, rgPropStatus, ppErrorInfoRem);
508 return E_NOTIMPL;
511 HRESULT CALLBACK IBindResource_Bind_Proxy(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
512 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
513 DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
515 HRESULT hr;
517 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
518 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppUnk);
520 if(pUnkOuter)
522 FIXME("Aggregation not supported\n");
523 return CLASS_E_NOAGGREGATION;
526 hr = IBindResource_RemoteBind_Proxy(This, pUnkOuter, pwszURL, dwBindURLFlags, rguid, riid, pAuthenticate,
527 pImplSession ? pImplSession->pUnkOuter : NULL, pImplSession ? pImplSession->piid : NULL,
528 pImplSession ? &pImplSession->pSession : NULL, pdwBindStatus, ppUnk);
529 return hr;
532 HRESULT __RPC_STUB IBindResource_Bind_Stub(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
533 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
534 IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
536 HRESULT hr;
537 DBIMPLICITSESSION impl_session;
538 IWineRowServer *server;
539 IMarshal *marshal;
540 IUnknown *obj;
542 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
543 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppUnk);
545 *ppUnk = NULL;
547 if(IsEqualGUID(rguid, &DBGUID_ROWSET))
548 hr = CoCreateInstance(&CLSID_wine_rowset_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&server);
549 else if(IsEqualGUID(rguid, &DBGUID_ROW))
550 hr = CoCreateInstance(&CLSID_wine_row_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&server);
551 else
553 hr = E_NOTIMPL;
554 FIXME("Unhandled object %s\n", debugstr_guid(rguid));
557 if(FAILED(hr)) return hr;
559 impl_session.pUnkOuter = pSessionUnkOuter;
560 impl_session.piid = piid;
561 impl_session.pSession = NULL;
563 IWineRowServer_GetMarshal(server, &marshal);
565 hr = IBindResource_Bind(This, (IUnknown*)marshal, pwszURL, dwBindURLFlags, rguid, &IID_IUnknown, pAuthenticate,
566 ppSession ? &impl_session : NULL, pdwBindStatus, &obj);
568 IMarshal_Release(marshal);
569 if(FAILED(hr))
571 IWineRowServer_Release(server);
572 return hr;
575 IWineRowServer_SetInnerUnk(server, obj);
576 hr = IUnknown_QueryInterface(obj, riid, (void**)ppUnk);
577 IUnknown_Release(obj);
579 if(ppSession) *ppSession = impl_session.pSession;
580 return hr;
583 HRESULT CALLBACK ICreateRow_CreateRow_Proxy(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
584 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
585 DBBINDURLSTATUS *pdwBindStatus, LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
587 HRESULT hr;
589 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
590 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppwszNewURL, ppUnk);
592 if(pUnkOuter)
594 FIXME("Aggregation not supported\n");
595 return CLASS_E_NOAGGREGATION;
598 hr = ICreateRow_RemoteCreateRow_Proxy(This, pUnkOuter, pwszURL, dwBindURLFlags, rguid, riid, pAuthenticate,
599 pImplSession ? pImplSession->pUnkOuter : NULL, pImplSession ? pImplSession->piid : NULL,
600 pImplSession ? &pImplSession->pSession : NULL, pdwBindStatus, ppwszNewURL, ppUnk);
601 return hr;
604 HRESULT __RPC_STUB ICreateRow_CreateRow_Stub(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
605 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
606 IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus,
607 LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
609 HRESULT hr;
610 DBIMPLICITSESSION impl_session;
611 IWineRowServer *row_server;
612 IMarshal *marshal;
613 IUnknown *obj;
615 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
616 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppwszNewURL,
617 ppUnk);
619 *ppUnk = NULL;
621 hr = CoCreateInstance(&CLSID_wine_row_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&row_server);
622 if(FAILED(hr)) return hr;
624 impl_session.pUnkOuter = pSessionUnkOuter;
625 impl_session.piid = piid;
626 impl_session.pSession = NULL;
628 IWineRowServer_GetMarshal(row_server, &marshal);
630 hr = ICreateRow_CreateRow(This, (IUnknown*) marshal, pwszURL, dwBindURLFlags, rguid, &IID_IUnknown, pAuthenticate,
631 ppSession ? &impl_session : NULL, pdwBindStatus, ppwszNewURL, &obj);
632 IMarshal_Release(marshal);
634 if(FAILED(hr))
636 IWineRowServer_Release(row_server);
637 return hr;
640 IWineRowServer_SetInnerUnk(row_server, obj);
641 hr = IUnknown_QueryInterface(obj, riid, (void**)ppUnk);
642 IUnknown_Release(obj);
644 if(ppSession) *ppSession = impl_session.pSession;
645 return hr;
648 HRESULT CALLBACK IAccessor_AddRefAccessor_Proxy(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount)
650 FIXME("(%p)->(%08lx, %p): stub\n", This, hAccessor, pcRefCount);
651 return E_NOTIMPL;
654 HRESULT __RPC_STUB IAccessor_AddRefAccessor_Stub(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount,
655 IErrorInfo **ppErrorInfoRem)
657 FIXME("(%p)->(%08lx, %p, %p): stub\n", This, hAccessor, pcRefCount, ppErrorInfoRem);
658 return E_NOTIMPL;
661 HRESULT CALLBACK IAccessor_CreateAccessor_Proxy(IAccessor* This, DBACCESSORFLAGS dwAccessorFlags, DBCOUNTITEM cBindings,
662 const DBBINDING rgBindings[], DBLENGTH cbRowSize, HACCESSOR *phAccessor,
663 DBBINDSTATUS rgStatus[])
665 HRESULT hr;
666 IErrorInfo *error;
667 DBCOUNTITEM i;
669 TRACE("(%p)->(%08x, %ld, %p, %ld, %p, %p)\n", This, dwAccessorFlags, cBindings, rgBindings,
670 cbRowSize, phAccessor, rgStatus);
672 for(i = 0; i < cBindings; i++)
674 TRACE("%ld: ord %ld val off %ld len off %ld stat off %ld part %04x mem_owner %d max_len %ld type %04x\n",
675 i, rgBindings[i].iOrdinal, rgBindings[i].obValue, rgBindings[i].obLength, rgBindings[i].obStatus,
676 rgBindings[i].dwPart, rgBindings[i].dwMemOwner, rgBindings[i].cbMaxLen, rgBindings[i].wType);
679 hr = IAccessor_RemoteCreateAccessor_Proxy(This, dwAccessorFlags, cBindings, (DBBINDING *)rgBindings,
680 cbRowSize, phAccessor, rgStatus, &error);
681 if(error)
683 SetErrorInfo(0, error);
684 IErrorInfo_Release(error);
687 TRACE("returning %08x accessor %lx\n", hr, *phAccessor);
688 return hr;
691 HRESULT __RPC_STUB IAccessor_CreateAccessor_Stub(IAccessor* This, DBACCESSORFLAGS dwAccessorFlags, DBCOUNTITEM cBindings,
692 DBBINDING *rgBindings, DBLENGTH cbRowSize, HACCESSOR *phAccessor,
693 DBBINDSTATUS *rgStatus, IErrorInfo **ppErrorInfoRem)
695 HRESULT hr;
697 TRACE("(%p)->(%08x, %ld, %p, %ld, %p, %p, %p)\n", This, dwAccessorFlags, cBindings, rgBindings,
698 cbRowSize, phAccessor, rgStatus, ppErrorInfoRem);
700 *ppErrorInfoRem = NULL;
701 hr = IAccessor_CreateAccessor(This, dwAccessorFlags, cBindings, rgBindings,
702 cbRowSize, phAccessor, rgStatus);
703 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
705 return hr;
708 HRESULT CALLBACK IAccessor_GetBindings_Proxy(IAccessor* This, HACCESSOR hAccessor, DBACCESSORFLAGS *pdwAccessorFlags,
709 DBCOUNTITEM *pcBindings, DBBINDING **prgBindings)
711 FIXME("(%p): stub\n", This);
712 return E_NOTIMPL;
715 HRESULT __RPC_STUB IAccessor_GetBindings_Stub(IAccessor* This, HACCESSOR hAccessor, DBACCESSORFLAGS *pdwAccessorFlags,
716 DBCOUNTITEM *pcBindings, DBBINDING **prgBindings, IErrorInfo **ppErrorInfoRem)
718 FIXME("(%p): stub\n", This);
719 return E_NOTIMPL;
722 HRESULT CALLBACK IAccessor_ReleaseAccessor_Proxy(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount)
724 HRESULT hr;
725 IErrorInfo *error;
726 DBREFCOUNT ref;
728 TRACE("(%p)->(%lx, %p)\n", This, hAccessor, pcRefCount);
730 hr = IAccessor_RemoteReleaseAccessor_Proxy(This, hAccessor, &ref, &error);
732 if(pcRefCount) *pcRefCount = ref;
733 if(error)
735 SetErrorInfo(0, error);
736 IErrorInfo_Release(error);
738 return hr;
741 HRESULT __RPC_STUB IAccessor_ReleaseAccessor_Stub(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount,
742 IErrorInfo **ppErrorInfoRem)
744 HRESULT hr;
746 TRACE("(%p)->(%lx, %p, %p)\n", This, hAccessor, pcRefCount, ppErrorInfoRem);
748 *ppErrorInfoRem = NULL;
750 hr = IAccessor_ReleaseAccessor(This, hAccessor, pcRefCount);
752 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
753 return hr;
756 HRESULT CALLBACK IRowsetInfo_GetProperties_Proxy(IRowsetInfo* This, const ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
757 ULONG *pcPropertySets, DBPROPSET **prgPropertySets)
759 HRESULT hr;
760 IErrorInfo *error;
761 ULONG i;
763 TRACE("(%p)->(%d, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets);
765 for(i = 0; i < cPropertyIDSets; i++)
767 unsigned int j;
768 TRACE("%d: %s %d props\n", i, debugstr_guid(&rgPropertyIDSets[i].guidPropertySet), rgPropertyIDSets[i].cPropertyIDs);
769 for(j = 0; j < rgPropertyIDSets[i].cPropertyIDs; j++)
770 TRACE("\t%u: prop id %d\n", j, rgPropertyIDSets[i].rgPropertyIDs[j]);
773 hr = IRowsetInfo_RemoteGetProperties_Proxy(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, &error);
775 if(error)
777 SetErrorInfo(0, error);
778 IErrorInfo_Release(error);
780 return hr;
783 HRESULT __RPC_STUB IRowsetInfo_GetProperties_Stub(IRowsetInfo* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
784 ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
786 HRESULT hr;
788 TRACE("(%p)->(%d, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, ppErrorInfoRem);
790 *ppErrorInfoRem = NULL;
792 hr = IRowsetInfo_GetProperties(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets);
793 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
794 TRACE("returning %08x\n", hr);
795 return hr;
798 HRESULT CALLBACK IRowsetInfo_GetReferencedRowset_Proxy(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset)
800 IErrorInfo *error;
801 HRESULT hr;
803 TRACE("(%p)->(%ld, %s, %p)\n", This, iOrdinal, debugstr_guid(riid), ppReferencedRowset);
805 hr = IRowsetInfo_RemoteGetReferencedRowset_Proxy(This, iOrdinal, riid, ppReferencedRowset, &error);
806 if(error)
808 SetErrorInfo(0, error);
809 IErrorInfo_Release(error);
812 return hr;
815 HRESULT __RPC_STUB IRowsetInfo_GetReferencedRowset_Stub(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset,
816 IErrorInfo **ppErrorInfoRem)
818 HRESULT hr;
820 TRACE("(%p)->(%ld, %s, %p, %p)\n", This, iOrdinal, debugstr_guid(riid), ppReferencedRowset, ppErrorInfoRem);
822 hr = IRowsetInfo_GetReferencedRowset(This, iOrdinal, riid, ppReferencedRowset);
823 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
825 return hr;
828 HRESULT CALLBACK IRowsetInfo_GetSpecification_Proxy(IRowsetInfo* This, REFIID riid, IUnknown **ppSpecification)
830 IErrorInfo *error;
831 HRESULT hr;
833 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppSpecification);
835 hr = IRowsetInfo_RemoteGetSpecification_Proxy(This, riid, ppSpecification, &error);
836 if(error)
838 SetErrorInfo(0, error);
839 IErrorInfo_Release(error);
842 return hr;
845 HRESULT __RPC_STUB IRowsetInfo_GetSpecification_Stub(IRowsetInfo* This, REFIID riid, IUnknown **ppSpecification, IErrorInfo **ppErrorInfoRem)
847 HRESULT hr;
849 TRACE("(%p)->(%s, %p, %p)\n", This, debugstr_guid(riid), ppSpecification, ppErrorInfoRem);
851 hr = IRowsetInfo_GetSpecification(This, riid, ppSpecification);
852 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
854 return hr;
857 HRESULT CALLBACK ICommand_Cancel_Proxy(ICommand* This)
859 IErrorInfo *error;
860 HRESULT hr;
862 TRACE("(%p)\n", This);
864 hr = ICommand_RemoteCancel_Proxy(This, &error);
865 if(error)
867 SetErrorInfo(0, error);
868 IErrorInfo_Release(error);
871 return hr;
874 HRESULT __RPC_STUB ICommand_Cancel_Stub(ICommand* This, IErrorInfo **ppErrorInfoRem)
876 HRESULT hr;
878 TRACE("(%p)->(%p)\n", This, ppErrorInfoRem);
880 hr = ICommand_Cancel(This);
881 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
883 return hr;
886 HRESULT CALLBACK ICommand_Execute_Proxy(ICommand* This, IUnknown *pUnkOuter, REFIID riid,
887 DBPARAMS *pParams, DBROWCOUNT *pcRowsAffected, IUnknown **ppRowset)
889 HRESULT hr;
890 DBROWCOUNT affected;
892 *ppRowset = NULL;
894 TRACE("(%p)->(%p, %s, %p, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid), pParams,
895 pcRowsAffected, ppRowset);
897 if(pParams)
899 FIXME("Unhandled params {%p, %ld, %08lx}\n", pParams->pData, pParams->cParamSets, pParams->hAccessor);
900 return E_NOTIMPL;
903 if(pUnkOuter)
905 FIXME("Aggregation not supported\n");
906 return CLASS_E_NOAGGREGATION;
909 hr = ICommand_RemoteExecute_Proxy(This, pUnkOuter, riid, 0, 0, NULL, 0, NULL, NULL, 0, NULL, NULL, &affected,
910 ppRowset);
912 TRACE("Execute returns %08x\n", hr);
914 if(pcRowsAffected) *pcRowsAffected = affected;
916 return hr;
919 HRESULT __RPC_STUB ICommand_Execute_Stub(ICommand* This, IUnknown *pUnkOuter, REFIID riid, HACCESSOR hAccessor,
920 DB_UPARAMS cParamSets, GUID *pGuid, ULONG ulGuidOffset, RMTPACK *pInputParams,
921 RMTPACK *pOutputParams, DBCOUNTITEM cBindings, DBBINDING *rgBindings,
922 DBSTATUS *rgStatus, DBROWCOUNT *pcRowsAffected, IUnknown **ppRowset)
924 IWineRowServer *rowset_server;
925 IMarshal *marshal;
926 IUnknown *obj = NULL;
927 HRESULT hr;
929 TRACE("(%p)->(%p, %s, %08lx, %ld, %p, %d, %p, %p, %ld, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid),
930 hAccessor, cParamSets, pGuid, ulGuidOffset, pInputParams, pOutputParams, cBindings, rgBindings, rgStatus,
931 pcRowsAffected, ppRowset);
933 *ppRowset = NULL;
935 hr = CoCreateInstance(&CLSID_wine_rowset_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&rowset_server);
936 if(FAILED(hr)) return hr;
938 IWineRowServer_GetMarshal(rowset_server, &marshal);
940 hr = ICommand_Execute(This, (IUnknown*)marshal, &IID_IUnknown, NULL, pcRowsAffected, &obj);
942 IMarshal_Release(marshal);
944 if(FAILED(hr))
946 IWineRowServer_Release(rowset_server);
947 return hr;
950 IWineRowServer_SetInnerUnk(rowset_server, obj);
951 hr = IUnknown_QueryInterface(obj, riid, (void**)ppRowset);
952 IUnknown_Release(obj);
954 return hr;
957 HRESULT CALLBACK ICommand_GetDBSession_Proxy(ICommand* This, REFIID riid, IUnknown **ppSession)
959 IErrorInfo *error;
960 HRESULT hr;
962 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppSession);
964 hr = ICommand_RemoteGetDBSession_Proxy(This, riid, ppSession, &error);
965 if(error)
967 SetErrorInfo(0, error);
968 IErrorInfo_Release(error);
971 return hr;
974 HRESULT __RPC_STUB ICommand_GetDBSession_Stub(ICommand* This, REFIID riid, IUnknown **ppSession, IErrorInfo **ppErrorInfoRem)
976 HRESULT hr;
978 TRACE("(%p)->(%s, %p, %p)\n", This, debugstr_guid(riid), ppSession, ppErrorInfoRem);
980 hr = ICommand_GetDBSession(This, riid, ppSession);
981 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
983 return hr;
986 HRESULT CALLBACK ICommandText_GetCommandText_Proxy(ICommandText* This, GUID *pguidDialect, LPOLESTR *ppwszCommand)
988 IErrorInfo *error;
989 HRESULT hr;
991 TRACE("(%p)->(%p, %p)\n", This, pguidDialect, ppwszCommand);
993 hr = ICommandText_RemoteGetCommandText_Proxy(This, pguidDialect, ppwszCommand, &error);
994 if(error)
996 SetErrorInfo(0, error);
997 IErrorInfo_Release(error);
1000 return hr;
1003 HRESULT __RPC_STUB ICommandText_GetCommandText_Stub(ICommandText* This, GUID *pguidDialect,
1004 LPOLESTR *ppwszCommand, IErrorInfo **ppErrorInfoRem)
1006 HRESULT hr;
1008 TRACE("(%p)->(%p, %p, %p)\n", This, pguidDialect, ppwszCommand, ppErrorInfoRem);
1010 hr = ICommandText_GetCommandText(This, pguidDialect, ppwszCommand);
1011 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
1013 return hr;
1016 HRESULT CALLBACK ICommandText_SetCommandText_Proxy(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand)
1018 HRESULT hr;
1019 IErrorInfo *error;
1021 TRACE("(%p)->(%s, %s)\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand));
1023 hr = ICommandText_RemoteSetCommandText_Proxy(This, rguidDialect, pwszCommand, &error);
1024 if(error)
1026 SetErrorInfo(0, error);
1027 IErrorInfo_Release(error);
1029 return hr;
1032 HRESULT __RPC_STUB ICommandText_SetCommandText_Stub(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand,
1033 IErrorInfo **ppErrorInfoRem)
1035 HRESULT hr;
1037 TRACE("(%p)->(%s, %s, %p)\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand),
1038 ppErrorInfoRem);
1040 *ppErrorInfoRem = NULL;
1041 hr = ICommandText_SetCommandText(This, rguidDialect, pwszCommand);
1042 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
1044 return hr;
1047 HRESULT CALLBACK IDBAsynchNotify_OnLowResource_Proxy(IDBAsynchNotify* This, DB_DWRESERVE dwReserved)
1049 TRACE("(%p)->(%08lx)\n", This, dwReserved);
1050 return IDBAsynchNotify_RemoteOnLowResource_Proxy(This, dwReserved);
1053 HRESULT __RPC_STUB IDBAsynchNotify_OnLowResource_Stub(IDBAsynchNotify* This, DB_DWRESERVE dwReserved)
1055 TRACE("(%p)->(%08lx)\n", This, dwReserved);
1056 return IDBAsynchNotify_OnLowResource(This, dwReserved);
1059 HRESULT CALLBACK IDBAsynchNotify_OnProgress_Proxy(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1060 DBCOUNTITEM ulProgress, DBCOUNTITEM ulProgressMax, DBASYNCHPHASE eAsynchPhase,
1061 LPOLESTR pwszStatusText)
1063 TRACE("(%p)->(%lx, %d, %ld, %ld, %d, %s)\n", This, hChapter, eOperation, ulProgress, ulProgressMax,
1064 eAsynchPhase, debugstr_w(pwszStatusText));
1066 return IDBAsynchNotify_RemoteOnProgress_Proxy(This, hChapter, eOperation, ulProgress, ulProgressMax, eAsynchPhase,
1067 pwszStatusText);
1070 HRESULT __RPC_STUB IDBAsynchNotify_OnProgress_Stub(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1071 DBCOUNTITEM ulProgress, DBCOUNTITEM ulProgressMax, DBASYNCHPHASE eAsynchPhase,
1072 LPOLESTR pwszStatusText)
1074 TRACE("(%p)->(%lx, %d, %ld, %ld, %d, %s)\n", This, hChapter, eOperation, ulProgress, ulProgressMax,
1075 eAsynchPhase, debugstr_w(pwszStatusText));
1076 return IDBAsynchNotify_OnProgress(This, hChapter, eOperation, ulProgress, ulProgressMax, eAsynchPhase,
1077 pwszStatusText);
1080 HRESULT CALLBACK IDBAsynchNotify_OnStop_Proxy(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1081 HRESULT hrStatus, LPOLESTR pwszStatusText)
1083 TRACE("(%p)->(%lx, %d, %08x, %s)\n", This, hChapter, eOperation, hrStatus, debugstr_w(pwszStatusText));
1084 return IDBAsynchNotify_RemoteOnStop_Proxy(This, hChapter, eOperation, hrStatus, pwszStatusText);
1087 HRESULT __RPC_STUB IDBAsynchNotify_OnStop_Stub(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1088 HRESULT hrStatus, LPOLESTR pwszStatusText)
1090 TRACE("(%p)->(%lx, %d, %08x, %s)\n", This, hChapter, eOperation, hrStatus, debugstr_w(pwszStatusText));
1091 return IDBAsynchNotify_OnStop(This, hChapter, eOperation, hrStatus, pwszStatusText);
1094 HRESULT CALLBACK IDBAsynchStatus_Abort_Proxy(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation)
1096 IErrorInfo *error;
1097 HRESULT hr;
1099 TRACE("(%p)->(%lx, %d)\n", This, hChapter, eOperation);
1101 hr = IDBAsynchStatus_RemoteAbort_Proxy(This, hChapter, eOperation, &error);
1102 if(error)
1104 SetErrorInfo(0, error);
1105 IErrorInfo_Release(error);
1107 return hr;
1110 HRESULT __RPC_STUB IDBAsynchStatus_Abort_Stub(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1111 IErrorInfo **ppErrorInfoRem)
1113 HRESULT hr;
1115 TRACE("(%p)->(%lx, %d, %p)\n", This, hChapter, eOperation, ppErrorInfoRem);
1117 *ppErrorInfoRem = NULL;
1118 hr = IDBAsynchStatus_Abort(This, hChapter, eOperation);
1119 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
1121 return hr;
1124 HRESULT CALLBACK IDBAsynchStatus_GetStatus_Proxy(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1125 DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase,
1126 LPOLESTR *ppwszStatusText)
1128 IErrorInfo *error;
1129 HRESULT hr;
1131 TRACE("(%p)->(%lx, %d, %p, %p, %p, %p)\n", This, hChapter, eOperation, pulProgress, pulProgressMax,
1132 peAsynchPhase, ppwszStatusText);
1134 hr = IDBAsynchStatus_RemoteGetStatus_Proxy(This, hChapter, eOperation, pulProgress, pulProgressMax, peAsynchPhase,
1135 ppwszStatusText, &error);
1136 if(error)
1138 SetErrorInfo(0, error);
1139 IErrorInfo_Release(error);
1141 return hr;
1144 HRESULT __RPC_STUB IDBAsynchStatus_GetStatus_Stub(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1145 DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase,
1146 LPOLESTR *ppwszStatusText, IErrorInfo **ppErrorInfoRem)
1148 HRESULT hr;
1150 TRACE("(%p)->(%lx, %d, %p, %p, %p, %p, %p)\n", This, hChapter, eOperation, pulProgress, pulProgressMax,
1151 peAsynchPhase, ppwszStatusText, ppErrorInfoRem);
1153 *ppErrorInfoRem = NULL;
1154 hr = IDBAsynchStatus_GetStatus(This, hChapter, eOperation, pulProgress, pulProgressMax, peAsynchPhase, ppwszStatusText);
1155 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
1157 return hr;
1160 HRESULT CALLBACK IRowsetNotify_OnRowChange_Proxy(IRowsetNotify* This, IRowset *rowset, DBCOUNTITEM rows, HROW *hrows, DBREASON reason,
1161 DBEVENTPHASE phase, BOOL cantdeny)
1163 TRACE("(%p)->(%p %ld %p %d %d %d)\n", This, rowset, rows, hrows, reason, phase, cantdeny);
1164 return IRowsetNotify_RemoteOnRowChange_Proxy(This, rowset, rows, hrows, reason, phase, cantdeny);
1167 HRESULT __RPC_STUB IRowsetNotify_OnRowChange_Stub(IRowsetNotify* This, IRowset *rowset, DBCOUNTITEM rows, HROW *hrows, DBREASON reason,
1168 DBEVENTPHASE phase, BOOL cantdeny)
1170 TRACE("(%p)->(%p %ld %p %d %d %d)\n", This, rowset, rows, hrows, reason, phase, cantdeny);
1171 return IRowsetNotify_OnRowChange(This, rowset, rows, hrows, reason, phase, cantdeny);
1174 HRESULT CALLBACK IRowsetNotify_OnFieldChange_Proxy(IRowsetNotify* This, IRowset *rowset, HROW row, DBORDINAL ccols, DBORDINAL *columns,
1175 DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1177 TRACE("(%p)->(%p %lx %ld %p %d %d %d)\n", This, rowset, row, ccols, columns, reason, phase, cantdeny);
1178 return IRowsetNotify_RemoteOnFieldChange_Proxy(This, rowset, row, ccols, columns, reason, phase, cantdeny);
1181 HRESULT __RPC_STUB IRowsetNotify_OnFieldChange_Stub(IRowsetNotify* This, IRowset *rowset, HROW row, DBORDINAL ccols, DBORDINAL *columns,
1182 DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1184 TRACE("(%p)->(%p %lx %ld %p %d %d %d)\n", This, rowset, row, ccols, columns, reason, phase, cantdeny);
1185 return IRowsetNotify_OnFieldChange(This, rowset, row, ccols, columns, reason, phase, cantdeny);
1188 HRESULT CALLBACK IRowsetNotify_OnRowsetChange_Proxy(IRowsetNotify* This, IRowset *rowset, DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1190 TRACE("(%p)->(%p %d %d %d)\n", This, rowset, reason, phase, cantdeny);
1191 return IRowsetNotify_RemoteOnRowsetChange_Proxy(This, rowset, reason, phase, cantdeny);
1194 HRESULT __RPC_STUB IRowsetNotify_OnRowsetChange_Stub(IRowsetNotify* This, IRowset *rowset, DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1196 TRACE("(%p)->(%p %d %d %d)\n", This, rowset, reason, phase, cantdeny);
1197 return IRowsetNotify_OnRowsetChange(This, rowset, reason, phase, cantdeny);
1201 HRESULT CALLBACK ISourcesRowset_GetSourcesRowset_Proxy(ISourcesRowset* This, IUnknown *pUnkOuter, REFIID riid, ULONG cPropertySets,
1202 DBPROPSET rgProperties[], IUnknown **ppSourcesRowset)
1204 HRESULT hr;
1205 IErrorInfo *error;
1207 TRACE("(%p)->(%p %s %d %p %p)\n", This, pUnkOuter, debugstr_guid(riid), cPropertySets, rgProperties, ppSourcesRowset);
1209 hr = ISourcesRowset_RemoteGetSourcesRowset_Proxy(This, pUnkOuter, riid, cPropertySets, rgProperties, ppSourcesRowset, 0, NULL, &error);
1210 if(error)
1212 SetErrorInfo(0, error);
1213 IErrorInfo_Release(error);
1216 return hr;
1219 HRESULT __RPC_STUB ISourcesRowset_GetSourcesRowset_Stub(ISourcesRowset* This, IUnknown *pUnkOuter, REFIID riid, ULONG cPropertySets,
1220 DBPROPSET *rgProperties, IUnknown **ppSourcesRowset, ULONG cTotalProps, DBPROPSTATUS *rgPropStatus,
1221 IErrorInfo **ppErrorInfoRem)
1223 HRESULT hr;
1225 TRACE("(%p)->(%p %s %d %p %p %d %p %p)\n", This, pUnkOuter, debugstr_guid(riid), cPropertySets, rgProperties, ppSourcesRowset,
1226 cTotalProps, rgPropStatus, ppErrorInfoRem);
1228 *ppErrorInfoRem = NULL;
1229 hr = ISourcesRowset_GetSourcesRowset(This, pUnkOuter, riid, cPropertySets, rgProperties, ppSourcesRowset);
1230 if(FAILED(hr))
1231 GetErrorInfo(0, ppErrorInfoRem);
1233 return hr;
1236 HRESULT CALLBACK IErrorRecords_GetRecordCount_Proxy(IErrorRecords* This, ULONG *records)
1238 HRESULT hr;
1239 IErrorInfo *error;
1241 TRACE("(%p)->%p\n", This, records);
1243 hr = IErrorRecords_RemoteGetRecordCount_Proxy(This, records, &error);
1244 if(error)
1246 SetErrorInfo(0, error);
1247 IErrorInfo_Release(error);
1250 return hr;
1253 HRESULT __RPC_STUB IErrorRecords_GetRecordCount_Stub(IErrorRecords* This, ULONG *pcRecords, IErrorInfo **ppErrorInfoRem)
1255 HRESULT hr;
1257 TRACE("(%p)->%p %p\n", This, pcRecords, ppErrorInfoRem);
1259 *ppErrorInfoRem = NULL;
1260 hr = IErrorRecords_GetRecordCount(This, pcRecords);
1261 if(FAILED(hr))
1262 GetErrorInfo(0, ppErrorInfoRem);
1264 return hr;
1267 HRESULT CALLBACK IErrorRecords_GetErrorParameters_Proxy(IErrorRecords* This, ULONG ulRecordNum, DISPPARAMS *pdispparams)
1269 HRESULT hr;
1270 IErrorInfo *error;
1272 TRACE("(%p)->%d %p\n", This, ulRecordNum, pdispparams);
1274 hr = IErrorRecords_RemoteGetErrorParameters_Proxy(This, ulRecordNum, pdispparams, &error);
1275 if(error)
1277 SetErrorInfo(0, error);
1278 IErrorInfo_Release(error);
1281 return hr;
1284 HRESULT __RPC_STUB IErrorRecords_GetErrorParameters_Stub(IErrorRecords* This, ULONG ulRecordNum, DISPPARAMS *pdispparams,
1285 IErrorInfo **ppErrorInfoRem)
1287 HRESULT hr;
1289 TRACE("(%p)->%d %p %p\n", This, ulRecordNum, pdispparams, ppErrorInfoRem);
1291 *ppErrorInfoRem = NULL;
1292 hr = IErrorRecords_GetErrorParameters(This, ulRecordNum, pdispparams);
1293 if(FAILED(hr))
1294 GetErrorInfo(0, ppErrorInfoRem);
1296 return hr;
1299 HRESULT CALLBACK IErrorRecords_GetErrorInfo_Proxy(IErrorRecords* This, ULONG ulRecordNum, LCID lcid, IErrorInfo **ppErrorInfo)
1301 HRESULT hr;
1302 IErrorInfo *error;
1304 TRACE("(%p)->%d %d %p\n", This, ulRecordNum, lcid, ppErrorInfo);
1306 hr = IErrorRecords_RemoteGetErrorInfo_Proxy(This, ulRecordNum, lcid, ppErrorInfo, &error);
1307 if(error)
1309 SetErrorInfo(0, error);
1310 IErrorInfo_Release(error);
1313 return hr;
1316 HRESULT __RPC_STUB IErrorRecords_GetErrorInfo_Stub(IErrorRecords* This, ULONG ulRecordNum, LCID lcid,
1317 IErrorInfo **ppErrorInfo, IErrorInfo **ppErrorInfoRem)
1319 HRESULT hr;
1321 TRACE("(%p)->%d %d %p %p\n", This, ulRecordNum, lcid, ppErrorInfo, ppErrorInfoRem);
1323 *ppErrorInfoRem = NULL;
1324 hr = IErrorRecords_GetErrorInfo(This, ulRecordNum, lcid, ppErrorInfo);
1325 if(FAILED(hr))
1326 GetErrorInfo(0, ppErrorInfoRem);
1328 return hr;
1331 HRESULT CALLBACK IErrorRecords_GetCustomErrorObject_Proxy(IErrorRecords* This, ULONG ulRecordNum, REFIID riid,
1332 IUnknown **ppObject)
1334 HRESULT hr;
1335 IErrorInfo *error;
1337 TRACE("(%p)->%d %s %p\n", This, ulRecordNum, debugstr_guid(riid), ppObject);
1339 hr = IErrorRecords_RemoteGetCustomErrorObject_Proxy(This, ulRecordNum, riid, ppObject, &error);
1340 if(error)
1342 SetErrorInfo(0, error);
1343 IErrorInfo_Release(error);
1345 return hr;
1348 HRESULT __RPC_STUB IErrorRecords_GetCustomErrorObject_Stub(IErrorRecords* This, ULONG ulRecordNum, REFIID riid,
1349 IUnknown **ppObject, IErrorInfo **ppErrorInfoRem)
1351 HRESULT hr;
1353 TRACE("(%p)->%d %s %p %p\n", This, ulRecordNum, debugstr_guid(riid), ppObject, ppErrorInfoRem);
1355 *ppErrorInfoRem = NULL;
1356 hr = IErrorRecords_GetCustomErrorObject(This, ulRecordNum, riid, ppObject);
1357 if(FAILED(hr))
1358 GetErrorInfo(0, ppErrorInfoRem);
1360 return hr;
1363 HRESULT CALLBACK IErrorRecords_GetBasicErrorInfo_Proxy(IErrorRecords* This, ULONG ulRecordNum, ERRORINFO *pErrorInfo)
1365 TRACE("(%p)->%d %p\n", This, ulRecordNum, pErrorInfo);
1367 return IErrorRecords_GetBasicErrorInfo_Proxy(This, ulRecordNum, pErrorInfo);
1370 HRESULT __RPC_STUB IErrorRecords_GetBasicErrorInfo_Stub(IErrorRecords* This, ULONG ulRecordNum, ERRORINFO *pErrorInfo,
1371 IErrorInfo **ppErrorInfoRem)
1373 HRESULT hr;
1375 TRACE("(%p)->%d %p %p\n", This, ulRecordNum, pErrorInfo, ppErrorInfoRem);
1377 *ppErrorInfoRem = NULL;
1378 hr = IErrorRecords_GetBasicErrorInfo(This, ulRecordNum, pErrorInfo);
1379 if(FAILED(hr))
1380 GetErrorInfo(0, ppErrorInfoRem);
1382 return hr;
1385 HRESULT CALLBACK IErrorRecords_AddErrorRecord_Proxy(IErrorRecords* This, ERRORINFO *pErrorInfo, DWORD dwLookupID,
1386 DISPPARAMS *pdispparams, IUnknown *punkCustomError, DWORD dwDynamicErrorID)
1388 HRESULT hr;
1389 IErrorInfo *error;
1391 TRACE("(%p)->%p %d %p %p %d\n", This, pErrorInfo, dwLookupID, pdispparams, punkCustomError, dwDynamicErrorID);
1393 hr = IErrorRecords_RemoteAddErrorRecord_Proxy(This, pErrorInfo, dwLookupID, pdispparams, punkCustomError,
1394 dwDynamicErrorID, &error);
1395 if(error)
1397 SetErrorInfo(0, error);
1398 IErrorInfo_Release(error);
1400 return hr;
1403 HRESULT __RPC_STUB IErrorRecords_AddErrorRecord_Stub(IErrorRecords* This, ERRORINFO *pErrorInfo, DWORD dwLookupID,
1404 DISPPARAMS *pdispparams, IUnknown *punkCustomError, DWORD dwDynamicErrorID, IErrorInfo **ppErrorInfoRem)
1406 HRESULT hr;
1408 TRACE("(%p)->%p %d %p %p %d %p\n", This, pErrorInfo, dwLookupID, pdispparams, punkCustomError,
1409 dwDynamicErrorID, ppErrorInfoRem);
1411 *ppErrorInfoRem = NULL;
1412 hr = IErrorRecords_AddErrorRecord(This, pErrorInfo, dwLookupID, pdispparams, punkCustomError, dwDynamicErrorID);
1413 if(FAILED(hr))
1414 GetErrorInfo(0, ppErrorInfoRem);
1416 return hr;
1419 HRESULT __RPC_STUB IRowPosition_Initialize_Stub(IRowPosition* This, IUnknown *rowset, IErrorInfo **errorinfo)
1421 FIXME("(%p)->(%p %p): stub\n", This, rowset, errorinfo);
1422 return E_NOTIMPL;
1425 HRESULT __RPC_STUB IRowPosition_SetRowPosition_Stub(IRowPosition* This, HCHAPTER chapter, HROW row, DBPOSITIONFLAGS flags, IErrorInfo **errorinfo)
1427 FIXME("(%p)->(%lx %lx %d %p): stub\n", This, chapter, row, flags, errorinfo);
1428 return E_NOTIMPL;
1431 HRESULT __RPC_STUB IRowPosition_GetRowset_Stub(IRowPosition* This, REFIID riid, IUnknown **rowset, IErrorInfo **errorinfo)
1433 FIXME("(%p)->(%s %p %p): stub\n", This, debugstr_guid(riid), rowset, errorinfo);
1434 return E_NOTIMPL;
1437 HRESULT __RPC_STUB IRowPosition_GetRowPosition_Stub(IRowPosition* This, HCHAPTER *chapter, HROW *row, DBPOSITIONFLAGS *flags, IErrorInfo **errorinfo)
1439 FIXME("(%p)->(%p %p %p %p): stub\n", This, chapter, row, flags, errorinfo);
1440 return E_NOTIMPL;
1443 HRESULT __RPC_STUB IRowPosition_ClearRowPosition_Stub(IRowPosition* This, IErrorInfo **errorinfo)
1445 FIXME("(%p)->(%p): stub\n", This, errorinfo);
1446 return E_NOTIMPL;
1449 HRESULT CALLBACK IRowPosition_ClearRowPosition_Proxy(IRowPosition* This)
1451 FIXME("(%p): stub\n", This);
1452 return E_NOTIMPL;
1455 HRESULT CALLBACK IRowPosition_GetRowPosition_Proxy(IRowPosition* This, HCHAPTER *chapter, HROW *row, DBPOSITIONFLAGS *flags)
1457 FIXME("(%p)->(%p %p %p): stub\n", This, chapter, row, flags);
1458 return E_NOTIMPL;
1461 HRESULT CALLBACK IRowPosition_GetRowset_Proxy(IRowPosition* This, REFIID riid, IUnknown **rowset)
1463 FIXME("(%p)->(%s %p): stub\n", This, debugstr_guid(riid), rowset);
1464 return E_NOTIMPL;
1467 HRESULT CALLBACK IRowPosition_Initialize_Proxy(IRowPosition* This, IUnknown *rowset)
1469 FIXME("(%p)->(%p): stub\n", This, rowset);
1470 return E_NOTIMPL;
1473 HRESULT CALLBACK IRowPosition_SetRowPosition_Proxy(IRowPosition* This, HCHAPTER chapter, HROW row, DBPOSITIONFLAGS flags)
1475 FIXME("(%p)->(%lx %lx %d): stub\n", This, chapter, row, flags);
1476 return E_NOTIMPL;
1479 HRESULT __RPC_STUB IRowPositionChange_OnRowPositionChange_Stub(IRowPositionChange* This, DBREASON reason, DBEVENTPHASE phase,
1480 BOOL cant_deny, IErrorInfo **errorinfo)
1482 FIXME("(%p)->(0x%x 0x%x %d %p): stub\n", This, reason, phase, cant_deny, errorinfo);
1483 return E_NOTIMPL;
1486 HRESULT CALLBACK IRowPositionChange_OnRowPositionChange_Proxy(IRowPositionChange* This, DBREASON reason, DBEVENTPHASE phase,
1487 BOOL cant_deny)
1489 FIXME("(%p)->(0x%x 0x%x %d): stub\n", This, reason, phase, cant_deny);
1490 return E_NOTIMPL;
1493 HRESULT __RPC_STUB IChapteredRowset_ReleaseChapter_Stub(IChapteredRowset* This, HCHAPTER chapter, DBREFCOUNT *refcount, IErrorInfo **errorinfo)
1495 FIXME("(%p)->(%lx %p %p): stub\n", This, chapter, refcount, errorinfo);
1496 return E_NOTIMPL;
1499 HRESULT __RPC_STUB IChapteredRowset_AddRefChapter_Stub(IChapteredRowset* This, HCHAPTER chapter, DBREFCOUNT *refcount, IErrorInfo **errorinfo)
1501 FIXME("(%p)->(%lx %p %p): stub\n", This, chapter, refcount, errorinfo);
1502 return E_NOTIMPL;
1505 HRESULT CALLBACK IChapteredRowset_AddRefChapter_Proxy(IChapteredRowset* This, HCHAPTER chapter, DBREFCOUNT *refcount)
1507 FIXME("(%p)->(%lx %p): stub\n", This, chapter, refcount);
1508 return E_NOTIMPL;
1511 HRESULT CALLBACK IChapteredRowset_ReleaseChapter_Proxy(IChapteredRowset* This, HCHAPTER chapter, DBREFCOUNT *refcount)
1513 FIXME("(%p)->(%lx %p): stub\n", This, chapter, refcount);
1514 return E_NOTIMPL;