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 "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 FIXME("(%p, %p, %s, %p): stub\n", This, pUnkOuter, debugstr_guid(riid),
48 HRESULT __RPC_STUB IDBCreateCommand_CreateCommand_Stub(IDBCreateCommand* This, IUnknown *pUnkOuter,
49 REFIID riid, IUnknown **ppCommand, IErrorInfo **ppErrorInfoRem)
51 FIXME("(%p, %p, %s, %p, %p): stub\n", This, pUnkOuter, debugstr_guid(riid),
52 ppCommand, ppErrorInfoRem);
57 HRESULT CALLBACK IDBCreateSession_CreateSession_Proxy(IDBCreateSession* This, IUnknown *pUnkOuter,
58 REFIID riid, IUnknown **ppDBSession)
60 FIXME("(%p, %p, %s, %p): stub\n", This, pUnkOuter, debugstr_guid(riid),
65 HRESULT __RPC_STUB IDBCreateSession_CreateSession_Stub(IDBCreateSession* This, IUnknown *pUnkOuter,
66 REFIID riid, IUnknown **ppDBSession, IErrorInfo **ppErrorInfoRem)
68 FIXME("(%p, %p, %s, %p, %p): stub\n", This, pUnkOuter, debugstr_guid(riid),
69 ppDBSession, ppErrorInfoRem);
74 HRESULT CALLBACK IDBProperties_GetProperties_Proxy(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
75 ULONG *pcPropertySets, DBPROPSET **prgPropertySets)
77 FIXME("(%p, %d, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets,
82 HRESULT __RPC_STUB IDBProperties_GetProperties_Stub(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
83 ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
85 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets,
86 prgPropertySets, ppErrorInfoRem);
90 HRESULT CALLBACK IDBProperties_GetPropertyInfo_Proxy(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
91 ULONG *pcPropertyInfoSets, DBPROPINFOSET **prgPropertyInfoSets,
92 OLECHAR **ppDescBuffer)
94 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
95 prgPropertyInfoSets, ppDescBuffer);
99 HRESULT __RPC_STUB IDBProperties_GetPropertyInfo_Stub(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
100 ULONG *pcPropertyInfoSets, DBPROPINFOSET **prgPropertyInfoSets,
101 ULONG *pcOffsets, DBBYTEOFFSET **prgDescOffsets, ULONG *pcbDescBuffer,
102 OLECHAR **ppDescBuffer, IErrorInfo **ppErrorInfoRem)
104 FIXME("(%p, %d, %p, %p, %p, %p, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
105 prgPropertyInfoSets, pcOffsets, prgDescOffsets, pcbDescBuffer, ppDescBuffer, ppErrorInfoRem);
109 HRESULT CALLBACK IDBProperties_SetProperties_Proxy(IDBProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
111 ULONG prop_set, prop, total_props = 0;
114 DBPROPSTATUS *status;
116 TRACE("(%p, %d, %p)\n", This, cPropertySets, rgPropertySets);
118 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
119 total_props += rgPropertySets[prop_set].cProperties;
121 if(total_props == 0) return S_OK;
123 status = CoTaskMemAlloc(total_props * sizeof(*status));
124 if(!status) return E_OUTOFMEMORY;
126 hr = IDBProperties_RemoteSetProperties_Proxy(This, cPropertySets, rgPropertySets,
127 total_props, status, &error);
130 SetErrorInfo(0, error);
131 IErrorInfo_Release(error);
135 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
136 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
137 rgPropertySets[prop_set].rgProperties[prop].dwStatus = status[total_props++];
139 CoTaskMemFree(status);
143 HRESULT __RPC_STUB IDBProperties_SetProperties_Stub(IDBProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
144 ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
146 ULONG prop_set, prop, total_props = 0;
149 TRACE("(%p, %d, %p, %d, %p, %p)\n", This, cPropertySets, rgPropertySets, cTotalProps,
150 rgPropStatus, ppErrorInfoRem);
152 *ppErrorInfoRem = NULL;
153 hr = IDBProperties_SetProperties(This, cPropertySets, rgPropertySets);
154 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
156 for(prop_set = 0; prop_set < cPropertySets; prop_set++)
157 for(prop = 0; prop < rgPropertySets[prop_set].cProperties; prop++)
158 rgPropStatus[total_props++] = rgPropertySets[prop_set].rgProperties[prop].dwStatus;
163 HRESULT CALLBACK IDBInitialize_Initialize_Proxy(IDBInitialize* This)
168 TRACE("(%p)\n", This);
169 hr = IDBInitialize_RemoteInitialize_Proxy(This, &error);
172 SetErrorInfo(0, error);
173 IErrorInfo_Release(error);
178 HRESULT __RPC_STUB IDBInitialize_Initialize_Stub(IDBInitialize* This, IErrorInfo **ppErrorInfoRem)
181 TRACE("(%p, %p)\n", This, ppErrorInfoRem);
183 *ppErrorInfoRem = NULL;
184 hr = IDBInitialize_Initialize(This);
185 if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
190 HRESULT CALLBACK IDBInitialize_Uninitialize_Proxy(IDBInitialize* This)
192 FIXME("(%p): stub\n", This);
196 HRESULT __RPC_STUB IDBInitialize_Uninitialize_Stub(IDBInitialize* This, IErrorInfo **ppErrorInfoRem)
198 FIXME("(%p, %p): stub\n", This, ppErrorInfoRem);
202 HRESULT CALLBACK IDBDataSourceAdmin_CreateDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets,
203 DBPROPSET rgPropertySets[], IUnknown *pUnkOuter,
204 REFIID riid, IUnknown **ppDBSession)
206 FIXME("(%p, %d, %p, %p, %s, %p): stub\n", This, cPropertySets, rgPropertySets, pUnkOuter,
207 debugstr_guid(riid), ppDBSession);
211 HRESULT __RPC_STUB IDBDataSourceAdmin_CreateDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
212 DBPROPSET *rgPropertySets, IUnknown *pUnkOuter,
213 REFIID riid, IUnknown **ppDBSession, ULONG cTotalProps,
214 DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
216 FIXME("(%p, %d, %p, %p, %s, %p, %d, %p, %p): stub\n", This, cPropertySets, rgPropertySets, pUnkOuter,
217 debugstr_guid(riid), ppDBSession, cTotalProps, rgPropStatus, ppErrorInfoRem);
221 HRESULT CALLBACK IDBDataSourceAdmin_DestroyDataSource_Proxy(IDBDataSourceAdmin* This)
223 FIXME("(%p): stub\n", This);
227 HRESULT __RPC_STUB IDBDataSourceAdmin_DestroyDataSource_Stub(IDBDataSourceAdmin* This, IErrorInfo **ppErrorInfoRem)
229 FIXME("(%p, %p): stub\n", This, ppErrorInfoRem);
233 HRESULT CALLBACK IDBDataSourceAdmin_GetCreationProperties_Proxy(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
234 const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertyInfoSets,
235 DBPROPINFOSET **prgPropertyInfoSets, OLECHAR **ppDescBuffer)
237 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
238 prgPropertyInfoSets, ppDescBuffer);
242 HRESULT __RPC_STUB IDBDataSourceAdmin_GetCreationProperties_Stub(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
243 const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertyInfoSets,
244 DBPROPINFOSET **prgPropertyInfoSets, DBCOUNTITEM *pcOffsets,
245 DBBYTEOFFSET **prgDescOffsets, ULONG *pcbDescBuffer,
246 OLECHAR **ppDescBuffer, IErrorInfo **ppErrorInfoRem)
248 FIXME("(%p, %d, %p, %p, %p, %p, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
249 prgPropertyInfoSets, pcOffsets, prgDescOffsets, pcbDescBuffer, ppDescBuffer, ppErrorInfoRem);
253 HRESULT CALLBACK IDBDataSourceAdmin_ModifyDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
255 FIXME("(%p, %d, %p): stub\n", This, cPropertySets, rgPropertySets);
259 HRESULT __RPC_STUB IDBDataSourceAdmin_ModifyDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
260 DBPROPSET *rgPropertySets, IErrorInfo **ppErrorInfoRem)
262 FIXME("(%p, %d, %p, %p): stub\n", This, cPropertySets, rgPropertySets, ppErrorInfoRem);
266 HRESULT CALLBACK ISessionProperties_GetProperties_Proxy(ISessionProperties* This, ULONG cPropertyIDSets,
267 const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertySets,
268 DBPROPSET **prgPropertySets)
270 FIXME("(%p, %d, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets,
271 pcPropertySets, prgPropertySets);
275 HRESULT __RPC_STUB ISessionProperties_GetProperties_Stub(ISessionProperties* This, ULONG cPropertyIDSets,
276 const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertySets,
277 DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
279 FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets,
280 pcPropertySets, prgPropertySets, ppErrorInfoRem);
284 HRESULT CALLBACK ISessionProperties_SetProperties_Proxy(ISessionProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
286 FIXME("(%p, %d, %p): stub\n", This, cPropertySets, rgPropertySets);
290 HRESULT __RPC_STUB ISessionProperties_SetProperties_Stub(ISessionProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
291 ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
293 FIXME("(%p, %d, %p, %d, %p, %p): stub\n", This, cPropertySets, rgPropertySets, cTotalProps,
294 rgPropStatus, ppErrorInfoRem);
298 HRESULT CALLBACK IOpenRowset_OpenRowset_Proxy(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
299 REFIID riid, ULONG cPropertySets, DBPROPSET rgPropertySets[], IUnknown **ppRowset)
301 FIXME("(%p, %p, %p, %p, %s, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
302 cPropertySets, rgPropertySets, ppRowset);
306 HRESULT __RPC_STUB IOpenRowset_OpenRowset_Stub(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
307 REFIID riid, ULONG cPropertySets, DBPROPSET *rgPropertySets,
308 IUnknown **ppRowset, ULONG cTotalProps, DBPROPSTATUS *rgPropStatus,
309 IErrorInfo **ppErrorInfoRem)
311 FIXME("(%p, %p, %p, %p, %s, %d, %p, %p, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
312 cPropertySets, rgPropertySets, ppRowset, cTotalProps, rgPropStatus, ppErrorInfoRem);
316 HRESULT CALLBACK IBindResource_Bind_Proxy(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
317 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
318 DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
320 FIXME("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
321 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppUnk);
325 HRESULT __RPC_STUB IBindResource_Bind_Stub(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
326 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
327 IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
329 FIXME("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
330 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppUnk);
334 HRESULT CALLBACK ICreateRow_CreateRow_Proxy(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
335 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
336 DBBINDURLSTATUS *pdwBindStatus, LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
338 FIXME("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
339 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppwszNewURL, ppUnk);
343 HRESULT __RPC_STUB ICreateRow_CreateRow_Stub(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
344 REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
345 IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus,
346 LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
348 FIXME("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
349 debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppwszNewURL,