wined3d: Pass a resource to wined3d_resource_free_sysmem().
[wine.git] / dlls / msdaps / usrmarshal.c
blobb70d3f4312e719c8cb3abae39e7023d3265cc923
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
24 #define NONAMELESSUNION
25 #define NONAMELESSSTRUCT
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"
36 #include "row_server.h"
38 #include "wine/debug.h"
40 WINE_DEFAULT_DEBUG_CHANNEL(oledb);
42 HRESULT CALLBACK IDBCreateCommand_CreateCommand_Proxy(IDBCreateCommand* This, IUnknown *pUnkOuter,
43 REFIID riid, IUnknown **ppCommand)
45 HRESULT hr;
46 IErrorInfo *error;
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)
52 SetErrorInfo(0, error);
53 IErrorInfo_Release(error);
55 return hr;
58 HRESULT __RPC_STUB IDBCreateCommand_CreateCommand_Stub(IDBCreateCommand* This, IUnknown *pUnkOuter,
59 REFIID riid, IUnknown **ppCommand, IErrorInfo **ppErrorInfoRem)
61 HRESULT hr;
63 TRACE("(%p, %p, %s, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid), ppCommand, ppErrorInfoRem);
65 *ppErrorInfoRem = NULL;
66 hr = IDBCreateCommand_CreateCommand(This, pUnkOuter, riid, ppCommand);
67 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
69 return hr;
72 HRESULT CALLBACK IDBCreateSession_CreateSession_Proxy(IDBCreateSession* This, IUnknown *pUnkOuter,
73 REFIID riid, IUnknown **ppDBSession)
75 HRESULT hr;
76 IErrorInfo *error;
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)
82 SetErrorInfo(0, error);
83 IErrorInfo_Release(error);
85 return hr;
88 HRESULT __RPC_STUB IDBCreateSession_CreateSession_Stub(IDBCreateSession* This, IUnknown *pUnkOuter,
89 REFIID riid, IUnknown **ppDBSession, IErrorInfo **ppErrorInfoRem)
91 HRESULT hr;
92 TRACE("(%p, %p, %s, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid),
93 ppDBSession, ppErrorInfoRem);
95 *ppErrorInfoRem = NULL;
96 hr = IDBCreateSession_CreateSession(This, pUnkOuter, riid, ppDBSession);
97 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
99 return hr;
102 HRESULT CALLBACK IDBProperties_GetProperties_Proxy(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
103 ULONG *pcPropertySets, DBPROPSET **prgPropertySets)
105 HRESULT hr;
106 IErrorInfo *error;
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)
114 SetErrorInfo(0, error);
115 IErrorInfo_Release(error);
117 return hr;
120 HRESULT __RPC_STUB IDBProperties_GetProperties_Stub(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
121 ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
123 HRESULT hr;
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);
133 return hr;
136 HRESULT CALLBACK IDBProperties_GetPropertyInfo_Proxy(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
137 ULONG *pcPropertyInfoSets, DBPROPINFOSET **prgPropertyInfoSets,
138 OLECHAR **ppDescBuffer)
140 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
141 prgPropertyInfoSets, ppDescBuffer);
142 return E_NOTIMPL;
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)
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;
155 HRESULT CALLBACK IDBProperties_SetProperties_Proxy(IDBProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
157 ULONG prop_set, prop, total_props = 0;
158 HRESULT hr;
159 IErrorInfo *error;
160 DBPROPSTATUS *status;
162 TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
164 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
165 total_props += rgPropertySets[prop_set].cProperties;
167 if(total_props == 0) return S_OK;
169 status = CoTaskMemAlloc(total_props * sizeof(*status));
170 if(!status) return E_OUTOFMEMORY;
172 hr = IDBProperties_RemoteSetProperties_Proxy(This, cPropertySets, rgPropertySets,
173 total_props, status, &error);
174 if(error)
176 SetErrorInfo(0, error);
177 IErrorInfo_Release(error);
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++];
185 CoTaskMemFree(status);
186 return hr;
189 HRESULT __RPC_STUB IDBProperties_SetProperties_Stub(IDBProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
190 ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
192 ULONG prop_set, prop, total_props = 0;
193 HRESULT hr;
195 TRACE("(%p, %d, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, cTotalProps,
196 rgPropStatus, ppErrorInfoRem);
198 *ppErrorInfoRem = NULL;
199 hr = IDBProperties_SetProperties(This, cPropertySets, rgPropertySets);
200 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
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;
206 return hr;
209 HRESULT CALLBACK IDBInitialize_Initialize_Proxy(IDBInitialize* This)
211 HRESULT hr;
212 IErrorInfo *error;
214 TRACE("(%p)\n", This);
215 hr = IDBInitialize_RemoteInitialize_Proxy(This, &error);
216 if(error)
218 SetErrorInfo(0, error);
219 IErrorInfo_Release(error);
221 return hr;
224 HRESULT __RPC_STUB IDBInitialize_Initialize_Stub(IDBInitialize* This, IErrorInfo **ppErrorInfoRem)
226 HRESULT hr;
227 TRACE("(%p, %p)\n", This, ppErrorInfoRem);
229 *ppErrorInfoRem = NULL;
230 hr = IDBInitialize_Initialize(This);
231 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
233 return hr;
236 HRESULT CALLBACK IDBInitialize_Uninitialize_Proxy(IDBInitialize* This)
238 IErrorInfo *error;
239 HRESULT hr;
241 TRACE("(%p)\n", This);
242 hr = IDBInitialize_RemoteUninitialize_Proxy(This, &error);
243 if(error)
245 SetErrorInfo(0, error);
246 IErrorInfo_Release(error);
248 return hr;
251 HRESULT __RPC_STUB IDBInitialize_Uninitialize_Stub(IDBInitialize* This, IErrorInfo **error)
253 HRESULT hr;
255 TRACE("(%p, %p)\n", This, error);
256 *error = NULL;
257 hr = IDBInitialize_Uninitialize(This);
258 if(FAILED(hr)) GetErrorInfo(0, error);
260 return hr;
263 HRESULT CALLBACK IDBDataSourceAdmin_CreateDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets,
264 DBPROPSET rgPropertySets[], IUnknown *pUnkOuter,
265 REFIID riid, IUnknown **ppDBSession)
267 ULONG prop_set, prop, total_props = 0;
268 HRESULT hr;
269 IErrorInfo *error;
270 DBPROPSTATUS *status;
272 TRACE("(%p, %d, %p, %p, %s, %p)\n", This, cPropertySets, rgPropertySets, pUnkOuter,
273 debugstr_guid(riid), ppDBSession);
275 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
276 total_props += rgPropertySets[prop_set].cProperties;
278 if(total_props == 0) return S_OK;
280 status = CoTaskMemAlloc(total_props * sizeof(*status));
281 if(!status) return E_OUTOFMEMORY;
283 hr = IDBDataSourceAdmin_RemoteCreateDataSource_Proxy(This, cPropertySets, rgPropertySets, pUnkOuter,
284 riid, ppDBSession, total_props, status, &error);
285 if(error)
287 SetErrorInfo(0, error);
288 IErrorInfo_Release(error);
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++];
296 CoTaskMemFree(status);
297 return hr;
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)
305 ULONG prop_set, prop, total_props = 0;
306 HRESULT hr;
308 TRACE("(%p, %d, %p, %p, %s, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, pUnkOuter,
309 debugstr_guid(riid), ppDBSession, cTotalProps, rgPropStatus, ppErrorInfoRem);
311 *ppErrorInfoRem = NULL;
312 hr = IDBDataSourceAdmin_CreateDataSource(This, cPropertySets, rgPropertySets, pUnkOuter, riid, ppDBSession);
313 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
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;
319 return hr;
322 HRESULT CALLBACK IDBDataSourceAdmin_DestroyDataSource_Proxy(IDBDataSourceAdmin* This)
324 IErrorInfo *error;
325 HRESULT hr;
327 TRACE("(%p)\n", This);
328 hr = IDBDataSourceAdmin_RemoteDestroyDataSource_Proxy(This, &error);
329 if(error)
331 SetErrorInfo(0, error);
332 IErrorInfo_Release(error);
334 return hr;
337 HRESULT __RPC_STUB IDBDataSourceAdmin_DestroyDataSource_Stub(IDBDataSourceAdmin* This, IErrorInfo **error)
339 HRESULT hr;
341 TRACE("(%p, %p)\n", This, error);
342 *error = NULL;
343 hr = IDBDataSourceAdmin_DestroyDataSource(This);
344 if(FAILED(hr)) GetErrorInfo(0, error);
346 return hr;
349 HRESULT CALLBACK IDBDataSourceAdmin_GetCreationProperties_Proxy(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
350 const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertyInfoSets,
351 DBPROPINFOSET **prgPropertyInfoSets, OLECHAR **ppDescBuffer)
353 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
354 prgPropertyInfoSets, ppDescBuffer);
355 return E_NOTIMPL;
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)
364 HRESULT hr;
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);
373 return hr;
376 HRESULT CALLBACK IDBDataSourceAdmin_ModifyDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
378 IErrorInfo *error;
379 HRESULT hr;
381 TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
382 hr = IDBDataSourceAdmin_RemoteModifyDataSource_Proxy(This, cPropertySets, rgPropertySets, &error);
383 if(error)
385 SetErrorInfo(0, error);
386 IErrorInfo_Release(error);
389 return hr;
392 HRESULT __RPC_STUB IDBDataSourceAdmin_ModifyDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
393 DBPROPSET *rgPropertySets, IErrorInfo **error)
395 HRESULT hr;
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);
402 return hr;
405 HRESULT CALLBACK ISessionProperties_GetProperties_Proxy(ISessionProperties* This, ULONG cPropertyIDSets,
406 const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertySets,
407 DBPROPSET **prgPropertySets)
409 IErrorInfo *error;
410 HRESULT hr;
412 TRACE("(%p, %d, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets,
413 pcPropertySets, prgPropertySets);
415 hr = ISessionProperties_RemoteGetProperties_Proxy(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets,
416 prgPropertySets, &error);
417 if(error)
419 SetErrorInfo(0, error);
420 IErrorInfo_Release(error);
423 return hr;
426 HRESULT __RPC_STUB ISessionProperties_GetProperties_Stub(ISessionProperties* This, ULONG cPropertyIDSets,
427 const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertySets,
428 DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
430 HRESULT hr;
432 TRACE("(%p, %d, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets,
433 pcPropertySets, prgPropertySets, ppErrorInfoRem);
435 hr = ISessionProperties_GetProperties(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets);
436 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
438 return hr;
441 HRESULT CALLBACK ISessionProperties_SetProperties_Proxy(ISessionProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
443 ULONG prop_set, prop, total_props = 0;
444 HRESULT hr;
445 IErrorInfo *error;
446 DBPROPSTATUS *status;
448 TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
450 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
451 total_props += rgPropertySets[prop_set].cProperties;
453 if(total_props == 0) return S_OK;
455 status = CoTaskMemAlloc(total_props * sizeof(*status));
456 if(!status) return E_OUTOFMEMORY;
458 hr = ISessionProperties_RemoteSetProperties_Proxy(This, cPropertySets, rgPropertySets,
459 total_props, status, &error);
460 if(error)
462 SetErrorInfo(0, error);
463 IErrorInfo_Release(error);
466 total_props = 0;
467 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
468 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
469 rgPropertySets[prop_set].rgProperties[prop].dwStatus = status[total_props++];
471 CoTaskMemFree(status);
472 return hr;
475 HRESULT __RPC_STUB ISessionProperties_SetProperties_Stub(ISessionProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
476 ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
478 ULONG prop_set, prop, total_props = 0;
479 HRESULT hr;
481 TRACE("(%p, %d, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, cTotalProps,
482 rgPropStatus, ppErrorInfoRem);
484 *ppErrorInfoRem = NULL;
485 hr = ISessionProperties_SetProperties(This, cPropertySets, rgPropertySets);
486 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
488 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
489 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
490 rgPropStatus[total_props++] = rgPropertySets[prop_set].rgProperties[prop].dwStatus;
492 return hr;
495 HRESULT CALLBACK IOpenRowset_OpenRowset_Proxy(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
496 REFIID riid, ULONG cPropertySets, DBPROPSET rgPropertySets[], IUnknown **ppRowset)
498 FIXME("(%p, %p, %p, %p, %s, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
499 cPropertySets, rgPropertySets, ppRowset);
500 return E_NOTIMPL;
503 HRESULT __RPC_STUB IOpenRowset_OpenRowset_Stub(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
504 REFIID riid, ULONG cPropertySets, DBPROPSET *rgPropertySets,
505 IUnknown **ppRowset, ULONG cTotalProps, DBPROPSTATUS *rgPropStatus,
506 IErrorInfo **ppErrorInfoRem)
508 FIXME("(%p, %p, %p, %p, %s, %d, %p, %p, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
509 cPropertySets, rgPropertySets, ppRowset, cTotalProps, rgPropStatus, ppErrorInfoRem);
510 return E_NOTIMPL;
513 HRESULT CALLBACK IBindResource_Bind_Proxy(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
514 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
515 DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
517 HRESULT hr;
519 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
520 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppUnk);
522 if(pUnkOuter)
524 FIXME("Aggregation not supported\n");
525 return CLASS_E_NOAGGREGATION;
528 hr = IBindResource_RemoteBind_Proxy(This, pUnkOuter, pwszURL, dwBindURLFlags, rguid, riid, pAuthenticate,
529 pImplSession ? pImplSession->pUnkOuter : NULL, pImplSession ? pImplSession->piid : NULL,
530 pImplSession ? &pImplSession->pSession : NULL, pdwBindStatus, ppUnk);
531 return hr;
534 HRESULT __RPC_STUB IBindResource_Bind_Stub(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
535 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
536 IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
538 HRESULT hr;
539 DBIMPLICITSESSION impl_session;
540 IWineRowServer *server;
541 IMarshal *marshal;
542 IUnknown *obj;
544 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
545 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppUnk);
547 *ppUnk = NULL;
549 if(IsEqualGUID(rguid, &DBGUID_ROWSET))
550 hr = CoCreateInstance(&CLSID_wine_rowset_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&server);
551 else if(IsEqualGUID(rguid, &DBGUID_ROW))
552 hr = CoCreateInstance(&CLSID_wine_row_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&server);
553 else
555 hr = E_NOTIMPL;
556 FIXME("Unhandled object %s\n", debugstr_guid(rguid));
559 if(FAILED(hr)) return hr;
561 impl_session.pUnkOuter = pSessionUnkOuter;
562 impl_session.piid = piid;
563 impl_session.pSession = NULL;
565 IWineRowServer_GetMarshal(server, &marshal);
567 hr = IBindResource_Bind(This, (IUnknown*)marshal, pwszURL, dwBindURLFlags, rguid, &IID_IUnknown, pAuthenticate,
568 ppSession ? &impl_session : NULL, pdwBindStatus, &obj);
570 IMarshal_Release(marshal);
571 if(FAILED(hr))
573 IWineRowServer_Release(server);
574 return hr;
577 IWineRowServer_SetInnerUnk(server, obj);
578 hr = IUnknown_QueryInterface(obj, riid, (void**)ppUnk);
579 IUnknown_Release(obj);
581 if(ppSession) *ppSession = impl_session.pSession;
582 return hr;
585 HRESULT CALLBACK ICreateRow_CreateRow_Proxy(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
586 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
587 DBBINDURLSTATUS *pdwBindStatus, LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
589 HRESULT hr;
591 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
592 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppwszNewURL, ppUnk);
594 if(pUnkOuter)
596 FIXME("Aggregation not supported\n");
597 return CLASS_E_NOAGGREGATION;
600 hr = ICreateRow_RemoteCreateRow_Proxy(This, pUnkOuter, pwszURL, dwBindURLFlags, rguid, riid, pAuthenticate,
601 pImplSession ? pImplSession->pUnkOuter : NULL, pImplSession ? pImplSession->piid : NULL,
602 pImplSession ? &pImplSession->pSession : NULL, pdwBindStatus, ppwszNewURL, ppUnk);
603 return hr;
606 HRESULT __RPC_STUB ICreateRow_CreateRow_Stub(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
607 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
608 IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus,
609 LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
611 HRESULT hr;
612 DBIMPLICITSESSION impl_session;
613 IWineRowServer *row_server;
614 IMarshal *marshal;
615 IUnknown *obj;
617 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
618 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppwszNewURL,
619 ppUnk);
621 *ppUnk = NULL;
623 hr = CoCreateInstance(&CLSID_wine_row_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&row_server);
624 if(FAILED(hr)) return hr;
626 impl_session.pUnkOuter = pSessionUnkOuter;
627 impl_session.piid = piid;
628 impl_session.pSession = NULL;
630 IWineRowServer_GetMarshal(row_server, &marshal);
632 hr = ICreateRow_CreateRow(This, (IUnknown*) marshal, pwszURL, dwBindURLFlags, rguid, &IID_IUnknown, pAuthenticate,
633 ppSession ? &impl_session : NULL, pdwBindStatus, ppwszNewURL, &obj);
634 IMarshal_Release(marshal);
636 if(FAILED(hr))
638 IWineRowServer_Release(row_server);
639 return hr;
642 IWineRowServer_SetInnerUnk(row_server, obj);
643 hr = IUnknown_QueryInterface(obj, riid, (void**)ppUnk);
644 IUnknown_Release(obj);
646 if(ppSession) *ppSession = impl_session.pSession;
647 return hr;
650 HRESULT CALLBACK IAccessor_AddRefAccessor_Proxy(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount)
652 FIXME("(%p)->(%08lx, %p): stub\n", This, hAccessor, pcRefCount);
653 return E_NOTIMPL;
656 HRESULT __RPC_STUB IAccessor_AddRefAccessor_Stub(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount,
657 IErrorInfo **ppErrorInfoRem)
659 FIXME("(%p)->(%08lx, %p, %p): stub\n", This, hAccessor, pcRefCount, ppErrorInfoRem);
660 return E_NOTIMPL;
663 HRESULT CALLBACK IAccessor_CreateAccessor_Proxy(IAccessor* This, DBACCESSORFLAGS dwAccessorFlags, DBCOUNTITEM cBindings,
664 const DBBINDING rgBindings[], DBLENGTH cbRowSize, HACCESSOR *phAccessor,
665 DBBINDSTATUS rgStatus[])
667 HRESULT hr;
668 IErrorInfo *error;
669 DBCOUNTITEM i;
671 TRACE("(%p)->(%08x, %ld, %p, %ld, %p, %p)\n", This, dwAccessorFlags, cBindings, rgBindings,
672 cbRowSize, phAccessor, rgStatus);
674 for(i = 0; i < cBindings; i++)
676 TRACE("%ld: ord %ld val off %ld len off %ld stat off %ld part %04x mem_owner %d max_len %ld type %04x\n",
677 i, rgBindings[i].iOrdinal, rgBindings[i].obValue, rgBindings[i].obLength, rgBindings[i].obStatus,
678 rgBindings[i].dwPart, rgBindings[i].dwMemOwner, rgBindings[i].cbMaxLen, rgBindings[i].wType);
681 hr = IAccessor_RemoteCreateAccessor_Proxy(This, dwAccessorFlags, cBindings, (DBBINDING *)rgBindings,
682 cbRowSize, phAccessor, rgStatus, &error);
683 if(error)
685 SetErrorInfo(0, error);
686 IErrorInfo_Release(error);
689 TRACE("returning %08x accessor %lx\n", hr, *phAccessor);
690 return hr;
693 HRESULT __RPC_STUB IAccessor_CreateAccessor_Stub(IAccessor* This, DBACCESSORFLAGS dwAccessorFlags, DBCOUNTITEM cBindings,
694 DBBINDING *rgBindings, DBLENGTH cbRowSize, HACCESSOR *phAccessor,
695 DBBINDSTATUS *rgStatus, IErrorInfo **ppErrorInfoRem)
697 HRESULT hr;
699 TRACE("(%p)->(%08x, %ld, %p, %ld, %p, %p, %p)\n", This, dwAccessorFlags, cBindings, rgBindings,
700 cbRowSize, phAccessor, rgStatus, ppErrorInfoRem);
702 *ppErrorInfoRem = NULL;
703 hr = IAccessor_CreateAccessor(This, dwAccessorFlags, cBindings, rgBindings,
704 cbRowSize, phAccessor, rgStatus);
705 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
707 return hr;
710 HRESULT CALLBACK IAccessor_GetBindings_Proxy(IAccessor* This, HACCESSOR hAccessor, DBACCESSORFLAGS *pdwAccessorFlags,
711 DBCOUNTITEM *pcBindings, DBBINDING **prgBindings)
713 FIXME("(%p): stub\n", This);
714 return E_NOTIMPL;
717 HRESULT __RPC_STUB IAccessor_GetBindings_Stub(IAccessor* This, HACCESSOR hAccessor, DBACCESSORFLAGS *pdwAccessorFlags,
718 DBCOUNTITEM *pcBindings, DBBINDING **prgBindings, IErrorInfo **ppErrorInfoRem)
720 FIXME("(%p): stub\n", This);
721 return E_NOTIMPL;
724 HRESULT CALLBACK IAccessor_ReleaseAccessor_Proxy(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount)
726 HRESULT hr;
727 IErrorInfo *error;
728 DBREFCOUNT ref;
730 TRACE("(%p)->(%lx, %p)\n", This, hAccessor, pcRefCount);
732 hr = IAccessor_RemoteReleaseAccessor_Proxy(This, hAccessor, &ref, &error);
734 if(pcRefCount) *pcRefCount = ref;
735 if(error)
737 SetErrorInfo(0, error);
738 IErrorInfo_Release(error);
740 return hr;
743 HRESULT __RPC_STUB IAccessor_ReleaseAccessor_Stub(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount,
744 IErrorInfo **ppErrorInfoRem)
746 HRESULT hr;
748 TRACE("(%p)->(%lx, %p, %p)\n", This, hAccessor, pcRefCount, ppErrorInfoRem);
750 *ppErrorInfoRem = NULL;
752 hr = IAccessor_ReleaseAccessor(This, hAccessor, pcRefCount);
754 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
755 return hr;
758 HRESULT CALLBACK IRowsetInfo_GetProperties_Proxy(IRowsetInfo* This, const ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
759 ULONG *pcPropertySets, DBPROPSET **prgPropertySets)
761 HRESULT hr;
762 IErrorInfo *error;
763 ULONG i;
765 TRACE("(%p)->(%d, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets);
767 for(i = 0; i < cPropertyIDSets; i++)
769 unsigned int j;
770 TRACE("%d: %s %d props\n", i, debugstr_guid(&rgPropertyIDSets[i].guidPropertySet), rgPropertyIDSets[i].cPropertyIDs);
771 for(j = 0; j < rgPropertyIDSets[i].cPropertyIDs; j++)
772 TRACE("\t%u: prop id %d\n", j, rgPropertyIDSets[i].rgPropertyIDs[j]);
775 hr = IRowsetInfo_RemoteGetProperties_Proxy(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, &error);
777 if(error)
779 SetErrorInfo(0, error);
780 IErrorInfo_Release(error);
782 return hr;
785 HRESULT __RPC_STUB IRowsetInfo_GetProperties_Stub(IRowsetInfo* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
786 ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
788 HRESULT hr;
790 TRACE("(%p)->(%d, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, ppErrorInfoRem);
792 *ppErrorInfoRem = NULL;
794 hr = IRowsetInfo_GetProperties(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets);
795 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
796 TRACE("returning %08x\n", hr);
797 return hr;
800 HRESULT CALLBACK IRowsetInfo_GetReferencedRowset_Proxy(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset)
802 IErrorInfo *error;
803 HRESULT hr;
805 TRACE("(%p)->(%ld, %s, %p)\n", This, iOrdinal, debugstr_guid(riid), ppReferencedRowset);
807 hr = IRowsetInfo_RemoteGetReferencedRowset_Proxy(This, iOrdinal, riid, ppReferencedRowset, &error);
808 if(error)
810 SetErrorInfo(0, error);
811 IErrorInfo_Release(error);
814 return hr;
817 HRESULT __RPC_STUB IRowsetInfo_GetReferencedRowset_Stub(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset,
818 IErrorInfo **ppErrorInfoRem)
820 HRESULT hr;
822 TRACE("(%p)->(%ld, %s, %p, %p)\n", This, iOrdinal, debugstr_guid(riid), ppReferencedRowset, ppErrorInfoRem);
824 hr = IRowsetInfo_GetReferencedRowset(This, iOrdinal, riid, ppReferencedRowset);
825 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
827 return hr;
830 HRESULT CALLBACK IRowsetInfo_GetSpecification_Proxy(IRowsetInfo* This, REFIID riid, IUnknown **ppSpecification)
832 IErrorInfo *error;
833 HRESULT hr;
835 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppSpecification);
837 hr = IRowsetInfo_RemoteGetSpecification_Proxy(This, riid, ppSpecification, &error);
838 if(error)
840 SetErrorInfo(0, error);
841 IErrorInfo_Release(error);
844 return hr;
847 HRESULT __RPC_STUB IRowsetInfo_GetSpecification_Stub(IRowsetInfo* This, REFIID riid, IUnknown **ppSpecification, IErrorInfo **ppErrorInfoRem)
849 HRESULT hr;
851 TRACE("(%p)->(%s, %p, %p)\n", This, debugstr_guid(riid), ppSpecification, ppErrorInfoRem);
853 hr = IRowsetInfo_GetSpecification(This, riid, ppSpecification);
854 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
856 return hr;
859 HRESULT CALLBACK ICommand_Cancel_Proxy(ICommand* This)
861 IErrorInfo *error;
862 HRESULT hr;
864 TRACE("(%p)\n", This);
866 hr = ICommand_RemoteCancel_Proxy(This, &error);
867 if(error)
869 SetErrorInfo(0, error);
870 IErrorInfo_Release(error);
873 return hr;
876 HRESULT __RPC_STUB ICommand_Cancel_Stub(ICommand* This, IErrorInfo **ppErrorInfoRem)
878 HRESULT hr;
880 TRACE("(%p)->(%p)\n", This, ppErrorInfoRem);
882 hr = ICommand_Cancel(This);
883 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
885 return hr;
888 HRESULT CALLBACK ICommand_Execute_Proxy(ICommand* This, IUnknown *pUnkOuter, REFIID riid,
889 DBPARAMS *pParams, DBROWCOUNT *pcRowsAffected, IUnknown **ppRowset)
891 HRESULT hr;
892 DBROWCOUNT affected;
894 *ppRowset = NULL;
896 TRACE("(%p)->(%p, %s, %p, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid), pParams,
897 pcRowsAffected, ppRowset);
899 if(pParams)
901 FIXME("Unhandled params {%p, %ld, %08lx}\n", pParams->pData, pParams->cParamSets, pParams->hAccessor);
902 return E_NOTIMPL;
905 if(pUnkOuter)
907 FIXME("Aggregation not supported\n");
908 return CLASS_E_NOAGGREGATION;
911 hr = ICommand_RemoteExecute_Proxy(This, pUnkOuter, riid, 0, 0, NULL, 0, NULL, NULL, 0, NULL, NULL, &affected,
912 ppRowset);
914 TRACE("Execute returns %08x\n", hr);
916 if(pcRowsAffected) *pcRowsAffected = affected;
918 return hr;
921 HRESULT __RPC_STUB ICommand_Execute_Stub(ICommand* This, IUnknown *pUnkOuter, REFIID riid, HACCESSOR hAccessor,
922 DB_UPARAMS cParamSets, GUID *pGuid, ULONG ulGuidOffset, RMTPACK *pInputParams,
923 RMTPACK *pOutputParams, DBCOUNTITEM cBindings, DBBINDING *rgBindings,
924 DBSTATUS *rgStatus, DBROWCOUNT *pcRowsAffected, IUnknown **ppRowset)
926 IWineRowServer *rowset_server;
927 IMarshal *marshal;
928 IUnknown *obj = NULL;
929 HRESULT hr;
931 TRACE("(%p)->(%p, %s, %08lx, %ld, %p, %d, %p, %p, %ld, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_guid(riid),
932 hAccessor, cParamSets, pGuid, ulGuidOffset, pInputParams, pOutputParams, cBindings, rgBindings, rgStatus,
933 pcRowsAffected, ppRowset);
935 *ppRowset = NULL;
937 hr = CoCreateInstance(&CLSID_wine_rowset_server, NULL, CLSCTX_INPROC_SERVER, &IID_IWineRowServer, (void**)&rowset_server);
938 if(FAILED(hr)) return hr;
940 IWineRowServer_GetMarshal(rowset_server, &marshal);
942 hr = ICommand_Execute(This, (IUnknown*)marshal, &IID_IUnknown, NULL, pcRowsAffected, &obj);
944 IMarshal_Release(marshal);
946 if(FAILED(hr))
948 IWineRowServer_Release(rowset_server);
949 return hr;
952 IWineRowServer_SetInnerUnk(rowset_server, obj);
953 hr = IUnknown_QueryInterface(obj, riid, (void**)ppRowset);
954 IUnknown_Release(obj);
956 return hr;
959 HRESULT CALLBACK ICommand_GetDBSession_Proxy(ICommand* This, REFIID riid, IUnknown **ppSession)
961 IErrorInfo *error;
962 HRESULT hr;
964 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppSession);
966 hr = ICommand_RemoteGetDBSession_Proxy(This, riid, ppSession, &error);
967 if(error)
969 SetErrorInfo(0, error);
970 IErrorInfo_Release(error);
973 return hr;
976 HRESULT __RPC_STUB ICommand_GetDBSession_Stub(ICommand* This, REFIID riid, IUnknown **ppSession, IErrorInfo **ppErrorInfoRem)
978 HRESULT hr;
980 TRACE("(%p)->(%s, %p, %p)\n", This, debugstr_guid(riid), ppSession, ppErrorInfoRem);
982 hr = ICommand_GetDBSession(This, riid, ppSession);
983 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
985 return hr;
988 HRESULT CALLBACK ICommandText_GetCommandText_Proxy(ICommandText* This, GUID *pguidDialect, LPOLESTR *ppwszCommand)
990 IErrorInfo *error;
991 HRESULT hr;
993 TRACE("(%p)->(%p, %p)\n", This, pguidDialect, ppwszCommand);
995 hr = ICommandText_RemoteGetCommandText_Proxy(This, pguidDialect, ppwszCommand, &error);
996 if(error)
998 SetErrorInfo(0, error);
999 IErrorInfo_Release(error);
1002 return hr;
1005 HRESULT __RPC_STUB ICommandText_GetCommandText_Stub(ICommandText* This, GUID *pguidDialect,
1006 LPOLESTR *ppwszCommand, IErrorInfo **ppErrorInfoRem)
1008 HRESULT hr;
1010 TRACE("(%p)->(%p, %p, %p)\n", This, pguidDialect, ppwszCommand, ppErrorInfoRem);
1012 hr = ICommandText_GetCommandText(This, pguidDialect, ppwszCommand);
1013 if (FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
1015 return hr;
1018 HRESULT CALLBACK ICommandText_SetCommandText_Proxy(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand)
1020 HRESULT hr;
1021 IErrorInfo *error;
1023 TRACE("(%p)->(%s, %s)\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand));
1025 hr = ICommandText_RemoteSetCommandText_Proxy(This, rguidDialect, pwszCommand, &error);
1026 if(error)
1028 SetErrorInfo(0, error);
1029 IErrorInfo_Release(error);
1031 return hr;
1034 HRESULT __RPC_STUB ICommandText_SetCommandText_Stub(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand,
1035 IErrorInfo **ppErrorInfoRem)
1037 HRESULT hr;
1039 TRACE("(%p)->(%s, %s, %p)\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand),
1040 ppErrorInfoRem);
1042 *ppErrorInfoRem = NULL;
1043 hr = ICommandText_SetCommandText(This, rguidDialect, pwszCommand);
1044 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
1046 return hr;
1049 HRESULT CALLBACK IDBAsynchNotify_OnLowResource_Proxy(IDBAsynchNotify* This, DB_DWRESERVE dwReserved)
1051 TRACE("(%p)->(%08lx)\n", This, dwReserved);
1052 return IDBAsynchNotify_RemoteOnLowResource_Proxy(This, dwReserved);
1055 HRESULT __RPC_STUB IDBAsynchNotify_OnLowResource_Stub(IDBAsynchNotify* This, DB_DWRESERVE dwReserved)
1057 TRACE("(%p)->(%08lx)\n", This, dwReserved);
1058 return IDBAsynchNotify_OnLowResource(This, dwReserved);
1061 HRESULT CALLBACK IDBAsynchNotify_OnProgress_Proxy(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1062 DBCOUNTITEM ulProgress, DBCOUNTITEM ulProgressMax, DBASYNCHPHASE eAsynchPhase,
1063 LPOLESTR pwszStatusText)
1065 TRACE("(%p)->(%lx, %d, %ld, %ld, %d, %s)\n", This, hChapter, eOperation, ulProgress, ulProgressMax,
1066 eAsynchPhase, debugstr_w(pwszStatusText));
1068 return IDBAsynchNotify_RemoteOnProgress_Proxy(This, hChapter, eOperation, ulProgress, ulProgressMax, eAsynchPhase,
1069 pwszStatusText);
1072 HRESULT __RPC_STUB IDBAsynchNotify_OnProgress_Stub(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1073 DBCOUNTITEM ulProgress, DBCOUNTITEM ulProgressMax, DBASYNCHPHASE eAsynchPhase,
1074 LPOLESTR pwszStatusText)
1076 TRACE("(%p)->(%lx, %d, %ld, %ld, %d, %s)\n", This, hChapter, eOperation, ulProgress, ulProgressMax,
1077 eAsynchPhase, debugstr_w(pwszStatusText));
1078 return IDBAsynchNotify_OnProgress(This, hChapter, eOperation, ulProgress, ulProgressMax, eAsynchPhase,
1079 pwszStatusText);
1082 HRESULT CALLBACK IDBAsynchNotify_OnStop_Proxy(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1083 HRESULT hrStatus, LPOLESTR pwszStatusText)
1085 TRACE("(%p)->(%lx, %d, %08x, %s)\n", This, hChapter, eOperation, hrStatus, debugstr_w(pwszStatusText));
1086 return IDBAsynchNotify_RemoteOnStop_Proxy(This, hChapter, eOperation, hrStatus, pwszStatusText);
1089 HRESULT __RPC_STUB IDBAsynchNotify_OnStop_Stub(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1090 HRESULT hrStatus, LPOLESTR pwszStatusText)
1092 TRACE("(%p)->(%lx, %d, %08x, %s)\n", This, hChapter, eOperation, hrStatus, debugstr_w(pwszStatusText));
1093 return IDBAsynchNotify_OnStop(This, hChapter, eOperation, hrStatus, pwszStatusText);
1096 HRESULT CALLBACK IDBAsynchStatus_Abort_Proxy(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation)
1098 IErrorInfo *error;
1099 HRESULT hr;
1101 TRACE("(%p)->(%lx, %d)\n", This, hChapter, eOperation);
1103 hr = IDBAsynchStatus_RemoteAbort_Proxy(This, hChapter, eOperation, &error);
1104 if(error)
1106 SetErrorInfo(0, error);
1107 IErrorInfo_Release(error);
1109 return hr;
1112 HRESULT __RPC_STUB IDBAsynchStatus_Abort_Stub(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1113 IErrorInfo **ppErrorInfoRem)
1115 HRESULT hr;
1117 TRACE("(%p)->(%lx, %d, %p)\n", This, hChapter, eOperation, ppErrorInfoRem);
1119 *ppErrorInfoRem = NULL;
1120 hr = IDBAsynchStatus_Abort(This, hChapter, eOperation);
1121 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
1123 return hr;
1126 HRESULT CALLBACK IDBAsynchStatus_GetStatus_Proxy(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1127 DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase,
1128 LPOLESTR *ppwszStatusText)
1130 IErrorInfo *error;
1131 HRESULT hr;
1133 TRACE("(%p)->(%lx, %d, %p, %p, %p, %p)\n", This, hChapter, eOperation, pulProgress, pulProgressMax,
1134 peAsynchPhase, ppwszStatusText);
1136 hr = IDBAsynchStatus_RemoteGetStatus_Proxy(This, hChapter, eOperation, pulProgress, pulProgressMax, peAsynchPhase,
1137 ppwszStatusText, &error);
1138 if(error)
1140 SetErrorInfo(0, error);
1141 IErrorInfo_Release(error);
1143 return hr;
1146 HRESULT __RPC_STUB IDBAsynchStatus_GetStatus_Stub(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
1147 DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase,
1148 LPOLESTR *ppwszStatusText, IErrorInfo **ppErrorInfoRem)
1150 HRESULT hr;
1152 TRACE("(%p)->(%lx, %d, %p, %p, %p, %p, %p)\n", This, hChapter, eOperation, pulProgress, pulProgressMax,
1153 peAsynchPhase, ppwszStatusText, ppErrorInfoRem);
1155 *ppErrorInfoRem = NULL;
1156 hr = IDBAsynchStatus_GetStatus(This, hChapter, eOperation, pulProgress, pulProgressMax, peAsynchPhase, ppwszStatusText);
1157 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
1159 return hr;
1162 HRESULT CALLBACK IRowsetNotify_OnRowChange_Proxy(IRowsetNotify* This, IRowset *rowset, DBCOUNTITEM rows, HROW *hrows, DBREASON reason,
1163 DBEVENTPHASE phase, BOOL cantdeny)
1165 TRACE("(%p)->(%p %ld %p %d %d %d)\n", This, rowset, rows, hrows, reason, phase, cantdeny);
1166 return IRowsetNotify_RemoteOnRowChange_Proxy(This, rowset, rows, hrows, reason, phase, cantdeny);
1169 HRESULT __RPC_STUB IRowsetNotify_OnRowChange_Stub(IRowsetNotify* This, IRowset *rowset, DBCOUNTITEM rows, HROW *hrows, DBREASON reason,
1170 DBEVENTPHASE phase, BOOL cantdeny)
1172 TRACE("(%p)->(%p %ld %p %d %d %d)\n", This, rowset, rows, hrows, reason, phase, cantdeny);
1173 return IRowsetNotify_OnRowChange(This, rowset, rows, hrows, reason, phase, cantdeny);
1176 HRESULT CALLBACK IRowsetNotify_OnFieldChange_Proxy(IRowsetNotify* This, IRowset *rowset, HROW row, DBORDINAL ccols, DBORDINAL *columns,
1177 DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1179 TRACE("(%p)->(%p %lx %ld %p %d %d %d)\n", This, rowset, row, ccols, columns, reason, phase, cantdeny);
1180 return IRowsetNotify_RemoteOnFieldChange_Proxy(This, rowset, row, ccols, columns, reason, phase, cantdeny);
1183 HRESULT __RPC_STUB IRowsetNotify_OnFieldChange_Stub(IRowsetNotify* This, IRowset *rowset, HROW row, DBORDINAL ccols, DBORDINAL *columns,
1184 DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1186 TRACE("(%p)->(%p %lx %ld %p %d %d %d)\n", This, rowset, row, ccols, columns, reason, phase, cantdeny);
1187 return IRowsetNotify_OnFieldChange(This, rowset, row, ccols, columns, reason, phase, cantdeny);
1190 HRESULT CALLBACK IRowsetNotify_OnRowsetChange_Proxy(IRowsetNotify* This, IRowset *rowset, DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1192 TRACE("(%p)->(%p %d %d %d)\n", This, rowset, reason, phase, cantdeny);
1193 return IRowsetNotify_RemoteOnRowsetChange_Proxy(This, rowset, reason, phase, cantdeny);
1196 HRESULT __RPC_STUB IRowsetNotify_OnRowsetChange_Stub(IRowsetNotify* This, IRowset *rowset, DBREASON reason, DBEVENTPHASE phase, BOOL cantdeny)
1198 TRACE("(%p)->(%p %d %d %d)\n", This, rowset, reason, phase, cantdeny);
1199 return IRowsetNotify_OnRowsetChange(This, rowset, reason, phase, cantdeny);
1203 HRESULT CALLBACK ISourcesRowset_GetSourcesRowset_Proxy(ISourcesRowset* This, IUnknown *pUnkOuter, REFIID riid, ULONG cPropertySets,
1204 DBPROPSET rgProperties[], IUnknown **ppSourcesRowset)
1206 HRESULT hr;
1207 IErrorInfo *error;
1209 TRACE("(%p)->(%p %s %d %p %p)\n", This, pUnkOuter, debugstr_guid(riid), cPropertySets, rgProperties, ppSourcesRowset);
1211 hr = ISourcesRowset_RemoteGetSourcesRowset_Proxy(This, pUnkOuter, riid, cPropertySets, rgProperties, ppSourcesRowset, 0, NULL, &error);
1212 if(error)
1214 SetErrorInfo(0, error);
1215 IErrorInfo_Release(error);
1218 return hr;
1221 HRESULT __RPC_STUB ISourcesRowset_GetSourcesRowset_Stub(ISourcesRowset* This, IUnknown *pUnkOuter, REFIID riid, ULONG cPropertySets,
1222 DBPROPSET *rgProperties, IUnknown **ppSourcesRowset, ULONG cTotalProps, DBPROPSTATUS *rgPropStatus,
1223 IErrorInfo **ppErrorInfoRem)
1225 HRESULT hr;
1227 TRACE("(%p)->(%p %s %d %p %p %d %p %p)\n", This, pUnkOuter, debugstr_guid(riid), cPropertySets, rgProperties, ppSourcesRowset,
1228 cTotalProps, rgPropStatus, ppErrorInfoRem);
1230 *ppErrorInfoRem = NULL;
1231 hr = ISourcesRowset_GetSourcesRowset(This, pUnkOuter, riid, cPropertySets, rgProperties, ppSourcesRowset);
1232 if(FAILED(hr))
1233 GetErrorInfo(0, ppErrorInfoRem);
1235 return hr;
1238 HRESULT CALLBACK IErrorRecords_GetRecordCount_Proxy(IErrorRecords* This, ULONG *records)
1240 HRESULT hr;
1241 IErrorInfo *error;
1243 TRACE("(%p)->%p\n", This, records);
1245 hr = IErrorRecords_RemoteGetRecordCount_Proxy(This, records, &error);
1246 if(error)
1248 SetErrorInfo(0, error);
1249 IErrorInfo_Release(error);
1252 return hr;
1255 HRESULT __RPC_STUB IErrorRecords_GetRecordCount_Stub(IErrorRecords* This, ULONG *pcRecords, IErrorInfo **ppErrorInfoRem)
1257 HRESULT hr;
1259 TRACE("(%p)->%p %p\n", This, pcRecords, ppErrorInfoRem);
1261 *ppErrorInfoRem = NULL;
1262 hr = IErrorRecords_GetRecordCount(This, pcRecords);
1263 if(FAILED(hr))
1264 GetErrorInfo(0, ppErrorInfoRem);
1266 return hr;
1269 HRESULT CALLBACK IErrorRecords_GetErrorParameters_Proxy(IErrorRecords* This, ULONG ulRecordNum, DISPPARAMS *pdispparams)
1271 HRESULT hr;
1272 IErrorInfo *error;
1274 TRACE("(%p)->%d %p\n", This, ulRecordNum, pdispparams);
1276 hr = IErrorRecords_RemoteGetErrorParameters_Proxy(This, ulRecordNum, pdispparams, &error);
1277 if(error)
1279 SetErrorInfo(0, error);
1280 IErrorInfo_Release(error);
1283 return hr;
1286 HRESULT __RPC_STUB IErrorRecords_GetErrorParameters_Stub(IErrorRecords* This, ULONG ulRecordNum, DISPPARAMS *pdispparams,
1287 IErrorInfo **ppErrorInfoRem)
1289 HRESULT hr;
1291 TRACE("(%p)->%d %p %p\n", This, ulRecordNum, pdispparams, ppErrorInfoRem);
1293 *ppErrorInfoRem = NULL;
1294 hr = IErrorRecords_GetErrorParameters(This, ulRecordNum, pdispparams);
1295 if(FAILED(hr))
1296 GetErrorInfo(0, ppErrorInfoRem);
1298 return hr;
1301 HRESULT CALLBACK IErrorRecords_GetErrorInfo_Proxy(IErrorRecords* This, ULONG ulRecordNum, LCID lcid, IErrorInfo **ppErrorInfo)
1303 HRESULT hr;
1304 IErrorInfo *error;
1306 TRACE("(%p)->%d %d %p\n", This, ulRecordNum, lcid, ppErrorInfo);
1308 hr = IErrorRecords_RemoteGetErrorInfo_Proxy(This, ulRecordNum, lcid, ppErrorInfo, &error);
1309 if(error)
1311 SetErrorInfo(0, error);
1312 IErrorInfo_Release(error);
1315 return hr;
1318 HRESULT __RPC_STUB IErrorRecords_GetErrorInfo_Stub(IErrorRecords* This, ULONG ulRecordNum, LCID lcid,
1319 IErrorInfo **ppErrorInfo, IErrorInfo **ppErrorInfoRem)
1321 HRESULT hr;
1323 TRACE("(%p)->%d %d %p %p\n", This, ulRecordNum, lcid, ppErrorInfo, ppErrorInfoRem);
1325 *ppErrorInfoRem = NULL;
1326 hr = IErrorRecords_GetErrorInfo(This, ulRecordNum, lcid, ppErrorInfo);
1327 if(FAILED(hr))
1328 GetErrorInfo(0, ppErrorInfoRem);
1330 return hr;
1333 HRESULT CALLBACK IErrorRecords_GetCustomErrorObject_Proxy(IErrorRecords* This, ULONG ulRecordNum, REFIID riid,
1334 IUnknown **ppObject)
1336 HRESULT hr;
1337 IErrorInfo *error;
1339 TRACE("(%p)->%d %s %p\n", This, ulRecordNum, debugstr_guid(riid), ppObject);
1341 hr = IErrorRecords_RemoteGetCustomErrorObject_Proxy(This, ulRecordNum, riid, ppObject, &error);
1342 if(error)
1344 SetErrorInfo(0, error);
1345 IErrorInfo_Release(error);
1347 return hr;
1350 HRESULT __RPC_STUB IErrorRecords_GetCustomErrorObject_Stub(IErrorRecords* This, ULONG ulRecordNum, REFIID riid,
1351 IUnknown **ppObject, IErrorInfo **ppErrorInfoRem)
1353 HRESULT hr;
1355 TRACE("(%p)->%d %s %p %p\n", This, ulRecordNum, debugstr_guid(riid), ppObject, ppErrorInfoRem);
1357 *ppErrorInfoRem = NULL;
1358 hr = IErrorRecords_GetCustomErrorObject(This, ulRecordNum, riid, ppObject);
1359 if(FAILED(hr))
1360 GetErrorInfo(0, ppErrorInfoRem);
1362 return hr;
1365 HRESULT CALLBACK IErrorRecords_GetBasicErrorInfo_Proxy(IErrorRecords* This, ULONG ulRecordNum, ERRORINFO *pErrorInfo)
1367 TRACE("(%p)->%d %p\n", This, ulRecordNum, pErrorInfo);
1369 return IErrorRecords_GetBasicErrorInfo_Proxy(This, ulRecordNum, pErrorInfo);
1372 HRESULT __RPC_STUB IErrorRecords_GetBasicErrorInfo_Stub(IErrorRecords* This, ULONG ulRecordNum, ERRORINFO *pErrorInfo,
1373 IErrorInfo **ppErrorInfoRem)
1375 HRESULT hr;
1377 TRACE("(%p)->%d %p %p\n", This, ulRecordNum, pErrorInfo, ppErrorInfoRem);
1379 *ppErrorInfoRem = NULL;
1380 hr = IErrorRecords_GetBasicErrorInfo(This, ulRecordNum, pErrorInfo);
1381 if(FAILED(hr))
1382 GetErrorInfo(0, ppErrorInfoRem);
1384 return hr;
1387 HRESULT CALLBACK IErrorRecords_AddErrorRecord_Proxy(IErrorRecords* This, ERRORINFO *pErrorInfo, DWORD dwLookupID,
1388 DISPPARAMS *pdispparams, IUnknown *punkCustomError, DWORD dwDynamicErrorID)
1390 HRESULT hr;
1391 IErrorInfo *error;
1393 TRACE("(%p)->%p %d %p %p %d\n", This, pErrorInfo, dwLookupID, pdispparams, punkCustomError, dwDynamicErrorID);
1395 hr = IErrorRecords_RemoteAddErrorRecord_Proxy(This, pErrorInfo, dwLookupID, pdispparams, punkCustomError,
1396 dwDynamicErrorID, &error);
1397 if(error)
1399 SetErrorInfo(0, error);
1400 IErrorInfo_Release(error);
1402 return hr;
1405 HRESULT __RPC_STUB IErrorRecords_AddErrorRecord_Stub(IErrorRecords* This, ERRORINFO *pErrorInfo, DWORD dwLookupID,
1406 DISPPARAMS *pdispparams, IUnknown *punkCustomError, DWORD dwDynamicErrorID, IErrorInfo **ppErrorInfoRem)
1408 HRESULT hr;
1410 TRACE("(%p)->%p %d %p %p %d %p\n", This, pErrorInfo, dwLookupID, pdispparams, punkCustomError,
1411 dwDynamicErrorID, ppErrorInfoRem);
1413 *ppErrorInfoRem = NULL;
1414 hr = IErrorRecords_AddErrorRecord(This, pErrorInfo, dwLookupID, pdispparams, punkCustomError, dwDynamicErrorID);
1415 if(FAILED(hr))
1416 GetErrorInfo(0, ppErrorInfoRem);
1418 return hr;
1421 HRESULT __RPC_STUB IRowPosition_Initialize_Stub(IRowPosition* This, IUnknown *rowset, IErrorInfo **errorinfo)
1423 FIXME("(%p)->(%p %p): stub\n", This, rowset, errorinfo);
1424 return E_NOTIMPL;
1427 HRESULT __RPC_STUB IRowPosition_SetRowPosition_Stub(IRowPosition* This, HCHAPTER chapter, HROW row, DBPOSITIONFLAGS flags, IErrorInfo **errorinfo)
1429 FIXME("(%p)->(%lx %lx %d %p): stub\n", This, chapter, row, flags, errorinfo);
1430 return E_NOTIMPL;
1433 HRESULT __RPC_STUB IRowPosition_GetRowset_Stub(IRowPosition* This, REFIID riid, IUnknown **rowset, IErrorInfo **errorinfo)
1435 FIXME("(%p)->(%s %p %p): stub\n", This, debugstr_guid(riid), rowset, errorinfo);
1436 return E_NOTIMPL;
1439 HRESULT __RPC_STUB IRowPosition_GetRowPosition_Stub(IRowPosition* This, HCHAPTER *chapter, HROW *row, DBPOSITIONFLAGS *flags, IErrorInfo **errorinfo)
1441 FIXME("(%p)->(%p %p %p %p): stub\n", This, chapter, row, flags, errorinfo);
1442 return E_NOTIMPL;
1445 HRESULT __RPC_STUB IRowPosition_ClearRowPosition_Stub(IRowPosition* This, IErrorInfo **errorinfo)
1447 FIXME("(%p)->(%p): stub\n", This, errorinfo);
1448 return E_NOTIMPL;
1451 HRESULT CALLBACK IRowPosition_ClearRowPosition_Proxy(IRowPosition* This)
1453 FIXME("(%p): stub\n", This);
1454 return E_NOTIMPL;
1457 HRESULT CALLBACK IRowPosition_GetRowPosition_Proxy(IRowPosition* This, HCHAPTER *chapter, HROW *row, DBPOSITIONFLAGS *flags)
1459 FIXME("(%p)->(%p %p %p): stub\n", This, chapter, row, flags);
1460 return E_NOTIMPL;
1463 HRESULT CALLBACK IRowPosition_GetRowset_Proxy(IRowPosition* This, REFIID riid, IUnknown **rowset)
1465 FIXME("(%p)->(%s %p): stub\n", This, debugstr_guid(riid), rowset);
1466 return E_NOTIMPL;
1469 HRESULT CALLBACK IRowPosition_Initialize_Proxy(IRowPosition* This, IUnknown *rowset)
1471 FIXME("(%p)->(%p): stub\n", This, rowset);
1472 return E_NOTIMPL;
1475 HRESULT CALLBACK IRowPosition_SetRowPosition_Proxy(IRowPosition* This, HCHAPTER chapter, HROW row, DBPOSITIONFLAGS flags)
1477 FIXME("(%p)->(%lx %lx %d): stub\n", This, chapter, row, flags);
1478 return E_NOTIMPL;
1481 HRESULT __RPC_STUB IRowPositionChange_OnRowPositionChange_Stub(IRowPositionChange* This, DBREASON reason, DBEVENTPHASE phase,
1482 BOOL cant_deny, IErrorInfo **errorinfo)
1484 FIXME("(%p)->(0x%x 0x%x %d %p): stub\n", This, reason, phase, cant_deny, errorinfo);
1485 return E_NOTIMPL;
1488 HRESULT CALLBACK IRowPositionChange_OnRowPositionChange_Proxy(IRowPositionChange* This, DBREASON reason, DBEVENTPHASE phase,
1489 BOOL cant_deny)
1491 FIXME("(%p)->(0x%x 0x%x %d): stub\n", This, reason, phase, cant_deny);
1492 return E_NOTIMPL;
1495 HRESULT __RPC_STUB IChapteredRowset_ReleaseChapter_Stub(IChapteredRowset* This, HCHAPTER chapter, DBREFCOUNT *refcount, IErrorInfo **errorinfo)
1497 FIXME("(%p)->(%lx %p %p): stub\n", This, chapter, refcount, errorinfo);
1498 return E_NOTIMPL;
1501 HRESULT __RPC_STUB IChapteredRowset_AddRefChapter_Stub(IChapteredRowset* This, HCHAPTER chapter, DBREFCOUNT *refcount, IErrorInfo **errorinfo)
1503 FIXME("(%p)->(%lx %p %p): stub\n", This, chapter, refcount, errorinfo);
1504 return E_NOTIMPL;
1507 HRESULT CALLBACK IChapteredRowset_AddRefChapter_Proxy(IChapteredRowset* This, HCHAPTER chapter, DBREFCOUNT *refcount)
1509 FIXME("(%p)->(%lx %p): stub\n", This, chapter, refcount);
1510 return E_NOTIMPL;
1513 HRESULT CALLBACK IChapteredRowset_ReleaseChapter_Proxy(IChapteredRowset* This, HCHAPTER chapter, DBREFCOUNT *refcount)
1515 FIXME("(%p)->(%lx %p): stub\n", This, chapter, refcount);
1516 return E_NOTIMPL;