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
24 #define NONAMELESSUNION
25 #define NONAMELESSSTRUCT
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
)
48 TRACE("(%p, %p, %s, %p)\n", This
, pUnkOuter
, debugstr_guid(riid
), ppCommand
);
49 hr
= IDBCreateCommand_RemoteCreateCommand_Proxy(This
, pUnkOuter
, riid
, ppCommand
, &error
);
52 SetErrorInfo(0, error
);
53 IErrorInfo_Release(error
);
58 HRESULT __RPC_STUB
IDBCreateCommand_CreateCommand_Stub(IDBCreateCommand
* This
, IUnknown
*pUnkOuter
,
59 REFIID riid
, IUnknown
**ppCommand
, IErrorInfo
**ppErrorInfoRem
)
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
);
72 HRESULT CALLBACK
IDBCreateSession_CreateSession_Proxy(IDBCreateSession
* This
, IUnknown
*pUnkOuter
,
73 REFIID riid
, IUnknown
**ppDBSession
)
78 TRACE("(%p, %p, %s, %p)\n", This
, pUnkOuter
, debugstr_guid(riid
), ppDBSession
);
79 hr
= IDBCreateSession_RemoteCreateSession_Proxy(This
, pUnkOuter
, riid
, ppDBSession
, &error
);
82 SetErrorInfo(0, error
);
83 IErrorInfo_Release(error
);
88 HRESULT __RPC_STUB
IDBCreateSession_CreateSession_Stub(IDBCreateSession
* This
, IUnknown
*pUnkOuter
,
89 REFIID riid
, IUnknown
**ppDBSession
, IErrorInfo
**ppErrorInfoRem
)
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
);
102 HRESULT CALLBACK
IDBProperties_GetProperties_Proxy(IDBProperties
* This
, ULONG cPropertyIDSets
, const DBPROPIDSET rgPropertyIDSets
[],
103 ULONG
*pcPropertySets
, DBPROPSET
**prgPropertySets
)
108 TRACE("(%p, %d, %p, %p, %p)\n", This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertySets
,
110 hr
= IDBProperties_RemoteGetProperties_Proxy(This
, cPropertyIDSets
, rgPropertyIDSets
,
111 pcPropertySets
, prgPropertySets
, &error
);
114 SetErrorInfo(0, error
);
115 IErrorInfo_Release(error
);
120 HRESULT __RPC_STUB
IDBProperties_GetProperties_Stub(IDBProperties
* This
, ULONG cPropertyIDSets
, const DBPROPIDSET
*rgPropertyIDSets
,
121 ULONG
*pcPropertySets
, DBPROPSET
**prgPropertySets
, IErrorInfo
**ppErrorInfoRem
)
125 TRACE("(%p, %d, %p, %p, %p, %p)\n", This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertySets
,
126 prgPropertySets
, ppErrorInfoRem
);
128 *ppErrorInfoRem
= NULL
;
129 hr
= IDBProperties_GetProperties(This
, cPropertyIDSets
, rgPropertyIDSets
,
130 pcPropertySets
, prgPropertySets
);
131 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
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
);
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
);
155 HRESULT CALLBACK
IDBProperties_SetProperties_Proxy(IDBProperties
* This
, ULONG cPropertySets
, DBPROPSET rgPropertySets
[])
157 ULONG prop_set
, prop
, total_props
= 0;
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
);
176 SetErrorInfo(0, error
);
177 IErrorInfo_Release(error
);
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
);
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;
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
;
209 HRESULT CALLBACK
IDBInitialize_Initialize_Proxy(IDBInitialize
* This
)
214 TRACE("(%p)\n", This
);
215 hr
= IDBInitialize_RemoteInitialize_Proxy(This
, &error
);
218 SetErrorInfo(0, error
);
219 IErrorInfo_Release(error
);
224 HRESULT __RPC_STUB
IDBInitialize_Initialize_Stub(IDBInitialize
* This
, IErrorInfo
**ppErrorInfoRem
)
227 TRACE("(%p, %p)\n", This
, ppErrorInfoRem
);
229 *ppErrorInfoRem
= NULL
;
230 hr
= IDBInitialize_Initialize(This
);
231 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
236 HRESULT CALLBACK
IDBInitialize_Uninitialize_Proxy(IDBInitialize
* This
)
238 FIXME("(%p): stub\n", This
);
242 HRESULT __RPC_STUB
IDBInitialize_Uninitialize_Stub(IDBInitialize
* This
, IErrorInfo
**ppErrorInfoRem
)
244 FIXME("(%p, %p): stub\n", This
, ppErrorInfoRem
);
248 HRESULT CALLBACK
IDBDataSourceAdmin_CreateDataSource_Proxy(IDBDataSourceAdmin
* This
, ULONG cPropertySets
,
249 DBPROPSET rgPropertySets
[], IUnknown
*pUnkOuter
,
250 REFIID riid
, IUnknown
**ppDBSession
)
252 ULONG prop_set
, prop
, total_props
= 0;
255 DBPROPSTATUS
*status
;
257 TRACE("(%p, %d, %p, %p, %s, %p)\n", This
, cPropertySets
, rgPropertySets
, pUnkOuter
,
258 debugstr_guid(riid
), ppDBSession
);
260 for(prop_set
= 0; prop_set
< cPropertySets
; prop_set
++)
261 total_props
+= rgPropertySets
[prop_set
].cProperties
;
263 if(total_props
== 0) return S_OK
;
265 status
= CoTaskMemAlloc(total_props
* sizeof(*status
));
266 if(!status
) return E_OUTOFMEMORY
;
268 hr
= IDBDataSourceAdmin_RemoteCreateDataSource_Proxy(This
, cPropertySets
, rgPropertySets
, pUnkOuter
,
269 riid
, ppDBSession
, total_props
, status
, &error
);
272 SetErrorInfo(0, error
);
273 IErrorInfo_Release(error
);
277 for(prop_set
= 0; prop_set
< cPropertySets
; prop_set
++)
278 for(prop
= 0; prop
< rgPropertySets
[prop_set
].cProperties
; prop
++)
279 rgPropertySets
[prop_set
].rgProperties
[prop
].dwStatus
= status
[total_props
++];
281 CoTaskMemFree(status
);
285 HRESULT __RPC_STUB
IDBDataSourceAdmin_CreateDataSource_Stub(IDBDataSourceAdmin
* This
, ULONG cPropertySets
,
286 DBPROPSET
*rgPropertySets
, IUnknown
*pUnkOuter
,
287 REFIID riid
, IUnknown
**ppDBSession
, ULONG cTotalProps
,
288 DBPROPSTATUS
*rgPropStatus
, IErrorInfo
**ppErrorInfoRem
)
290 ULONG prop_set
, prop
, total_props
= 0;
293 TRACE("(%p, %d, %p, %p, %s, %p, %d, %p, %p)\n", This
, cPropertySets
, rgPropertySets
, pUnkOuter
,
294 debugstr_guid(riid
), ppDBSession
, cTotalProps
, rgPropStatus
, ppErrorInfoRem
);
296 *ppErrorInfoRem
= NULL
;
297 hr
= IDBDataSourceAdmin_CreateDataSource(This
, cPropertySets
, rgPropertySets
, pUnkOuter
, riid
, ppDBSession
);
298 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
300 for(prop_set
= 0; prop_set
< cPropertySets
; prop_set
++)
301 for(prop
= 0; prop
< rgPropertySets
[prop_set
].cProperties
; prop
++)
302 rgPropStatus
[total_props
++] = rgPropertySets
[prop_set
].rgProperties
[prop
].dwStatus
;
307 HRESULT CALLBACK
IDBDataSourceAdmin_DestroyDataSource_Proxy(IDBDataSourceAdmin
* This
)
309 FIXME("(%p): stub\n", This
);
313 HRESULT __RPC_STUB
IDBDataSourceAdmin_DestroyDataSource_Stub(IDBDataSourceAdmin
* This
, IErrorInfo
**ppErrorInfoRem
)
315 FIXME("(%p, %p): stub\n", This
, ppErrorInfoRem
);
319 HRESULT CALLBACK
IDBDataSourceAdmin_GetCreationProperties_Proxy(IDBDataSourceAdmin
* This
, ULONG cPropertyIDSets
,
320 const DBPROPIDSET rgPropertyIDSets
[], ULONG
*pcPropertyInfoSets
,
321 DBPROPINFOSET
**prgPropertyInfoSets
, OLECHAR
**ppDescBuffer
)
323 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertyInfoSets
,
324 prgPropertyInfoSets
, ppDescBuffer
);
328 HRESULT __RPC_STUB
IDBDataSourceAdmin_GetCreationProperties_Stub(IDBDataSourceAdmin
* This
, ULONG cPropertyIDSets
,
329 const DBPROPIDSET
*rgPropertyIDSets
, ULONG
*pcPropertyInfoSets
,
330 DBPROPINFOSET
**prgPropertyInfoSets
, DBCOUNTITEM
*pcOffsets
,
331 DBBYTEOFFSET
**prgDescOffsets
, ULONG
*pcbDescBuffer
,
332 OLECHAR
**ppDescBuffer
, IErrorInfo
**ppErrorInfoRem
)
334 FIXME("(%p, %d, %p, %p, %p, %p, %p, %p, %p, %p): stub\n", This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertyInfoSets
,
335 prgPropertyInfoSets
, pcOffsets
, prgDescOffsets
, pcbDescBuffer
, ppDescBuffer
, ppErrorInfoRem
);
339 HRESULT CALLBACK
IDBDataSourceAdmin_ModifyDataSource_Proxy(IDBDataSourceAdmin
* This
, ULONG cPropertySets
, DBPROPSET rgPropertySets
[])
341 FIXME("(%p, %d, %p): stub\n", This
, cPropertySets
, rgPropertySets
);
345 HRESULT __RPC_STUB
IDBDataSourceAdmin_ModifyDataSource_Stub(IDBDataSourceAdmin
* This
, ULONG cPropertySets
,
346 DBPROPSET
*rgPropertySets
, IErrorInfo
**ppErrorInfoRem
)
348 FIXME("(%p, %d, %p, %p): stub\n", This
, cPropertySets
, rgPropertySets
, ppErrorInfoRem
);
352 HRESULT CALLBACK
ISessionProperties_GetProperties_Proxy(ISessionProperties
* This
, ULONG cPropertyIDSets
,
353 const DBPROPIDSET rgPropertyIDSets
[], ULONG
*pcPropertySets
,
354 DBPROPSET
**prgPropertySets
)
356 FIXME("(%p, %d, %p, %p, %p): stub\n", This
, cPropertyIDSets
, rgPropertyIDSets
,
357 pcPropertySets
, prgPropertySets
);
361 HRESULT __RPC_STUB
ISessionProperties_GetProperties_Stub(ISessionProperties
* This
, ULONG cPropertyIDSets
,
362 const DBPROPIDSET
*rgPropertyIDSets
, ULONG
*pcPropertySets
,
363 DBPROPSET
**prgPropertySets
, IErrorInfo
**ppErrorInfoRem
)
365 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This
, cPropertyIDSets
, rgPropertyIDSets
,
366 pcPropertySets
, prgPropertySets
, ppErrorInfoRem
);
370 HRESULT CALLBACK
ISessionProperties_SetProperties_Proxy(ISessionProperties
* This
, ULONG cPropertySets
, DBPROPSET rgPropertySets
[])
372 ULONG prop_set
, prop
, total_props
= 0;
375 DBPROPSTATUS
*status
;
377 TRACE("(%p, %d, %p)\n", This
, cPropertySets
, rgPropertySets
);
379 for(prop_set
= 0; prop_set
< cPropertySets
; prop_set
++)
380 total_props
+= rgPropertySets
[prop_set
].cProperties
;
382 if(total_props
== 0) return S_OK
;
384 status
= CoTaskMemAlloc(total_props
* sizeof(*status
));
385 if(!status
) return E_OUTOFMEMORY
;
387 hr
= ISessionProperties_RemoteSetProperties_Proxy(This
, cPropertySets
, rgPropertySets
,
388 total_props
, status
, &error
);
391 SetErrorInfo(0, error
);
392 IErrorInfo_Release(error
);
396 for(prop_set
= 0; prop_set
< cPropertySets
; prop_set
++)
397 for(prop
= 0; prop
< rgPropertySets
[prop_set
].cProperties
; prop
++)
398 rgPropertySets
[prop_set
].rgProperties
[prop
].dwStatus
= status
[total_props
++];
400 CoTaskMemFree(status
);
404 HRESULT __RPC_STUB
ISessionProperties_SetProperties_Stub(ISessionProperties
* This
, ULONG cPropertySets
, DBPROPSET
*rgPropertySets
,
405 ULONG cTotalProps
, DBPROPSTATUS
*rgPropStatus
, IErrorInfo
**ppErrorInfoRem
)
407 ULONG prop_set
, prop
, total_props
= 0;
410 TRACE("(%p, %d, %p, %d, %p, %p)\n", This
, cPropertySets
, rgPropertySets
, cTotalProps
,
411 rgPropStatus
, ppErrorInfoRem
);
413 *ppErrorInfoRem
= NULL
;
414 hr
= ISessionProperties_SetProperties(This
, cPropertySets
, rgPropertySets
);
415 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
417 for(prop_set
= 0; prop_set
< cPropertySets
; prop_set
++)
418 for(prop
= 0; prop
< rgPropertySets
[prop_set
].cProperties
; prop
++)
419 rgPropStatus
[total_props
++] = rgPropertySets
[prop_set
].rgProperties
[prop
].dwStatus
;
424 HRESULT CALLBACK
IOpenRowset_OpenRowset_Proxy(IOpenRowset
* This
, IUnknown
*pUnkOuter
, DBID
*pTableID
, DBID
*pIndexID
,
425 REFIID riid
, ULONG cPropertySets
, DBPROPSET rgPropertySets
[], IUnknown
**ppRowset
)
427 FIXME("(%p, %p, %p, %p, %s, %d, %p, %p): stub\n", This
, pUnkOuter
, pTableID
, pIndexID
, debugstr_guid(riid
),
428 cPropertySets
, rgPropertySets
, ppRowset
);
432 HRESULT __RPC_STUB
IOpenRowset_OpenRowset_Stub(IOpenRowset
* This
, IUnknown
*pUnkOuter
, DBID
*pTableID
, DBID
*pIndexID
,
433 REFIID riid
, ULONG cPropertySets
, DBPROPSET
*rgPropertySets
,
434 IUnknown
**ppRowset
, ULONG cTotalProps
, DBPROPSTATUS
*rgPropStatus
,
435 IErrorInfo
**ppErrorInfoRem
)
437 FIXME("(%p, %p, %p, %p, %s, %d, %p, %p, %d, %p, %p): stub\n", This
, pUnkOuter
, pTableID
, pIndexID
, debugstr_guid(riid
),
438 cPropertySets
, rgPropertySets
, ppRowset
, cTotalProps
, rgPropStatus
, ppErrorInfoRem
);
442 HRESULT CALLBACK
IBindResource_Bind_Proxy(IBindResource
* This
, IUnknown
*pUnkOuter
, LPCOLESTR pwszURL
, DBBINDURLFLAG dwBindURLFlags
,
443 REFGUID rguid
, REFIID riid
, IAuthenticate
*pAuthenticate
, DBIMPLICITSESSION
*pImplSession
,
444 DBBINDURLSTATUS
*pdwBindStatus
, IUnknown
**ppUnk
)
448 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p)\n", This
, pUnkOuter
, debugstr_w(pwszURL
), dwBindURLFlags
,
449 debugstr_guid(rguid
), debugstr_guid(riid
), pAuthenticate
, pImplSession
, pdwBindStatus
, ppUnk
);
451 hr
= IBindResource_RemoteBind_Proxy(This
, pUnkOuter
, pwszURL
, dwBindURLFlags
, rguid
, riid
, pAuthenticate
,
452 pImplSession
? pImplSession
->pUnkOuter
: NULL
, pImplSession
? pImplSession
->piid
: NULL
,
453 pImplSession
? &pImplSession
->pSession
: NULL
, pdwBindStatus
, ppUnk
);
457 HRESULT __RPC_STUB
IBindResource_Bind_Stub(IBindResource
* This
, IUnknown
*pUnkOuter
, LPCOLESTR pwszURL
, DBBINDURLFLAG dwBindURLFlags
,
458 REFGUID rguid
, REFIID riid
, IAuthenticate
*pAuthenticate
, IUnknown
*pSessionUnkOuter
,
459 IID
*piid
, IUnknown
**ppSession
, DBBINDURLSTATUS
*pdwBindStatus
, IUnknown
**ppUnk
)
462 DBIMPLICITSESSION impl_session
;
464 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p)\n", This
, pUnkOuter
, debugstr_w(pwszURL
), dwBindURLFlags
,
465 debugstr_guid(rguid
), debugstr_guid(riid
), pAuthenticate
, pSessionUnkOuter
, piid
, ppSession
, pdwBindStatus
, ppUnk
);
467 impl_session
.pUnkOuter
= pSessionUnkOuter
;
468 impl_session
.piid
= piid
;
469 impl_session
.pSession
= NULL
;
471 hr
= IBindResource_Bind(This
, pUnkOuter
, pwszURL
, dwBindURLFlags
, rguid
, riid
, pAuthenticate
,
472 ppSession
? &impl_session
: NULL
, pdwBindStatus
, ppUnk
);
474 if(ppSession
) *ppSession
= impl_session
.pSession
;
478 HRESULT CALLBACK
ICreateRow_CreateRow_Proxy(ICreateRow
* This
, IUnknown
*pUnkOuter
, LPCOLESTR pwszURL
, DBBINDURLFLAG dwBindURLFlags
,
479 REFGUID rguid
, REFIID riid
, IAuthenticate
*pAuthenticate
, DBIMPLICITSESSION
*pImplSession
,
480 DBBINDURLSTATUS
*pdwBindStatus
, LPOLESTR
*ppwszNewURL
, IUnknown
**ppUnk
)
484 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p)\n", This
, pUnkOuter
, debugstr_w(pwszURL
), dwBindURLFlags
,
485 debugstr_guid(rguid
), debugstr_guid(riid
), pAuthenticate
, pImplSession
, pdwBindStatus
, ppwszNewURL
, ppUnk
);
489 FIXME("Aggregation not supported\n");
490 return CLASS_E_NOAGGREGATION
;
493 hr
= ICreateRow_RemoteCreateRow_Proxy(This
, pUnkOuter
, pwszURL
, dwBindURLFlags
, rguid
, riid
, pAuthenticate
,
494 pImplSession
? pImplSession
->pUnkOuter
: NULL
, pImplSession
? pImplSession
->piid
: NULL
,
495 pImplSession
? &pImplSession
->pSession
: NULL
, pdwBindStatus
, ppwszNewURL
, ppUnk
);
499 HRESULT __RPC_STUB
ICreateRow_CreateRow_Stub(ICreateRow
* This
, IUnknown
*pUnkOuter
, LPCOLESTR pwszURL
, DBBINDURLFLAG dwBindURLFlags
,
500 REFGUID rguid
, REFIID riid
, IAuthenticate
*pAuthenticate
, IUnknown
*pSessionUnkOuter
,
501 IID
*piid
, IUnknown
**ppSession
, DBBINDURLSTATUS
*pdwBindStatus
,
502 LPOLESTR
*ppwszNewURL
, IUnknown
**ppUnk
)
505 DBIMPLICITSESSION impl_session
;
506 IWineRowServer
*row_server
;
510 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p, %p)\n", This
, pUnkOuter
, debugstr_w(pwszURL
), dwBindURLFlags
,
511 debugstr_guid(rguid
), debugstr_guid(riid
), pAuthenticate
, pSessionUnkOuter
, piid
, ppSession
, pdwBindStatus
, ppwszNewURL
,
516 hr
= CoCreateInstance(&CLSID_wine_row_server
, NULL
, CLSCTX_INPROC_SERVER
, &IID_IWineRowServer
, (void**)&row_server
);
517 if(FAILED(hr
)) return hr
;
519 impl_session
.pUnkOuter
= pSessionUnkOuter
;
520 impl_session
.piid
= piid
;
521 impl_session
.pSession
= NULL
;
523 IWineRowServer_GetMarshal(row_server
, &marshal
);
525 hr
= ICreateRow_CreateRow(This
, (IUnknown
*) marshal
, pwszURL
, dwBindURLFlags
, rguid
, &IID_IUnknown
, pAuthenticate
,
526 ppSession
? &impl_session
: NULL
, pdwBindStatus
, ppwszNewURL
, &obj
);
527 IMarshal_Release(marshal
);
531 IWineRowServer_Release(row_server
);
535 IWineRowServer_SetInnerUnk(row_server
, obj
);
536 hr
= IUnknown_QueryInterface(obj
, riid
, (void**)ppUnk
);
537 IUnknown_Release(obj
);
539 if(ppSession
) *ppSession
= impl_session
.pSession
;
543 HRESULT CALLBACK
IAccessor_AddRefAccessor_Proxy(IAccessor
* This
, HACCESSOR hAccessor
, DBREFCOUNT
*pcRefCount
)
545 FIXME("(%p)->(%08lx, %p): stub\n", This
, hAccessor
, pcRefCount
);
549 HRESULT __RPC_STUB
IAccessor_AddRefAccessor_Stub(IAccessor
* This
, HACCESSOR hAccessor
, DBREFCOUNT
*pcRefCount
,
550 IErrorInfo
**ppErrorInfoRem
)
552 FIXME("(%p)->(%08lx, %p, %p): stub\n", This
, hAccessor
, pcRefCount
, ppErrorInfoRem
);
556 HRESULT CALLBACK
IAccessor_CreateAccessor_Proxy(IAccessor
* This
, DBACCESSORFLAGS dwAccessorFlags
, DBCOUNTITEM cBindings
,
557 const DBBINDING rgBindings
[], DBLENGTH cbRowSize
, HACCESSOR
*phAccessor
,
558 DBBINDSTATUS rgStatus
[])
564 TRACE("(%p)->(%08x, %d, %p, %d, %p, %p)\n", This
, dwAccessorFlags
, cBindings
, rgBindings
,
565 cbRowSize
, phAccessor
, rgStatus
);
567 for(i
= 0; i
< cBindings
; i
++)
569 TRACE("%d: ord %d val off %d len off %d stat off %d part %04x mem_owner %d max_len %d type %04x\n",
570 i
, rgBindings
[i
].iOrdinal
, rgBindings
[i
].obValue
, rgBindings
[i
].obLength
, rgBindings
[i
].obStatus
,
571 rgBindings
[i
].dwPart
, rgBindings
[i
].dwMemOwner
, rgBindings
[i
].cbMaxLen
, rgBindings
[i
].wType
);
574 hr
= IAccessor_RemoteCreateAccessor_Proxy(This
, dwAccessorFlags
, cBindings
, (DBBINDING
*)rgBindings
,
575 cbRowSize
, phAccessor
, rgStatus
, &error
);
578 SetErrorInfo(0, error
);
579 IErrorInfo_Release(error
);
582 TRACE("returning %08x accessor %lx\n", hr
, *phAccessor
);
586 HRESULT __RPC_STUB
IAccessor_CreateAccessor_Stub(IAccessor
* This
, DBACCESSORFLAGS dwAccessorFlags
, DBCOUNTITEM cBindings
,
587 DBBINDING
*rgBindings
, DBLENGTH cbRowSize
, HACCESSOR
*phAccessor
,
588 DBBINDSTATUS
*rgStatus
, IErrorInfo
**ppErrorInfoRem
)
592 TRACE("(%p)->(%08x, %d, %p, %d, %p, %p, %p)\n", This
, dwAccessorFlags
, cBindings
, rgBindings
,
593 cbRowSize
, phAccessor
, rgStatus
, ppErrorInfoRem
);
595 *ppErrorInfoRem
= NULL
;
596 hr
= IAccessor_CreateAccessor(This
, dwAccessorFlags
, cBindings
, rgBindings
,
597 cbRowSize
, phAccessor
, rgStatus
);
598 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
603 HRESULT CALLBACK
IAccessor_GetBindings_Proxy(IAccessor
* This
, HACCESSOR hAccessor
, DBACCESSORFLAGS
*pdwAccessorFlags
,
604 DBCOUNTITEM
*pcBindings
, DBBINDING
**prgBindings
)
606 FIXME("(%p): stub\n", This
);
610 HRESULT __RPC_STUB
IAccessor_GetBindings_Stub(IAccessor
* This
, HACCESSOR hAccessor
, DBACCESSORFLAGS
*pdwAccessorFlags
,
611 DBCOUNTITEM
*pcBindings
, DBBINDING
**prgBindings
, IErrorInfo
**ppErrorInfoRem
)
613 FIXME("(%p): stub\n", This
);
617 HRESULT CALLBACK
IAccessor_ReleaseAccessor_Proxy(IAccessor
* This
, HACCESSOR hAccessor
, DBREFCOUNT
*pcRefCount
)
623 TRACE("(%p)->(%lx, %p)\n", This
, hAccessor
, pcRefCount
);
625 hr
= IAccessor_RemoteReleaseAccessor_Proxy(This
, hAccessor
, &ref
, &error
);
627 if(pcRefCount
) *pcRefCount
= ref
;
630 SetErrorInfo(0, error
);
631 IErrorInfo_Release(error
);
636 HRESULT __RPC_STUB
IAccessor_ReleaseAccessor_Stub(IAccessor
* This
, HACCESSOR hAccessor
, DBREFCOUNT
*pcRefCount
,
637 IErrorInfo
**ppErrorInfoRem
)
641 TRACE("(%p)->(%lx, %p, %p)\n", This
, hAccessor
, pcRefCount
, ppErrorInfoRem
);
643 *ppErrorInfoRem
= NULL
;
645 hr
= IAccessor_ReleaseAccessor(This
, hAccessor
, pcRefCount
);
647 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
651 HRESULT CALLBACK
IRowsetInfo_GetProperties_Proxy(IRowsetInfo
* This
, const ULONG cPropertyIDSets
, const DBPROPIDSET rgPropertyIDSets
[],
652 ULONG
*pcPropertySets
, DBPROPSET
**prgPropertySets
)
658 TRACE("(%p)->(%d, %p, %p, %p)\n", This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertySets
, prgPropertySets
);
660 for(i
= 0; i
< cPropertyIDSets
; i
++)
663 TRACE("%d: %s %d props\n", i
, debugstr_guid(&rgPropertyIDSets
[i
].guidPropertySet
), rgPropertyIDSets
[i
].cPropertyIDs
);
664 for(j
= 0; j
< rgPropertyIDSets
[i
].cPropertyIDs
; j
++)
665 TRACE("\t%d: prop id %d\n", j
, rgPropertyIDSets
[i
].rgPropertyIDs
[j
]);
668 hr
= IRowsetInfo_RemoteGetProperties_Proxy(This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertySets
, prgPropertySets
, &error
);
672 SetErrorInfo(0, error
);
673 IErrorInfo_Release(error
);
678 HRESULT __RPC_STUB
IRowsetInfo_GetProperties_Stub(IRowsetInfo
* This
, ULONG cPropertyIDSets
, const DBPROPIDSET
*rgPropertyIDSets
,
679 ULONG
*pcPropertySets
, DBPROPSET
**prgPropertySets
, IErrorInfo
**ppErrorInfoRem
)
683 TRACE("(%p)->(%d, %p, %p, %p, %p)\n", This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertySets
, prgPropertySets
, ppErrorInfoRem
);
685 *ppErrorInfoRem
= NULL
;
687 hr
= IRowsetInfo_GetProperties(This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertySets
, prgPropertySets
);
688 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
689 TRACE("returning %08x\n", hr
);
693 HRESULT CALLBACK
IRowsetInfo_GetReferencedRowset_Proxy(IRowsetInfo
* This
, DBORDINAL iOrdinal
, REFIID riid
, IUnknown
**ppReferencedRowset
)
695 FIXME("(%p)->(%d, %s, %p): stub\n", This
, iOrdinal
, debugstr_guid(riid
), ppReferencedRowset
);
699 HRESULT __RPC_STUB
IRowsetInfo_GetReferencedRowset_Stub(IRowsetInfo
* This
, DBORDINAL iOrdinal
, REFIID riid
, IUnknown
**ppReferencedRowset
,
700 IErrorInfo
**ppErrorInfoRem
)
702 FIXME("(%p)->(%d, %s, %p, %p): stub\n", This
, iOrdinal
, debugstr_guid(riid
), ppReferencedRowset
, ppErrorInfoRem
);
706 HRESULT CALLBACK
IRowsetInfo_GetSpecification_Proxy(IRowsetInfo
* This
, REFIID riid
, IUnknown
**ppSpecification
)
708 FIXME("(%p)->(%s, %p): stub\n", This
, debugstr_guid(riid
), ppSpecification
);
712 HRESULT __RPC_STUB
IRowsetInfo_GetSpecification_Stub(IRowsetInfo
* This
, REFIID riid
, IUnknown
**ppSpecification
, IErrorInfo
**ppErrorInfoRem
)
714 FIXME("(%p)->(%s, %p, %p): stub\n", This
, debugstr_guid(riid
), ppSpecification
, ppErrorInfoRem
);
718 HRESULT CALLBACK
ICommand_Cancel_Proxy(ICommand
* This
)
720 FIXME("(%p): stub\n", This
);
724 HRESULT __RPC_STUB
ICommand_Cancel_Stub(ICommand
* This
, IErrorInfo
**ppErrorInfoRem
)
726 FIXME("(%p)->(%p): stub\n", This
, ppErrorInfoRem
);
730 HRESULT CALLBACK
ICommand_Execute_Proxy(ICommand
* This
, IUnknown
*pUnkOuter
, REFIID riid
,
731 DBPARAMS
*pParams
, DBROWCOUNT
*pcRowsAffected
, IUnknown
**ppRowset
)
733 FIXME("(%p)->(%p, %s, %p, %p, %p): stub\n", This
, pUnkOuter
, debugstr_guid(riid
), pParams
,
734 pcRowsAffected
, ppRowset
);
735 if(pParams
) TRACE("params {%p, %d, %08lx}\n", pParams
->pData
, pParams
->cParamSets
, pParams
->hAccessor
);
740 HRESULT __RPC_STUB
ICommand_Execute_Stub(ICommand
* This
, IUnknown
*pUnkOuter
, REFIID riid
, HACCESSOR hAccessor
,
741 DB_UPARAMS cParamSets
, GUID
*pGuid
, ULONG ulGuidOffset
, RMTPACK
*pInputParams
,
742 RMTPACK
*pOutputParams
, DBCOUNTITEM cBindings
, DBBINDING
*rgBindings
,
743 DBSTATUS
*rgStatus
, DBROWCOUNT
*pcRowsAffected
, IUnknown
**ppRowset
)
745 FIXME("(%p)->(%p, %s, %08lx, %d, %p, %d, %p, %p, %d, %p, %p, %p, %p): stub\n", This
, pUnkOuter
, debugstr_guid(riid
),
746 hAccessor
, cParamSets
, pGuid
, ulGuidOffset
, pInputParams
, pOutputParams
, cBindings
, rgBindings
, rgStatus
,
747 pcRowsAffected
, ppRowset
);
751 HRESULT CALLBACK
ICommand_GetDBSession_Proxy(ICommand
* This
, REFIID riid
, IUnknown
**ppSession
)
753 FIXME("(%p)->(%s, %p): stub\n", This
, debugstr_guid(riid
), ppSession
);
757 HRESULT __RPC_STUB
ICommand_GetDBSession_Stub(ICommand
* This
, REFIID riid
, IUnknown
**ppSession
, IErrorInfo
**ppErrorInfoRem
)
759 FIXME("(%p)->(%s, %p, %p): stub\n", This
, debugstr_guid(riid
), ppSession
, ppErrorInfoRem
);
763 HRESULT CALLBACK
ICommandText_GetCommandText_Proxy(ICommandText
* This
, GUID
*pguidDialect
, LPOLESTR
*ppwszCommand
)
765 FIXME("(%p)->(%p, %p): stub\n", This
, pguidDialect
, ppwszCommand
);
769 HRESULT __RPC_STUB
ICommandText_GetCommandText_Stub(ICommandText
* This
, GUID
*pguidDialect
,
770 LPOLESTR
*ppwszCommand
, IErrorInfo
**ppErrorInfoRem
)
772 FIXME("(%p)->(%p, %p, %p): stub\n", This
, pguidDialect
, ppwszCommand
, ppErrorInfoRem
);
776 HRESULT CALLBACK
ICommandText_SetCommandText_Proxy(ICommandText
* This
, REFGUID rguidDialect
, LPCOLESTR pwszCommand
)
781 TRACE("(%p)->(%s, %s)\n", This
, debugstr_guid(rguidDialect
), debugstr_w(pwszCommand
));
783 hr
= ICommandText_RemoteSetCommandText_Proxy(This
, rguidDialect
, pwszCommand
, &error
);
786 SetErrorInfo(0, error
);
787 IErrorInfo_Release(error
);
792 HRESULT __RPC_STUB
ICommandText_SetCommandText_Stub(ICommandText
* This
, REFGUID rguidDialect
, LPCOLESTR pwszCommand
,
793 IErrorInfo
**ppErrorInfoRem
)
797 TRACE("(%p)->(%s, %s, %p)\n", This
, debugstr_guid(rguidDialect
), debugstr_w(pwszCommand
),
800 *ppErrorInfoRem
= NULL
;
801 hr
= ICommandText_SetCommandText(This
, rguidDialect
, pwszCommand
);
802 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
807 HRESULT CALLBACK
IDBAsynchNotify_OnLowResource_Proxy(IDBAsynchNotify
* This
, DB_DWRESERVE dwReserved
)
809 FIXME("(%p)->(%08x): stub\n", This
, dwReserved
);
813 HRESULT __RPC_STUB
IDBAsynchNotify_OnLowResource_Stub(IDBAsynchNotify
* This
, DB_DWRESERVE dwReserved
)
815 FIXME("(%p)->(%08x): stub\n", This
, dwReserved
);
819 HRESULT CALLBACK
IDBAsynchNotify_OnProgress_Proxy(IDBAsynchNotify
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
820 DBCOUNTITEM ulProgress
, DBCOUNTITEM ulProgressMax
, DBASYNCHPHASE eAsynchPhase
,
821 LPOLESTR pwszStatusText
)
823 FIXME("(%p)->(%lx, %d, %d, %d, %d, %s): stub\n", This
, hChapter
, eOperation
, ulProgress
, ulProgressMax
,
824 eAsynchPhase
, debugstr_w(pwszStatusText
));
828 HRESULT __RPC_STUB
IDBAsynchNotify_OnProgress_Stub(IDBAsynchNotify
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
829 DBCOUNTITEM ulProgress
, DBCOUNTITEM ulProgressMax
, DBASYNCHPHASE eAsynchPhase
,
830 LPOLESTR pwszStatusText
)
832 FIXME("(%p)->(%lx, %d, %d, %d, %d, %s): stub\n", This
, hChapter
, eOperation
, ulProgress
, ulProgressMax
,
833 eAsynchPhase
, debugstr_w(pwszStatusText
));
837 HRESULT CALLBACK
IDBAsynchNotify_OnStop_Proxy(IDBAsynchNotify
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
838 HRESULT hrStatus
, LPOLESTR pwszStatusText
)
840 FIXME("(%p)->(%lx, %d, %08x, %s): stub\n", This
, hChapter
, eOperation
, hrStatus
, debugstr_w(pwszStatusText
));
844 HRESULT __RPC_STUB
IDBAsynchNotify_OnStop_Stub(IDBAsynchNotify
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
845 HRESULT hrStatus
, LPOLESTR pwszStatusText
)
847 FIXME("(%p)->(%lx, %d, %08x, %s): stub\n", This
, hChapter
, eOperation
, hrStatus
, debugstr_w(pwszStatusText
));
851 HRESULT CALLBACK
IDBAsynchStatus_Abort_Proxy(IDBAsynchStatus
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
)
853 FIXME("(%p)->(%lx, %d): stub\n", This
, hChapter
, eOperation
);
857 HRESULT __RPC_STUB
IDBAsynchStatus_Abort_Stub(IDBAsynchStatus
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
858 IErrorInfo
**ppErrorInfoRem
)
860 FIXME("(%p)->(%lx, %d, %p): stub\n", This
, hChapter
, eOperation
, ppErrorInfoRem
);
864 HRESULT CALLBACK
IDBAsynchStatus_GetStatus_Proxy(IDBAsynchStatus
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
865 DBCOUNTITEM
*pulProgress
, DBCOUNTITEM
*pulProgressMax
, DBASYNCHPHASE
*peAsynchPhase
,
866 LPOLESTR
*ppwszStatusText
)
868 FIXME("(%p)->(%lx, %d, %p, %p, %p, %p): stub\n", This
, hChapter
, eOperation
, pulProgress
, pulProgressMax
,
869 peAsynchPhase
, ppwszStatusText
);
873 HRESULT __RPC_STUB
IDBAsynchStatus_GetStatus_Stub(IDBAsynchStatus
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
874 DBCOUNTITEM
*pulProgress
, DBCOUNTITEM
*pulProgressMax
, DBASYNCHPHASE
*peAsynchPhase
,
875 LPOLESTR
*ppwszStatusText
, IErrorInfo
**ppErrorInfoRem
)
877 FIXME("(%p)->(%lx, %d, %p, %p, %p, %p, %p): stub\n", This
, hChapter
, eOperation
, pulProgress
, pulProgressMax
,
878 peAsynchPhase
, ppwszStatusText
, ppErrorInfoRem
);