Release 1.1.37.
[wine/gsoc-2012-control.git] / dlls / msdaps / usrmarshal.c
blob0624c3a5315502747ceaeedd2a0bca075e05013d
1 /*
2 * Misc marshaling routinues
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 "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 FIXME("(%p): stub\n", This);
237 return E_NOTIMPL;
240 HRESULT __RPC_STUB IDBInitialize_Uninitialize_Stub(IDBInitialize* This, IErrorInfo **ppErrorInfoRem)
242 FIXME("(%p, %p): stub\n", This, ppErrorInfoRem);
243 return E_NOTIMPL;
246 HRESULT CALLBACK IDBDataSourceAdmin_CreateDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets,
247 DBPROPSET rgPropertySets[], IUnknown *pUnkOuter,
248 REFIID riid, IUnknown **ppDBSession)
250 ULONG prop_set, prop, total_props = 0;
251 HRESULT hr;
252 IErrorInfo *error;
253 DBPROPSTATUS *status;
255 TRACE("(%p, %d, %p, %p, %s, %p)\n", This, cPropertySets, rgPropertySets, pUnkOuter,
256 debugstr_guid(riid), ppDBSession);
258 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
259 total_props += rgPropertySets[prop_set].cProperties;
261 if(total_props == 0) return S_OK;
263 status = CoTaskMemAlloc(total_props * sizeof(*status));
264 if(!status) return E_OUTOFMEMORY;
266 hr = IDBDataSourceAdmin_RemoteCreateDataSource_Proxy(This, cPropertySets, rgPropertySets, pUnkOuter,
267 riid, ppDBSession, total_props, status, &error);
268 if(error)
270 SetErrorInfo(0, error);
271 IErrorInfo_Release(error);
274 total_props = 0;
275 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
276 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
277 rgPropertySets[prop_set].rgProperties[prop].dwStatus = status[total_props++];
279 CoTaskMemFree(status);
280 return hr;
283 HRESULT __RPC_STUB IDBDataSourceAdmin_CreateDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
284 DBPROPSET *rgPropertySets, IUnknown *pUnkOuter,
285 REFIID riid, IUnknown **ppDBSession, ULONG cTotalProps,
286 DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
288 ULONG prop_set, prop, total_props = 0;
289 HRESULT hr;
291 TRACE("(%p, %d, %p, %p, %s, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, pUnkOuter,
292 debugstr_guid(riid), ppDBSession, cTotalProps, rgPropStatus, ppErrorInfoRem);
294 *ppErrorInfoRem = NULL;
295 hr = IDBDataSourceAdmin_CreateDataSource(This, cPropertySets, rgPropertySets, pUnkOuter, riid, ppDBSession);
296 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
298 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
299 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
300 rgPropStatus[total_props++] = rgPropertySets[prop_set].rgProperties[prop].dwStatus;
302 return hr;
305 HRESULT CALLBACK IDBDataSourceAdmin_DestroyDataSource_Proxy(IDBDataSourceAdmin* This)
307 FIXME("(%p): stub\n", This);
308 return E_NOTIMPL;
311 HRESULT __RPC_STUB IDBDataSourceAdmin_DestroyDataSource_Stub(IDBDataSourceAdmin* This, IErrorInfo **ppErrorInfoRem)
313 FIXME("(%p, %p): stub\n", This, ppErrorInfoRem);
314 return E_NOTIMPL;
317 HRESULT CALLBACK IDBDataSourceAdmin_GetCreationProperties_Proxy(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
318 const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertyInfoSets,
319 DBPROPINFOSET **prgPropertyInfoSets, OLECHAR **ppDescBuffer)
321 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
322 prgPropertyInfoSets, ppDescBuffer);
323 return E_NOTIMPL;
326 HRESULT __RPC_STUB IDBDataSourceAdmin_GetCreationProperties_Stub(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
327 const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertyInfoSets,
328 DBPROPINFOSET **prgPropertyInfoSets, DBCOUNTITEM *pcOffsets,
329 DBBYTEOFFSET **prgDescOffsets, ULONG *pcbDescBuffer,
330 OLECHAR **ppDescBuffer, IErrorInfo **ppErrorInfoRem)
332 FIXME("(%p, %d, %p, %p, %p, %p, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
333 prgPropertyInfoSets, pcOffsets, prgDescOffsets, pcbDescBuffer, ppDescBuffer, ppErrorInfoRem);
334 return E_NOTIMPL;
337 HRESULT CALLBACK IDBDataSourceAdmin_ModifyDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
339 FIXME("(%p, %d, %p): stub\n", This, cPropertySets, rgPropertySets);
340 return E_NOTIMPL;
343 HRESULT __RPC_STUB IDBDataSourceAdmin_ModifyDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
344 DBPROPSET *rgPropertySets, IErrorInfo **ppErrorInfoRem)
346 FIXME("(%p, %d, %p, %p): stub\n", This, cPropertySets, rgPropertySets, ppErrorInfoRem);
347 return E_NOTIMPL;
350 HRESULT CALLBACK ISessionProperties_GetProperties_Proxy(ISessionProperties* This, ULONG cPropertyIDSets,
351 const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertySets,
352 DBPROPSET **prgPropertySets)
354 FIXME("(%p, %d, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets,
355 pcPropertySets, prgPropertySets);
356 return E_NOTIMPL;
359 HRESULT __RPC_STUB ISessionProperties_GetProperties_Stub(ISessionProperties* This, ULONG cPropertyIDSets,
360 const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertySets,
361 DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
363 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets,
364 pcPropertySets, prgPropertySets, ppErrorInfoRem);
365 return E_NOTIMPL;
368 HRESULT CALLBACK ISessionProperties_SetProperties_Proxy(ISessionProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
370 ULONG prop_set, prop, total_props = 0;
371 HRESULT hr;
372 IErrorInfo *error;
373 DBPROPSTATUS *status;
375 TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
377 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
378 total_props += rgPropertySets[prop_set].cProperties;
380 if(total_props == 0) return S_OK;
382 status = CoTaskMemAlloc(total_props * sizeof(*status));
383 if(!status) return E_OUTOFMEMORY;
385 hr = ISessionProperties_RemoteSetProperties_Proxy(This, cPropertySets, rgPropertySets,
386 total_props, status, &error);
387 if(error)
389 SetErrorInfo(0, error);
390 IErrorInfo_Release(error);
393 total_props = 0;
394 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
395 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
396 rgPropertySets[prop_set].rgProperties[prop].dwStatus = status[total_props++];
398 CoTaskMemFree(status);
399 return hr;
402 HRESULT __RPC_STUB ISessionProperties_SetProperties_Stub(ISessionProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
403 ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
405 ULONG prop_set, prop, total_props = 0;
406 HRESULT hr;
408 TRACE("(%p, %d, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, cTotalProps,
409 rgPropStatus, ppErrorInfoRem);
411 *ppErrorInfoRem = NULL;
412 hr = ISessionProperties_SetProperties(This, cPropertySets, rgPropertySets);
413 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
415 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
416 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
417 rgPropStatus[total_props++] = rgPropertySets[prop_set].rgProperties[prop].dwStatus;
419 return hr;
422 HRESULT CALLBACK IOpenRowset_OpenRowset_Proxy(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
423 REFIID riid, ULONG cPropertySets, DBPROPSET rgPropertySets[], IUnknown **ppRowset)
425 FIXME("(%p, %p, %p, %p, %s, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
426 cPropertySets, rgPropertySets, ppRowset);
427 return E_NOTIMPL;
430 HRESULT __RPC_STUB IOpenRowset_OpenRowset_Stub(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
431 REFIID riid, ULONG cPropertySets, DBPROPSET *rgPropertySets,
432 IUnknown **ppRowset, ULONG cTotalProps, DBPROPSTATUS *rgPropStatus,
433 IErrorInfo **ppErrorInfoRem)
435 FIXME("(%p, %p, %p, %p, %s, %d, %p, %p, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
436 cPropertySets, rgPropertySets, ppRowset, cTotalProps, rgPropStatus, ppErrorInfoRem);
437 return E_NOTIMPL;
440 HRESULT CALLBACK IBindResource_Bind_Proxy(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
441 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
442 DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
444 HRESULT hr;
446 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
447 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppUnk);
449 hr = IBindResource_RemoteBind_Proxy(This, pUnkOuter, pwszURL, dwBindURLFlags, rguid, riid, pAuthenticate,
450 pImplSession ? pImplSession->pUnkOuter : NULL, pImplSession ? pImplSession->piid : NULL,
451 pImplSession ? &pImplSession->pSession : NULL, pdwBindStatus, ppUnk);
452 return hr;
455 HRESULT __RPC_STUB IBindResource_Bind_Stub(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
456 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
457 IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
459 HRESULT hr;
460 DBIMPLICITSESSION impl_session;
462 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
463 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppUnk);
465 impl_session.pUnkOuter = pSessionUnkOuter;
466 impl_session.piid = piid;
467 impl_session.pSession = NULL;
469 hr = IBindResource_Bind(This, pUnkOuter, pwszURL, dwBindURLFlags, rguid, riid, pAuthenticate,
470 ppSession ? &impl_session : NULL, pdwBindStatus, ppUnk);
472 if(ppSession) *ppSession = impl_session.pSession;
473 return hr;
476 HRESULT CALLBACK ICreateRow_CreateRow_Proxy(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
477 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
478 DBBINDURLSTATUS *pdwBindStatus, LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
480 HRESULT hr;
482 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
483 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppwszNewURL, ppUnk);
485 hr = ICreateRow_RemoteCreateRow_Proxy(This, pUnkOuter, pwszURL, dwBindURLFlags, rguid, riid, pAuthenticate,
486 pImplSession ? pImplSession->pUnkOuter : NULL, pImplSession ? pImplSession->piid : NULL,
487 pImplSession ? &pImplSession->pSession : NULL, pdwBindStatus, ppwszNewURL, ppUnk);
488 return hr;
491 HRESULT __RPC_STUB ICreateRow_CreateRow_Stub(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
492 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
493 IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus,
494 LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
496 HRESULT hr;
497 DBIMPLICITSESSION impl_session;
499 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p, %p)\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
500 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppwszNewURL,
501 ppUnk);
503 impl_session.pUnkOuter = pSessionUnkOuter;
504 impl_session.piid = piid;
505 impl_session.pSession = NULL;
507 hr = ICreateRow_CreateRow(This, pUnkOuter, pwszURL, dwBindURLFlags, rguid, riid, pAuthenticate,
508 ppSession ? &impl_session : NULL, pdwBindStatus, ppwszNewURL, ppUnk);
510 if(ppSession) *ppSession = impl_session.pSession;
511 return hr;
514 HRESULT CALLBACK IAccessor_AddRefAccessor_Proxy(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount)
516 FIXME("(%p)->(%08lx, %p): stub\n", This, hAccessor, pcRefCount);
517 return E_NOTIMPL;
520 HRESULT __RPC_STUB IAccessor_AddRefAccessor_Stub(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount,
521 IErrorInfo **ppErrorInfoRem)
523 FIXME("(%p)->(%08lx, %p, %p): stub\n", This, hAccessor, pcRefCount, ppErrorInfoRem);
524 return E_NOTIMPL;
527 HRESULT CALLBACK IAccessor_CreateAccessor_Proxy(IAccessor* This, DBACCESSORFLAGS dwAccessorFlags, DBCOUNTITEM cBindings,
528 const DBBINDING rgBindings[], DBLENGTH cbRowSize, HACCESSOR *phAccessor,
529 DBBINDSTATUS rgStatus[])
531 HRESULT hr;
532 IErrorInfo *error;
533 DBCOUNTITEM i;
535 TRACE("(%p)->(%08x, %d, %p, %d, %p, %p)\n", This, dwAccessorFlags, cBindings, rgBindings,
536 cbRowSize, phAccessor, rgStatus);
538 for(i = 0; i < cBindings; i++)
540 TRACE("%d: ord %d val off %d len off %d stat off %d part %04x mem_owner %d max_len %d type %04x\n",
541 i, rgBindings[i].iOrdinal, rgBindings[i].obValue, rgBindings[i].obLength, rgBindings[i].obStatus,
542 rgBindings[i].dwPart, rgBindings[i].dwMemOwner, rgBindings[i].cbMaxLen, rgBindings[i].wType);
545 hr = IAccessor_RemoteCreateAccessor_Proxy(This, dwAccessorFlags, cBindings, (DBBINDING *)rgBindings,
546 cbRowSize, phAccessor, rgStatus, &error);
547 if(error)
549 SetErrorInfo(0, error);
550 IErrorInfo_Release(error);
553 TRACE("returning %08x accessor %lx\n", hr, *phAccessor);
554 return hr;
557 HRESULT __RPC_STUB IAccessor_CreateAccessor_Stub(IAccessor* This, DBACCESSORFLAGS dwAccessorFlags, DBCOUNTITEM cBindings,
558 DBBINDING *rgBindings, DBLENGTH cbRowSize, HACCESSOR *phAccessor,
559 DBBINDSTATUS *rgStatus, IErrorInfo **ppErrorInfoRem)
561 HRESULT hr;
563 TRACE("(%p)->(%08x, %d, %p, %d, %p, %p, %p)\n", This, dwAccessorFlags, cBindings, rgBindings,
564 cbRowSize, phAccessor, rgStatus, ppErrorInfoRem);
566 *ppErrorInfoRem = NULL;
567 hr = IAccessor_CreateAccessor(This, dwAccessorFlags, cBindings, rgBindings,
568 cbRowSize, phAccessor, rgStatus);
569 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
571 return hr;
574 HRESULT CALLBACK IAccessor_GetBindings_Proxy(IAccessor* This, HACCESSOR hAccessor, DBACCESSORFLAGS *pdwAccessorFlags,
575 DBCOUNTITEM *pcBindings, DBBINDING **prgBindings)
577 FIXME("(%p): stub\n", This);
578 return E_NOTIMPL;
581 HRESULT __RPC_STUB IAccessor_GetBindings_Stub(IAccessor* This, HACCESSOR hAccessor, DBACCESSORFLAGS *pdwAccessorFlags,
582 DBCOUNTITEM *pcBindings, DBBINDING **prgBindings, IErrorInfo **ppErrorInfoRem)
584 FIXME("(%p): stub\n", This);
585 return E_NOTIMPL;
588 HRESULT CALLBACK IAccessor_ReleaseAccessor_Proxy(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount)
590 HRESULT hr;
591 IErrorInfo *error;
592 DBREFCOUNT ref;
594 TRACE("(%p)->(%lx, %p)\n", This, hAccessor, pcRefCount);
596 hr = IAccessor_RemoteReleaseAccessor_Proxy(This, hAccessor, &ref, &error);
598 if(pcRefCount) *pcRefCount = ref;
599 if(error)
601 SetErrorInfo(0, error);
602 IErrorInfo_Release(error);
604 return hr;
607 HRESULT __RPC_STUB IAccessor_ReleaseAccessor_Stub(IAccessor* This, HACCESSOR hAccessor, DBREFCOUNT *pcRefCount,
608 IErrorInfo **ppErrorInfoRem)
610 HRESULT hr;
612 TRACE("(%p)->(%lx, %p, %p)\n", This, hAccessor, pcRefCount, ppErrorInfoRem);
614 *ppErrorInfoRem = NULL;
616 hr = IAccessor_ReleaseAccessor(This, hAccessor, pcRefCount);
618 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
619 return hr;
622 HRESULT CALLBACK IRowsetInfo_GetProperties_Proxy(IRowsetInfo* This, const ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
623 ULONG *pcPropertySets, DBPROPSET **prgPropertySets)
625 HRESULT hr;
626 IErrorInfo *error;
627 ULONG i;
629 TRACE("(%p)->(%d, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets);
631 for(i = 0; i < cPropertyIDSets; i++)
633 int j;
634 TRACE("%d: %s %d props\n", i, debugstr_guid(&rgPropertyIDSets[i].guidPropertySet), rgPropertyIDSets[i].cPropertyIDs);
635 for(j = 0; j < rgPropertyIDSets[i].cPropertyIDs; j++)
636 TRACE("\t%d: prop id %d\n", j, rgPropertyIDSets[i].rgPropertyIDs[j]);
639 hr = IRowsetInfo_RemoteGetProperties_Proxy(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, &error);
641 if(error)
643 SetErrorInfo(0, error);
644 IErrorInfo_Release(error);
646 return hr;
649 HRESULT __RPC_STUB IRowsetInfo_GetProperties_Stub(IRowsetInfo* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
650 ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
652 HRESULT hr;
654 TRACE("(%p)->(%d, %p, %p, %p, %p)\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets, ppErrorInfoRem);
656 *ppErrorInfoRem = NULL;
658 hr = IRowsetInfo_GetProperties(This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets, prgPropertySets);
659 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
660 TRACE("returning %08x\n", hr);
661 return hr;
664 HRESULT CALLBACK IRowsetInfo_GetReferencedRowset_Proxy(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset)
666 FIXME("(%p)->(%d, %s, %p): stub\n", This, iOrdinal, debugstr_guid(riid), ppReferencedRowset);
667 return E_NOTIMPL;
670 HRESULT __RPC_STUB IRowsetInfo_GetReferencedRowset_Stub(IRowsetInfo* This, DBORDINAL iOrdinal, REFIID riid, IUnknown **ppReferencedRowset,
671 IErrorInfo **ppErrorInfoRem)
673 FIXME("(%p)->(%d, %s, %p, %p): stub\n", This, iOrdinal, debugstr_guid(riid), ppReferencedRowset, ppErrorInfoRem);
674 return E_NOTIMPL;
677 HRESULT CALLBACK IRowsetInfo_GetSpecification_Proxy(IRowsetInfo* This, REFIID riid, IUnknown **ppSpecification)
679 FIXME("(%p)->(%s, %p): stub\n", This, debugstr_guid(riid), ppSpecification);
680 return E_NOTIMPL;
683 HRESULT __RPC_STUB IRowsetInfo_GetSpecification_Stub(IRowsetInfo* This, REFIID riid, IUnknown **ppSpecification, IErrorInfo **ppErrorInfoRem)
685 FIXME("(%p)->(%s, %p, %p): stub\n", This, debugstr_guid(riid), ppSpecification, ppErrorInfoRem);
686 return E_NOTIMPL;
689 HRESULT CALLBACK ICommand_Cancel_Proxy(ICommand* This)
691 FIXME("(%p): stub\n", This);
692 return E_NOTIMPL;
695 HRESULT __RPC_STUB ICommand_Cancel_Stub(ICommand* This, IErrorInfo **ppErrorInfoRem)
697 FIXME("(%p)->(%p): stub\n", This, ppErrorInfoRem);
698 return E_NOTIMPL;
701 HRESULT CALLBACK ICommand_Execute_Proxy(ICommand* This, IUnknown *pUnkOuter, REFIID riid,
702 DBPARAMS *pParams, DBROWCOUNT *pcRowsAffected, IUnknown **ppRowset)
704 FIXME("(%p)->(%p, %s, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_guid(riid), pParams,
705 pcRowsAffected, ppRowset);
706 if(pParams) TRACE("params {%p, %d, %08lx}\n", pParams->pData, pParams->cParamSets, pParams->hAccessor);
708 return E_NOTIMPL;
711 HRESULT __RPC_STUB ICommand_Execute_Stub(ICommand* This, IUnknown *pUnkOuter, REFIID riid, HACCESSOR hAccessor,
712 DB_UPARAMS cParamSets, GUID *pGuid, ULONG ulGuidOffset, RMTPACK *pInputParams,
713 RMTPACK *pOutputParams, DBCOUNTITEM cBindings, DBBINDING *rgBindings,
714 DBSTATUS *rgStatus, DBROWCOUNT *pcRowsAffected, IUnknown **ppRowset)
716 FIXME("(%p)->(%p, %s, %08lx, %d, %p, %d, %p, %p, %d, %p, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_guid(riid),
717 hAccessor, cParamSets, pGuid, ulGuidOffset, pInputParams, pOutputParams, cBindings, rgBindings, rgStatus,
718 pcRowsAffected, ppRowset);
719 return E_NOTIMPL;
722 HRESULT CALLBACK ICommand_GetDBSession_Proxy(ICommand* This, REFIID riid, IUnknown **ppSession)
724 FIXME("(%p)->(%s, %p): stub\n", This, debugstr_guid(riid), ppSession);
725 return E_NOTIMPL;
728 HRESULT __RPC_STUB ICommand_GetDBSession_Stub(ICommand* This, REFIID riid, IUnknown **ppSession, IErrorInfo **ppErrorInfoRem)
730 FIXME("(%p)->(%s, %p, %p): stub\n", This, debugstr_guid(riid), ppSession, ppErrorInfoRem);
731 return E_NOTIMPL;
734 HRESULT CALLBACK ICommandText_GetCommandText_Proxy(ICommandText* This, GUID *pguidDialect, LPOLESTR *ppwszCommand)
736 FIXME("(%p)->(%p, %p): stub\n", This, pguidDialect, ppwszCommand);
737 return E_NOTIMPL;
740 HRESULT __RPC_STUB ICommandText_GetCommandText_Stub(ICommandText* This, GUID *pguidDialect,
741 LPOLESTR *ppwszCommand, IErrorInfo **ppErrorInfoRem)
743 FIXME("(%p)->(%p, %p, %p): stub\n", This, pguidDialect, ppwszCommand, ppErrorInfoRem);
744 return E_NOTIMPL;
747 HRESULT CALLBACK ICommandText_SetCommandText_Proxy(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand)
749 HRESULT hr;
750 IErrorInfo *error;
752 TRACE("(%p)->(%s, %s)\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand));
754 hr = ICommandText_RemoteSetCommandText_Proxy(This, rguidDialect, pwszCommand, &error);
755 if(error)
757 SetErrorInfo(0, error);
758 IErrorInfo_Release(error);
760 return hr;
763 HRESULT __RPC_STUB ICommandText_SetCommandText_Stub(ICommandText* This, REFGUID rguidDialect, LPCOLESTR pwszCommand,
764 IErrorInfo **ppErrorInfoRem)
766 HRESULT hr;
768 TRACE("(%p)->(%s, %s, %p)\n", This, debugstr_guid(rguidDialect), debugstr_w(pwszCommand),
769 ppErrorInfoRem);
771 *ppErrorInfoRem = NULL;
772 hr = ICommandText_SetCommandText(This, rguidDialect, pwszCommand);
773 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
775 return hr;
778 HRESULT CALLBACK IDBAsynchNotify_OnLowResource_Proxy(IDBAsynchNotify* This, DB_DWRESERVE dwReserved)
780 FIXME("(%p)->(%08x): stub\n", This, dwReserved);
781 return E_NOTIMPL;
784 HRESULT __RPC_STUB IDBAsynchNotify_OnLowResource_Stub(IDBAsynchNotify* This, DB_DWRESERVE dwReserved)
786 FIXME("(%p)->(%08x): stub\n", This, dwReserved);
787 return E_NOTIMPL;
790 HRESULT CALLBACK IDBAsynchNotify_OnProgress_Proxy(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
791 DBCOUNTITEM ulProgress, DBCOUNTITEM ulProgressMax, DBASYNCHPHASE eAsynchPhase,
792 LPOLESTR pwszStatusText)
794 FIXME("(%p)->(%lx, %d, %d, %d, %d, %s): stub\n", This, hChapter, eOperation, ulProgress, ulProgressMax,
795 eAsynchPhase, debugstr_w(pwszStatusText));
796 return E_NOTIMPL;
799 HRESULT __RPC_STUB IDBAsynchNotify_OnProgress_Stub(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
800 DBCOUNTITEM ulProgress, DBCOUNTITEM ulProgressMax, DBASYNCHPHASE eAsynchPhase,
801 LPOLESTR pwszStatusText)
803 FIXME("(%p)->(%lx, %d, %d, %d, %d, %s): stub\n", This, hChapter, eOperation, ulProgress, ulProgressMax,
804 eAsynchPhase, debugstr_w(pwszStatusText));
805 return E_NOTIMPL;
808 HRESULT CALLBACK IDBAsynchNotify_OnStop_Proxy(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
809 HRESULT hrStatus, LPOLESTR pwszStatusText)
811 FIXME("(%p)->(%lx, %d, %08x, %s): stub\n", This, hChapter, eOperation, hrStatus, debugstr_w(pwszStatusText));
812 return E_NOTIMPL;
815 HRESULT __RPC_STUB IDBAsynchNotify_OnStop_Stub(IDBAsynchNotify* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
816 HRESULT hrStatus, LPOLESTR pwszStatusText)
818 FIXME("(%p)->(%lx, %d, %08x, %s): stub\n", This, hChapter, eOperation, hrStatus, debugstr_w(pwszStatusText));
819 return E_NOTIMPL;
822 HRESULT CALLBACK IDBAsynchStatus_Abort_Proxy(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation)
824 FIXME("(%p)->(%lx, %d): stub\n", This, hChapter, eOperation);
825 return E_NOTIMPL;
828 HRESULT __RPC_STUB IDBAsynchStatus_Abort_Stub(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
829 IErrorInfo **ppErrorInfoRem)
831 FIXME("(%p)->(%lx, %d, %p): stub\n", This, hChapter, eOperation, ppErrorInfoRem);
832 return E_NOTIMPL;
835 HRESULT CALLBACK IDBAsynchStatus_GetStatus_Proxy(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
836 DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase,
837 LPOLESTR *ppwszStatusText)
839 FIXME("(%p)->(%lx, %d, %p, %p, %p, %p): stub\n", This, hChapter, eOperation, pulProgress, pulProgressMax,
840 peAsynchPhase, ppwszStatusText);
841 return E_NOTIMPL;
844 HRESULT __RPC_STUB IDBAsynchStatus_GetStatus_Stub(IDBAsynchStatus* This, HCHAPTER hChapter, DBASYNCHOP eOperation,
845 DBCOUNTITEM *pulProgress, DBCOUNTITEM *pulProgressMax, DBASYNCHPHASE *peAsynchPhase,
846 LPOLESTR *ppwszStatusText, IErrorInfo **ppErrorInfoRem)
848 FIXME("(%p)->(%lx, %d, %p, %p, %p, %p, %p): stub\n", This, hChapter, eOperation, pulProgress, pulProgressMax,
849 peAsynchPhase, ppwszStatusText, ppErrorInfoRem);
850 return E_NOTIMPL;