msdaps: Implement IDBInitialize_Initialize proxy and stub.
[wine] / dlls / msdaps / usrmarshal.c
1 /*
2  *    Misc marshaling routinues
3  *
4  * Copyright 2009 Huw Davies
5  *
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.
10  *
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.
15  *
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
19  */
20 #include <stdarg.h>
21 #include <string.h>
22
23 #define COBJMACROS
24 #define NONAMELESSUNION
25 #define NONAMELESSSTRUCT
26
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"
35
36 #include "wine/debug.h"
37
38 WINE_DEFAULT_DEBUG_CHANNEL(oledb);
39
40 HRESULT CALLBACK IDBCreateCommand_CreateCommand_Proxy(IDBCreateCommand* This, IUnknown *pUnkOuter,
41                                                       REFIID riid, IUnknown **ppCommand)
42 {
43     FIXME("(%p, %p, %s, %p): stub\n", This, pUnkOuter, debugstr_guid(riid),
44           ppCommand);
45     return E_NOTIMPL;
46 }
47
48 HRESULT __RPC_STUB IDBCreateCommand_CreateCommand_Stub(IDBCreateCommand* This, IUnknown *pUnkOuter,
49                                                        REFIID riid, IUnknown **ppCommand, IErrorInfo **ppErrorInfoRem)
50 {
51     FIXME("(%p, %p, %s, %p, %p): stub\n", This, pUnkOuter, debugstr_guid(riid),
52           ppCommand, ppErrorInfoRem);
53     return E_NOTIMPL;
54
55 }
56
57 HRESULT CALLBACK IDBCreateSession_CreateSession_Proxy(IDBCreateSession* This, IUnknown *pUnkOuter,
58                                                       REFIID riid, IUnknown **ppDBSession)
59 {
60     FIXME("(%p, %p, %s, %p): stub\n", This, pUnkOuter, debugstr_guid(riid),
61           ppDBSession);
62     return E_NOTIMPL;
63 }
64
65 HRESULT __RPC_STUB IDBCreateSession_CreateSession_Stub(IDBCreateSession* This, IUnknown *pUnkOuter,
66                                                        REFIID riid, IUnknown **ppDBSession, IErrorInfo **ppErrorInfoRem)
67 {
68     FIXME("(%p, %p, %s, %p, %p): stub\n", This, pUnkOuter, debugstr_guid(riid),
69           ppDBSession, ppErrorInfoRem);
70     return E_NOTIMPL;
71
72 }
73
74 HRESULT CALLBACK IDBProperties_GetProperties_Proxy(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
75                                                    ULONG *pcPropertySets, DBPROPSET **prgPropertySets)
76 {
77     FIXME("(%p, %d, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets,
78           prgPropertySets);
79     return E_NOTIMPL;
80 }
81
82 HRESULT __RPC_STUB IDBProperties_GetProperties_Stub(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET *rgPropertyIDSets,
83                                                     ULONG *pcPropertySets, DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
84 {
85     FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertySets,
86           prgPropertySets, ppErrorInfoRem);
87     return E_NOTIMPL;
88 }
89
90 HRESULT CALLBACK IDBProperties_GetPropertyInfo_Proxy(IDBProperties* This, ULONG cPropertyIDSets, const DBPROPIDSET rgPropertyIDSets[],
91                                                      ULONG *pcPropertyInfoSets, DBPROPINFOSET **prgPropertyInfoSets,
92                                                      OLECHAR **ppDescBuffer)
93 {
94     FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
95           prgPropertyInfoSets, ppDescBuffer);
96     return E_NOTIMPL;
97 }
98
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)
103 {
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);
106     return E_NOTIMPL;
107 }
108
109 HRESULT CALLBACK IDBProperties_SetProperties_Proxy(IDBProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
110 {
111     FIXME("(%p, %d, %p): stub\n", This, cPropertySets, rgPropertySets);
112     return E_NOTIMPL;
113 }
114
115 HRESULT __RPC_STUB IDBProperties_SetProperties_Stub(IDBProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
116                                                     ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
117 {
118     FIXME("(%p, %d, %p, %d, %p, %p): stub\n", This, cPropertySets, rgPropertySets, cTotalProps,
119           rgPropStatus, ppErrorInfoRem);
120     return E_NOTIMPL;
121 }
122
123 HRESULT CALLBACK IDBInitialize_Initialize_Proxy(IDBInitialize* This)
124 {
125     HRESULT hr;
126     IErrorInfo *error;
127
128     TRACE("(%p)\n", This);
129     hr = IDBInitialize_RemoteInitialize_Proxy(This, &error);
130     if(error)
131     {
132         SetErrorInfo(0, error);
133         IErrorInfo_Release(error);
134     }
135     return hr;
136 }
137
138 HRESULT __RPC_STUB IDBInitialize_Initialize_Stub(IDBInitialize* This, IErrorInfo **ppErrorInfoRem)
139 {
140     HRESULT hr;
141     TRACE("(%p, %p)\n", This, ppErrorInfoRem);
142
143     *ppErrorInfoRem = NULL;
144     hr = IDBInitialize_Initialize(This);
145     if(FAILED(hr)) GetErrorInfo(0, ppErrorInfoRem);
146
147     return hr;
148 }
149
150 HRESULT CALLBACK IDBInitialize_Uninitialize_Proxy(IDBInitialize* This)
151 {
152     FIXME("(%p): stub\n", This);
153     return E_NOTIMPL;
154 }
155
156 HRESULT __RPC_STUB IDBInitialize_Uninitialize_Stub(IDBInitialize* This, IErrorInfo **ppErrorInfoRem)
157 {
158     FIXME("(%p, %p): stub\n", This, ppErrorInfoRem);
159     return E_NOTIMPL;
160 }
161
162 HRESULT CALLBACK IDBDataSourceAdmin_CreateDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets,
163                                                            DBPROPSET rgPropertySets[], IUnknown *pUnkOuter,
164                                                            REFIID riid, IUnknown **ppDBSession)
165 {
166     FIXME("(%p, %d, %p, %p, %s, %p): stub\n", This, cPropertySets, rgPropertySets, pUnkOuter,
167           debugstr_guid(riid), ppDBSession);
168     return E_NOTIMPL;
169 }
170
171 HRESULT __RPC_STUB IDBDataSourceAdmin_CreateDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
172                                                             DBPROPSET *rgPropertySets, IUnknown *pUnkOuter,
173                                                             REFIID riid, IUnknown **ppDBSession, ULONG cTotalProps,
174                                                             DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
175 {
176     FIXME("(%p, %d, %p, %p, %s, %p, %d, %p, %p): stub\n", This, cPropertySets, rgPropertySets, pUnkOuter,
177           debugstr_guid(riid), ppDBSession, cTotalProps, rgPropStatus, ppErrorInfoRem);
178     return E_NOTIMPL;
179 }
180
181 HRESULT CALLBACK IDBDataSourceAdmin_DestroyDataSource_Proxy(IDBDataSourceAdmin* This)
182 {
183     FIXME("(%p): stub\n", This);
184     return E_NOTIMPL;
185 }
186
187 HRESULT __RPC_STUB IDBDataSourceAdmin_DestroyDataSource_Stub(IDBDataSourceAdmin* This, IErrorInfo **ppErrorInfoRem)
188 {
189     FIXME("(%p, %p): stub\n", This, ppErrorInfoRem);
190     return E_NOTIMPL;
191 }
192
193 HRESULT CALLBACK IDBDataSourceAdmin_GetCreationProperties_Proxy(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
194                                                                 const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertyInfoSets,
195                                                                 DBPROPINFOSET **prgPropertyInfoSets, OLECHAR **ppDescBuffer)
196 {
197     FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
198           prgPropertyInfoSets, ppDescBuffer);
199     return E_NOTIMPL;
200 }
201
202 HRESULT __RPC_STUB IDBDataSourceAdmin_GetCreationProperties_Stub(IDBDataSourceAdmin* This, ULONG cPropertyIDSets,
203                                                                  const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertyInfoSets,
204                                                                  DBPROPINFOSET **prgPropertyInfoSets, DBCOUNTITEM *pcOffsets,
205                                                                  DBBYTEOFFSET **prgDescOffsets, ULONG *pcbDescBuffer,
206                                                                  OLECHAR **ppDescBuffer, IErrorInfo **ppErrorInfoRem)
207 {
208     FIXME("(%p, %d, %p, %p, %p, %p, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets, pcPropertyInfoSets,
209           prgPropertyInfoSets, pcOffsets, prgDescOffsets, pcbDescBuffer, ppDescBuffer, ppErrorInfoRem);
210     return E_NOTIMPL;
211 }
212
213 HRESULT CALLBACK IDBDataSourceAdmin_ModifyDataSource_Proxy(IDBDataSourceAdmin* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
214 {
215     FIXME("(%p, %d, %p): stub\n", This, cPropertySets, rgPropertySets);
216     return E_NOTIMPL;
217 }
218
219 HRESULT __RPC_STUB IDBDataSourceAdmin_ModifyDataSource_Stub(IDBDataSourceAdmin* This, ULONG cPropertySets,
220                                                             DBPROPSET *rgPropertySets, IErrorInfo **ppErrorInfoRem)
221 {
222     FIXME("(%p, %d, %p, %p): stub\n", This, cPropertySets, rgPropertySets, ppErrorInfoRem);
223     return E_NOTIMPL;
224 }
225
226 HRESULT CALLBACK ISessionProperties_GetProperties_Proxy(ISessionProperties* This, ULONG cPropertyIDSets,
227                                                         const DBPROPIDSET rgPropertyIDSets[], ULONG *pcPropertySets,
228                                                         DBPROPSET **prgPropertySets)
229 {
230     FIXME("(%p, %d, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets,
231           pcPropertySets, prgPropertySets);
232     return E_NOTIMPL;
233 }
234
235 HRESULT __RPC_STUB ISessionProperties_GetProperties_Stub(ISessionProperties* This, ULONG cPropertyIDSets,
236                                                          const DBPROPIDSET *rgPropertyIDSets, ULONG *pcPropertySets,
237                                                          DBPROPSET **prgPropertySets, IErrorInfo **ppErrorInfoRem)
238 {
239     FIXME("(%p, %d, %p, %p, %p, %p): stub\n", This, cPropertyIDSets, rgPropertyIDSets,
240           pcPropertySets, prgPropertySets, ppErrorInfoRem);
241     return E_NOTIMPL;
242 }
243
244 HRESULT CALLBACK ISessionProperties_SetProperties_Proxy(ISessionProperties* This, ULONG cPropertySets, DBPROPSET rgPropertySets[])
245 {
246     FIXME("(%p, %d, %p): stub\n", This, cPropertySets, rgPropertySets);
247     return E_NOTIMPL;
248 }
249
250 HRESULT __RPC_STUB ISessionProperties_SetProperties_Stub(ISessionProperties* This, ULONG cPropertySets, DBPROPSET *rgPropertySets,
251                                                          ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, IErrorInfo **ppErrorInfoRem)
252 {
253     FIXME("(%p, %d, %p, %d, %p, %p): stub\n", This, cPropertySets, rgPropertySets, cTotalProps,
254           rgPropStatus, ppErrorInfoRem);
255     return E_NOTIMPL;
256 }
257
258 HRESULT CALLBACK IOpenRowset_OpenRowset_Proxy(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
259                                               REFIID riid, ULONG cPropertySets, DBPROPSET rgPropertySets[], IUnknown **ppRowset)
260 {
261     FIXME("(%p, %p, %p, %p, %s, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
262           cPropertySets, rgPropertySets, ppRowset);
263     return E_NOTIMPL;
264 }
265
266 HRESULT __RPC_STUB IOpenRowset_OpenRowset_Stub(IOpenRowset* This, IUnknown *pUnkOuter, DBID *pTableID, DBID *pIndexID,
267                                                REFIID riid, ULONG cPropertySets, DBPROPSET *rgPropertySets,
268                                                IUnknown **ppRowset, ULONG cTotalProps, DBPROPSTATUS *rgPropStatus,
269                                                IErrorInfo **ppErrorInfoRem)
270 {
271     FIXME("(%p, %p, %p, %p, %s, %d, %p, %p, %d, %p, %p): stub\n", This, pUnkOuter, pTableID, pIndexID, debugstr_guid(riid),
272           cPropertySets, rgPropertySets, ppRowset, cTotalProps, rgPropStatus, ppErrorInfoRem);
273     return E_NOTIMPL;
274 }
275
276 HRESULT CALLBACK IBindResource_Bind_Proxy(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
277                                           REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
278                                           DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
279 {
280     FIXME("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
281           debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppUnk);
282     return E_NOTIMPL;
283 }
284
285 HRESULT __RPC_STUB IBindResource_Bind_Stub(IBindResource* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
286                                            REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
287                                            IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus, IUnknown **ppUnk)
288 {
289     FIXME("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
290           debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppUnk);
291     return E_NOTIMPL;
292 }
293
294 HRESULT CALLBACK ICreateRow_CreateRow_Proxy(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
295                                             REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, DBIMPLICITSESSION *pImplSession,
296                                             DBBINDURLSTATUS *pdwBindStatus, LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
297 {
298     FIXME("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
299           debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pImplSession, pdwBindStatus, ppwszNewURL, ppUnk);
300     return E_NOTIMPL;
301 }
302
303 HRESULT __RPC_STUB ICreateRow_CreateRow_Stub(ICreateRow* This, IUnknown *pUnkOuter, LPCOLESTR pwszURL, DBBINDURLFLAG dwBindURLFlags,
304                                              REFGUID rguid, REFIID riid, IAuthenticate *pAuthenticate, IUnknown *pSessionUnkOuter,
305                                              IID *piid, IUnknown **ppSession, DBBINDURLSTATUS *pdwBindStatus,
306                                              LPOLESTR *ppwszNewURL, IUnknown **ppUnk)
307 {
308     FIXME("(%p, %p, %s, %08x, %s, %s, %p, %p, %p, %p, %p, %p, %p): stub\n", This, pUnkOuter, debugstr_w(pwszURL), dwBindURLFlags,
309           debugstr_guid(rguid), debugstr_guid(riid), pAuthenticate, pSessionUnkOuter, piid, ppSession, pdwBindStatus, ppwszNewURL,
310           ppUnk);
311     return E_NOTIMPL;
312 }