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
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
);
453 FIXME("Aggregation not supported\n");
454 return CLASS_E_NOAGGREGATION
;
457 hr
= IBindResource_RemoteBind_Proxy(This
, pUnkOuter
, pwszURL
, dwBindURLFlags
, rguid
, riid
, pAuthenticate
,
458 pImplSession
? pImplSession
->pUnkOuter
: NULL
, pImplSession
? pImplSession
->piid
: NULL
,
459 pImplSession
? &pImplSession
->pSession
: NULL
, pdwBindStatus
, ppUnk
);
463 HRESULT __RPC_STUB
IBindResource_Bind_Stub(IBindResource
* This
, IUnknown
*pUnkOuter
, LPCOLESTR pwszURL
, DBBINDURLFLAG dwBindURLFlags
,
464 REFGUID rguid
, REFIID riid
, IAuthenticate
*pAuthenticate
, IUnknown
*pSessionUnkOuter
,
465 IID
*piid
, IUnknown
**ppSession
, DBBINDURLSTATUS
*pdwBindStatus
, IUnknown
**ppUnk
)
468 DBIMPLICITSESSION impl_session
;
469 IWineRowServer
*server
;
473 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p)\n", This
, pUnkOuter
, debugstr_w(pwszURL
), dwBindURLFlags
,
474 debugstr_guid(rguid
), debugstr_guid(riid
), pAuthenticate
, pSessionUnkOuter
, piid
, ppSession
, pdwBindStatus
, ppUnk
);
478 if(IsEqualGUID(rguid
, &DBGUID_ROWSET
))
479 hr
= CoCreateInstance(&CLSID_wine_rowset_server
, NULL
, CLSCTX_INPROC_SERVER
, &IID_IWineRowServer
, (void**)&server
);
480 else if(IsEqualGUID(rguid
, &DBGUID_ROW
))
481 hr
= CoCreateInstance(&CLSID_wine_row_server
, NULL
, CLSCTX_INPROC_SERVER
, &IID_IWineRowServer
, (void**)&server
);
485 FIXME("Unhandled object %s\n", debugstr_guid(rguid
));
488 if(FAILED(hr
)) return hr
;
490 impl_session
.pUnkOuter
= pSessionUnkOuter
;
491 impl_session
.piid
= piid
;
492 impl_session
.pSession
= NULL
;
494 IWineRowServer_GetMarshal(server
, &marshal
);
496 hr
= IBindResource_Bind(This
, (IUnknown
*)marshal
, pwszURL
, dwBindURLFlags
, rguid
, &IID_IUnknown
, pAuthenticate
,
497 ppSession
? &impl_session
: NULL
, pdwBindStatus
, &obj
);
499 IMarshal_Release(marshal
);
502 IWineRowServer_Release(server
);
506 IWineRowServer_SetInnerUnk(server
, obj
);
507 hr
= IUnknown_QueryInterface(obj
, riid
, (void**)ppUnk
);
508 IUnknown_Release(obj
);
510 if(ppSession
) *ppSession
= impl_session
.pSession
;
514 HRESULT CALLBACK
ICreateRow_CreateRow_Proxy(ICreateRow
* This
, IUnknown
*pUnkOuter
, LPCOLESTR pwszURL
, DBBINDURLFLAG dwBindURLFlags
,
515 REFGUID rguid
, REFIID riid
, IAuthenticate
*pAuthenticate
, DBIMPLICITSESSION
*pImplSession
,
516 DBBINDURLSTATUS
*pdwBindStatus
, LPOLESTR
*ppwszNewURL
, IUnknown
**ppUnk
)
520 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p)\n", This
, pUnkOuter
, debugstr_w(pwszURL
), dwBindURLFlags
,
521 debugstr_guid(rguid
), debugstr_guid(riid
), pAuthenticate
, pImplSession
, pdwBindStatus
, ppwszNewURL
, ppUnk
);
525 FIXME("Aggregation not supported\n");
526 return CLASS_E_NOAGGREGATION
;
529 hr
= ICreateRow_RemoteCreateRow_Proxy(This
, pUnkOuter
, pwszURL
, dwBindURLFlags
, rguid
, riid
, pAuthenticate
,
530 pImplSession
? pImplSession
->pUnkOuter
: NULL
, pImplSession
? pImplSession
->piid
: NULL
,
531 pImplSession
? &pImplSession
->pSession
: NULL
, pdwBindStatus
, ppwszNewURL
, ppUnk
);
535 HRESULT __RPC_STUB
ICreateRow_CreateRow_Stub(ICreateRow
* This
, IUnknown
*pUnkOuter
, LPCOLESTR pwszURL
, DBBINDURLFLAG dwBindURLFlags
,
536 REFGUID rguid
, REFIID riid
, IAuthenticate
*pAuthenticate
, IUnknown
*pSessionUnkOuter
,
537 IID
*piid
, IUnknown
**ppSession
, DBBINDURLSTATUS
*pdwBindStatus
,
538 LPOLESTR
*ppwszNewURL
, IUnknown
**ppUnk
)
541 DBIMPLICITSESSION impl_session
;
542 IWineRowServer
*row_server
;
546 TRACE("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p, %p)\n", This
, pUnkOuter
, debugstr_w(pwszURL
), dwBindURLFlags
,
547 debugstr_guid(rguid
), debugstr_guid(riid
), pAuthenticate
, pSessionUnkOuter
, piid
, ppSession
, pdwBindStatus
, ppwszNewURL
,
552 hr
= CoCreateInstance(&CLSID_wine_row_server
, NULL
, CLSCTX_INPROC_SERVER
, &IID_IWineRowServer
, (void**)&row_server
);
553 if(FAILED(hr
)) return hr
;
555 impl_session
.pUnkOuter
= pSessionUnkOuter
;
556 impl_session
.piid
= piid
;
557 impl_session
.pSession
= NULL
;
559 IWineRowServer_GetMarshal(row_server
, &marshal
);
561 hr
= ICreateRow_CreateRow(This
, (IUnknown
*) marshal
, pwszURL
, dwBindURLFlags
, rguid
, &IID_IUnknown
, pAuthenticate
,
562 ppSession
? &impl_session
: NULL
, pdwBindStatus
, ppwszNewURL
, &obj
);
563 IMarshal_Release(marshal
);
567 IWineRowServer_Release(row_server
);
571 IWineRowServer_SetInnerUnk(row_server
, obj
);
572 hr
= IUnknown_QueryInterface(obj
, riid
, (void**)ppUnk
);
573 IUnknown_Release(obj
);
575 if(ppSession
) *ppSession
= impl_session
.pSession
;
579 HRESULT CALLBACK
IAccessor_AddRefAccessor_Proxy(IAccessor
* This
, HACCESSOR hAccessor
, DBREFCOUNT
*pcRefCount
)
581 FIXME("(%p)->(%08lx, %p): stub\n", This
, hAccessor
, pcRefCount
);
585 HRESULT __RPC_STUB
IAccessor_AddRefAccessor_Stub(IAccessor
* This
, HACCESSOR hAccessor
, DBREFCOUNT
*pcRefCount
,
586 IErrorInfo
**ppErrorInfoRem
)
588 FIXME("(%p)->(%08lx, %p, %p): stub\n", This
, hAccessor
, pcRefCount
, ppErrorInfoRem
);
592 HRESULT CALLBACK
IAccessor_CreateAccessor_Proxy(IAccessor
* This
, DBACCESSORFLAGS dwAccessorFlags
, DBCOUNTITEM cBindings
,
593 const DBBINDING rgBindings
[], DBLENGTH cbRowSize
, HACCESSOR
*phAccessor
,
594 DBBINDSTATUS rgStatus
[])
600 TRACE("(%p)->(%08x, %ld, %p, %ld, %p, %p)\n", This
, dwAccessorFlags
, cBindings
, rgBindings
,
601 cbRowSize
, phAccessor
, rgStatus
);
603 for(i
= 0; i
< cBindings
; i
++)
605 TRACE("%ld: ord %ld val off %ld len off %ld stat off %ld part %04x mem_owner %d max_len %ld type %04x\n",
606 i
, rgBindings
[i
].iOrdinal
, rgBindings
[i
].obValue
, rgBindings
[i
].obLength
, rgBindings
[i
].obStatus
,
607 rgBindings
[i
].dwPart
, rgBindings
[i
].dwMemOwner
, rgBindings
[i
].cbMaxLen
, rgBindings
[i
].wType
);
610 hr
= IAccessor_RemoteCreateAccessor_Proxy(This
, dwAccessorFlags
, cBindings
, (DBBINDING
*)rgBindings
,
611 cbRowSize
, phAccessor
, rgStatus
, &error
);
614 SetErrorInfo(0, error
);
615 IErrorInfo_Release(error
);
618 TRACE("returning %08x accessor %lx\n", hr
, *phAccessor
);
622 HRESULT __RPC_STUB
IAccessor_CreateAccessor_Stub(IAccessor
* This
, DBACCESSORFLAGS dwAccessorFlags
, DBCOUNTITEM cBindings
,
623 DBBINDING
*rgBindings
, DBLENGTH cbRowSize
, HACCESSOR
*phAccessor
,
624 DBBINDSTATUS
*rgStatus
, IErrorInfo
**ppErrorInfoRem
)
628 TRACE("(%p)->(%08x, %ld, %p, %ld, %p, %p, %p)\n", This
, dwAccessorFlags
, cBindings
, rgBindings
,
629 cbRowSize
, phAccessor
, rgStatus
, ppErrorInfoRem
);
631 *ppErrorInfoRem
= NULL
;
632 hr
= IAccessor_CreateAccessor(This
, dwAccessorFlags
, cBindings
, rgBindings
,
633 cbRowSize
, phAccessor
, rgStatus
);
634 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
639 HRESULT CALLBACK
IAccessor_GetBindings_Proxy(IAccessor
* This
, HACCESSOR hAccessor
, DBACCESSORFLAGS
*pdwAccessorFlags
,
640 DBCOUNTITEM
*pcBindings
, DBBINDING
**prgBindings
)
642 FIXME("(%p): stub\n", This
);
646 HRESULT __RPC_STUB
IAccessor_GetBindings_Stub(IAccessor
* This
, HACCESSOR hAccessor
, DBACCESSORFLAGS
*pdwAccessorFlags
,
647 DBCOUNTITEM
*pcBindings
, DBBINDING
**prgBindings
, IErrorInfo
**ppErrorInfoRem
)
649 FIXME("(%p): stub\n", This
);
653 HRESULT CALLBACK
IAccessor_ReleaseAccessor_Proxy(IAccessor
* This
, HACCESSOR hAccessor
, DBREFCOUNT
*pcRefCount
)
659 TRACE("(%p)->(%lx, %p)\n", This
, hAccessor
, pcRefCount
);
661 hr
= IAccessor_RemoteReleaseAccessor_Proxy(This
, hAccessor
, &ref
, &error
);
663 if(pcRefCount
) *pcRefCount
= ref
;
666 SetErrorInfo(0, error
);
667 IErrorInfo_Release(error
);
672 HRESULT __RPC_STUB
IAccessor_ReleaseAccessor_Stub(IAccessor
* This
, HACCESSOR hAccessor
, DBREFCOUNT
*pcRefCount
,
673 IErrorInfo
**ppErrorInfoRem
)
677 TRACE("(%p)->(%lx, %p, %p)\n", This
, hAccessor
, pcRefCount
, ppErrorInfoRem
);
679 *ppErrorInfoRem
= NULL
;
681 hr
= IAccessor_ReleaseAccessor(This
, hAccessor
, pcRefCount
);
683 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
687 HRESULT CALLBACK
IRowsetInfo_GetProperties_Proxy(IRowsetInfo
* This
, const ULONG cPropertyIDSets
, const DBPROPIDSET rgPropertyIDSets
[],
688 ULONG
*pcPropertySets
, DBPROPSET
**prgPropertySets
)
694 TRACE("(%p)->(%d, %p, %p, %p)\n", This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertySets
, prgPropertySets
);
696 for(i
= 0; i
< cPropertyIDSets
; i
++)
699 TRACE("%d: %s %d props\n", i
, debugstr_guid(&rgPropertyIDSets
[i
].guidPropertySet
), rgPropertyIDSets
[i
].cPropertyIDs
);
700 for(j
= 0; j
< rgPropertyIDSets
[i
].cPropertyIDs
; j
++)
701 TRACE("\t%d: prop id %d\n", j
, rgPropertyIDSets
[i
].rgPropertyIDs
[j
]);
704 hr
= IRowsetInfo_RemoteGetProperties_Proxy(This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertySets
, prgPropertySets
, &error
);
708 SetErrorInfo(0, error
);
709 IErrorInfo_Release(error
);
714 HRESULT __RPC_STUB
IRowsetInfo_GetProperties_Stub(IRowsetInfo
* This
, ULONG cPropertyIDSets
, const DBPROPIDSET
*rgPropertyIDSets
,
715 ULONG
*pcPropertySets
, DBPROPSET
**prgPropertySets
, IErrorInfo
**ppErrorInfoRem
)
719 TRACE("(%p)->(%d, %p, %p, %p, %p)\n", This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertySets
, prgPropertySets
, ppErrorInfoRem
);
721 *ppErrorInfoRem
= NULL
;
723 hr
= IRowsetInfo_GetProperties(This
, cPropertyIDSets
, rgPropertyIDSets
, pcPropertySets
, prgPropertySets
);
724 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
725 TRACE("returning %08x\n", hr
);
729 HRESULT CALLBACK
IRowsetInfo_GetReferencedRowset_Proxy(IRowsetInfo
* This
, DBORDINAL iOrdinal
, REFIID riid
, IUnknown
**ppReferencedRowset
)
731 FIXME("(%p)->(%ld, %s, %p): stub\n", This
, iOrdinal
, debugstr_guid(riid
), ppReferencedRowset
);
735 HRESULT __RPC_STUB
IRowsetInfo_GetReferencedRowset_Stub(IRowsetInfo
* This
, DBORDINAL iOrdinal
, REFIID riid
, IUnknown
**ppReferencedRowset
,
736 IErrorInfo
**ppErrorInfoRem
)
738 FIXME("(%p)->(%ld, %s, %p, %p): stub\n", This
, iOrdinal
, debugstr_guid(riid
), ppReferencedRowset
, ppErrorInfoRem
);
742 HRESULT CALLBACK
IRowsetInfo_GetSpecification_Proxy(IRowsetInfo
* This
, REFIID riid
, IUnknown
**ppSpecification
)
744 FIXME("(%p)->(%s, %p): stub\n", This
, debugstr_guid(riid
), ppSpecification
);
748 HRESULT __RPC_STUB
IRowsetInfo_GetSpecification_Stub(IRowsetInfo
* This
, REFIID riid
, IUnknown
**ppSpecification
, IErrorInfo
**ppErrorInfoRem
)
750 FIXME("(%p)->(%s, %p, %p): stub\n", This
, debugstr_guid(riid
), ppSpecification
, ppErrorInfoRem
);
754 HRESULT CALLBACK
ICommand_Cancel_Proxy(ICommand
* This
)
756 FIXME("(%p): stub\n", This
);
760 HRESULT __RPC_STUB
ICommand_Cancel_Stub(ICommand
* This
, IErrorInfo
**ppErrorInfoRem
)
762 FIXME("(%p)->(%p): stub\n", This
, ppErrorInfoRem
);
766 HRESULT CALLBACK
ICommand_Execute_Proxy(ICommand
* This
, IUnknown
*pUnkOuter
, REFIID riid
,
767 DBPARAMS
*pParams
, DBROWCOUNT
*pcRowsAffected
, IUnknown
**ppRowset
)
774 TRACE("(%p)->(%p, %s, %p, %p, %p)\n", This
, pUnkOuter
, debugstr_guid(riid
), pParams
,
775 pcRowsAffected
, ppRowset
);
779 FIXME("Unhandled params {%p, %ld, %08lx}\n", pParams
->pData
, pParams
->cParamSets
, pParams
->hAccessor
);
785 FIXME("Aggregation not supported\n");
786 return CLASS_E_NOAGGREGATION
;
789 hr
= ICommand_RemoteExecute_Proxy(This
, pUnkOuter
, riid
, 0, 0, NULL
, 0, NULL
, NULL
, 0, NULL
, NULL
, &affected
,
792 TRACE("Execute returns %08x\n", hr
);
794 if(pcRowsAffected
) *pcRowsAffected
= affected
;
799 HRESULT __RPC_STUB
ICommand_Execute_Stub(ICommand
* This
, IUnknown
*pUnkOuter
, REFIID riid
, HACCESSOR hAccessor
,
800 DB_UPARAMS cParamSets
, GUID
*pGuid
, ULONG ulGuidOffset
, RMTPACK
*pInputParams
,
801 RMTPACK
*pOutputParams
, DBCOUNTITEM cBindings
, DBBINDING
*rgBindings
,
802 DBSTATUS
*rgStatus
, DBROWCOUNT
*pcRowsAffected
, IUnknown
**ppRowset
)
804 IWineRowServer
*rowset_server
;
806 IUnknown
*obj
= NULL
;
809 TRACE("(%p)->(%p, %s, %08lx, %ld, %p, %d, %p, %p, %ld, %p, %p, %p, %p): stub\n", This
, pUnkOuter
, debugstr_guid(riid
),
810 hAccessor
, cParamSets
, pGuid
, ulGuidOffset
, pInputParams
, pOutputParams
, cBindings
, rgBindings
, rgStatus
,
811 pcRowsAffected
, ppRowset
);
815 hr
= CoCreateInstance(&CLSID_wine_rowset_server
, NULL
, CLSCTX_INPROC_SERVER
, &IID_IWineRowServer
, (void**)&rowset_server
);
816 if(FAILED(hr
)) return hr
;
818 IWineRowServer_GetMarshal(rowset_server
, &marshal
);
820 hr
= ICommand_Execute(This
, (IUnknown
*)marshal
, &IID_IUnknown
, NULL
, pcRowsAffected
, &obj
);
822 IMarshal_Release(marshal
);
826 IWineRowServer_Release(rowset_server
);
830 IWineRowServer_SetInnerUnk(rowset_server
, obj
);
831 hr
= IUnknown_QueryInterface(obj
, riid
, (void**)ppRowset
);
832 IUnknown_Release(obj
);
837 HRESULT CALLBACK
ICommand_GetDBSession_Proxy(ICommand
* This
, REFIID riid
, IUnknown
**ppSession
)
839 FIXME("(%p)->(%s, %p): stub\n", This
, debugstr_guid(riid
), ppSession
);
843 HRESULT __RPC_STUB
ICommand_GetDBSession_Stub(ICommand
* This
, REFIID riid
, IUnknown
**ppSession
, IErrorInfo
**ppErrorInfoRem
)
845 FIXME("(%p)->(%s, %p, %p): stub\n", This
, debugstr_guid(riid
), ppSession
, ppErrorInfoRem
);
849 HRESULT CALLBACK
ICommandText_GetCommandText_Proxy(ICommandText
* This
, GUID
*pguidDialect
, LPOLESTR
*ppwszCommand
)
851 FIXME("(%p)->(%p, %p): stub\n", This
, pguidDialect
, ppwszCommand
);
855 HRESULT __RPC_STUB
ICommandText_GetCommandText_Stub(ICommandText
* This
, GUID
*pguidDialect
,
856 LPOLESTR
*ppwszCommand
, IErrorInfo
**ppErrorInfoRem
)
858 FIXME("(%p)->(%p, %p, %p): stub\n", This
, pguidDialect
, ppwszCommand
, ppErrorInfoRem
);
862 HRESULT CALLBACK
ICommandText_SetCommandText_Proxy(ICommandText
* This
, REFGUID rguidDialect
, LPCOLESTR pwszCommand
)
867 TRACE("(%p)->(%s, %s)\n", This
, debugstr_guid(rguidDialect
), debugstr_w(pwszCommand
));
869 hr
= ICommandText_RemoteSetCommandText_Proxy(This
, rguidDialect
, pwszCommand
, &error
);
872 SetErrorInfo(0, error
);
873 IErrorInfo_Release(error
);
878 HRESULT __RPC_STUB
ICommandText_SetCommandText_Stub(ICommandText
* This
, REFGUID rguidDialect
, LPCOLESTR pwszCommand
,
879 IErrorInfo
**ppErrorInfoRem
)
883 TRACE("(%p)->(%s, %s, %p)\n", This
, debugstr_guid(rguidDialect
), debugstr_w(pwszCommand
),
886 *ppErrorInfoRem
= NULL
;
887 hr
= ICommandText_SetCommandText(This
, rguidDialect
, pwszCommand
);
888 if(FAILED(hr
)) GetErrorInfo(0, ppErrorInfoRem
);
893 HRESULT CALLBACK
IDBAsynchNotify_OnLowResource_Proxy(IDBAsynchNotify
* This
, DB_DWRESERVE dwReserved
)
895 FIXME("(%p)->(%08lx): stub\n", This
, dwReserved
);
899 HRESULT __RPC_STUB
IDBAsynchNotify_OnLowResource_Stub(IDBAsynchNotify
* This
, DB_DWRESERVE dwReserved
)
901 FIXME("(%p)->(%08lx): stub\n", This
, dwReserved
);
905 HRESULT CALLBACK
IDBAsynchNotify_OnProgress_Proxy(IDBAsynchNotify
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
906 DBCOUNTITEM ulProgress
, DBCOUNTITEM ulProgressMax
, DBASYNCHPHASE eAsynchPhase
,
907 LPOLESTR pwszStatusText
)
909 TRACE("(%p)->(%lx, %d, %ld, %ld, %d, %s)\n", This
, hChapter
, eOperation
, ulProgress
, ulProgressMax
,
910 eAsynchPhase
, debugstr_w(pwszStatusText
));
912 return IDBAsynchNotify_RemoteOnProgress_Proxy(This
, hChapter
, eOperation
, ulProgress
, ulProgressMax
, eAsynchPhase
,
916 HRESULT __RPC_STUB
IDBAsynchNotify_OnProgress_Stub(IDBAsynchNotify
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
917 DBCOUNTITEM ulProgress
, DBCOUNTITEM ulProgressMax
, DBASYNCHPHASE eAsynchPhase
,
918 LPOLESTR pwszStatusText
)
920 TRACE("(%p)->(%lx, %d, %ld, %ld, %d, %s)\n", This
, hChapter
, eOperation
, ulProgress
, ulProgressMax
,
921 eAsynchPhase
, debugstr_w(pwszStatusText
));
922 return IDBAsynchNotify_OnProgress(This
, hChapter
, eOperation
, ulProgress
, ulProgressMax
, eAsynchPhase
,
926 HRESULT CALLBACK
IDBAsynchNotify_OnStop_Proxy(IDBAsynchNotify
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
927 HRESULT hrStatus
, LPOLESTR pwszStatusText
)
929 TRACE("(%p)->(%lx, %d, %08x, %s)\n", This
, hChapter
, eOperation
, hrStatus
, debugstr_w(pwszStatusText
));
930 return IDBAsynchNotify_RemoteOnStop_Proxy(This
, hChapter
, eOperation
, hrStatus
, pwszStatusText
);
933 HRESULT __RPC_STUB
IDBAsynchNotify_OnStop_Stub(IDBAsynchNotify
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
934 HRESULT hrStatus
, LPOLESTR pwszStatusText
)
936 TRACE("(%p)->(%lx, %d, %08x, %s)\n", This
, hChapter
, eOperation
, hrStatus
, debugstr_w(pwszStatusText
));
937 return IDBAsynchNotify_OnStop(This
, hChapter
, eOperation
, hrStatus
, pwszStatusText
);
940 HRESULT CALLBACK
IDBAsynchStatus_Abort_Proxy(IDBAsynchStatus
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
)
942 FIXME("(%p)->(%lx, %d): stub\n", This
, hChapter
, eOperation
);
946 HRESULT __RPC_STUB
IDBAsynchStatus_Abort_Stub(IDBAsynchStatus
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
947 IErrorInfo
**ppErrorInfoRem
)
949 FIXME("(%p)->(%lx, %d, %p): stub\n", This
, hChapter
, eOperation
, ppErrorInfoRem
);
953 HRESULT CALLBACK
IDBAsynchStatus_GetStatus_Proxy(IDBAsynchStatus
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
954 DBCOUNTITEM
*pulProgress
, DBCOUNTITEM
*pulProgressMax
, DBASYNCHPHASE
*peAsynchPhase
,
955 LPOLESTR
*ppwszStatusText
)
957 FIXME("(%p)->(%lx, %d, %p, %p, %p, %p): stub\n", This
, hChapter
, eOperation
, pulProgress
, pulProgressMax
,
958 peAsynchPhase
, ppwszStatusText
);
962 HRESULT __RPC_STUB
IDBAsynchStatus_GetStatus_Stub(IDBAsynchStatus
* This
, HCHAPTER hChapter
, DBASYNCHOP eOperation
,
963 DBCOUNTITEM
*pulProgress
, DBCOUNTITEM
*pulProgressMax
, DBASYNCHPHASE
*peAsynchPhase
,
964 LPOLESTR
*ppwszStatusText
, IErrorInfo
**ppErrorInfoRem
)
966 FIXME("(%p)->(%lx, %d, %p, %p, %p, %p, %p): stub\n", This
, hChapter
, eOperation
, pulProgress
, pulProgressMax
,
967 peAsynchPhase
, ppwszStatusText
, ppErrorInfoRem
);