From 83c14c723c9f5f4b233881677009fd4def61493b Mon Sep 17 00:00:00 2001 From: Alistair Leslie-Hughes Date: Mon, 3 Jun 2013 12:29:34 +1000 Subject: [PATCH] oledb32: Add interface ISourcesRowset. --- dlls/msdaps/usrmarshal.c | 36 ++++++++++++++++++++++++++++++++ include/Makefile.in | 1 + include/oledb.idl | 1 + include/srcrst.idl | 53 ++++++++++++++++++++++++++++++++++++++++++++++++ tools/make_makefiles | 1 + 5 files changed, 92 insertions(+) create mode 100644 include/srcrst.idl diff --git a/dlls/msdaps/usrmarshal.c b/dlls/msdaps/usrmarshal.c index 92bd8024837..7bbaa7b5811 100644 --- a/dlls/msdaps/usrmarshal.c +++ b/dlls/msdaps/usrmarshal.c @@ -1060,3 +1060,39 @@ HRESULT __RPC_STUB IRowsetNotify_OnRowsetChange_Stub(IRowsetNotify* This, IRowse TRACE("(%p)->(%p %d %d %d)\n", This, rowset, reason, phase, cantdeny); return IRowsetNotify_OnRowsetChange(This, rowset, reason, phase, cantdeny); } + + +HRESULT CALLBACK ISourcesRowset_GetSourcesRowset_Proxy(ISourcesRowset* This, IUnknown *pUnkOuter, REFIID riid, ULONG cPropertySets, + DBPROPSET rgProperties[], IUnknown **ppSourcesRowset) +{ + HRESULT hr; + IErrorInfo *error; + + TRACE("(%p)->(%p %s %d %p %p)\n", This, pUnkOuter, debugstr_guid(riid), cPropertySets, rgProperties, ppSourcesRowset); + + hr = ISourcesRowset_RemoteGetSourcesRowset_Proxy(This, pUnkOuter, riid, cPropertySets, rgProperties, ppSourcesRowset, 0, NULL, &error); + if(error) + { + SetErrorInfo(0, error); + IErrorInfo_Release(error); + } + + return hr; +} + +HRESULT __RPC_STUB ISourcesRowset_GetSourcesRowset_Stub(ISourcesRowset* This, IUnknown *pUnkOuter, REFIID riid, ULONG cPropertySets, + DBPROPSET *rgProperties, IUnknown **ppSourcesRowset, ULONG cTotalProps, DBPROPSTATUS *rgPropStatus, + IErrorInfo **ppErrorInfoRem) +{ + HRESULT hr; + + TRACE("(%p)->(%p %s %d %p %p %d %p %p)\n", This, pUnkOuter, debugstr_guid(riid), cPropertySets, rgProperties, ppSourcesRowset, + cTotalProps, rgPropStatus, ppErrorInfoRem); + + *ppErrorInfoRem = NULL; + hr = ISourcesRowset_GetSourcesRowset(This, pUnkOuter, riid, cPropertySets, rgProperties, ppSourcesRowset); + if(FAILED(hr)) + GetErrorInfo(0, ppErrorInfoRem); + + return hr; +} diff --git a/include/Makefile.in b/include/Makefile.in index c3a39bcd08a..9a06ac68942 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -514,6 +514,7 @@ SRCDIR_INCLUDES = \ sql.h \ sqlext.h \ sqltypes.h \ + srcrst.idl \ srrestoreptapi.h \ sspi.h \ sti.h \ diff --git a/include/oledb.idl b/include/oledb.idl index eaa49a6b028..05809325c2d 100644 --- a/include/oledb.idl +++ b/include/oledb.idl @@ -53,6 +53,7 @@ typedef DWORD_PTR DBHASHVALUE; #include "cmdtxt.idl" #include "dbccmd.idl" #include "dbcses.idl" +#include "srcrst.idl" #include "dbprop.idl" #include "dbinit.idl" #include "dbdsad.idl" diff --git a/include/srcrst.idl b/include/srcrst.idl new file mode 100644 index 00000000000..83aae52e311 --- /dev/null +++ b/include/srcrst.idl @@ -0,0 +1,53 @@ +/* + * Copyright (C) 2013 Alistair Leslie-Hughes + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +[ + object, + uuid(0c733a1e-2a1c-11ce-ade5-00aa0044773d), + pointer_default(unique) +] +interface ISourcesRowset : IUnknown +{ + typedef DWORD DBSOURCETYPE; + + enum DBSOURCETYPEENUM + { + DBSOURCETYPE_DATASOURCE = 1, + DBSOURCETYPE_ENUMERATOR = 2, + }; + + enum DBSOURCETYPEENUM20 + { + DBSOURCETYPE_DATASOURCE_TDP = 1, + DBSOURCETYPE_DATASOURCE_MDP = 3, + }; + + enum DBSOURCETYPEENUM25 + { + DBSOURCETYPE_BINDER = 4, + }; + + [local] + HRESULT GetSourcesRowset([in] IUnknown * pUnkOuter, [in] REFIID riid, [in] ULONG cPropertySets, + [in, out] DBPROPSET rgProperties[], [out] IUnknown **ppSourcesRowset); + + [call_as(GetSourcesRowset)] + HRESULT RemoteGetSourcesRowset([in] IUnknown * pUnkOuter, [in] REFIID riid, [in] ULONG cPropertySets, + [in] DBPROPSET * rgProperties, [out] IUnknown **ppSourcesRowset, [in] ULONG cTotalProps, + [out] DBPROPSTATUS *rgPropStatus, [out] IErrorInfo **ppErrorInfoRem); +} diff --git a/tools/make_makefiles b/tools/make_makefiles index 91b136df52a..bfa904ebeb8 100755 --- a/tools/make_makefiles +++ b/tools/make_makefiles @@ -158,6 +158,7 @@ my %private_idl_headers = ( "rstinf.idl" => 1, "rstloc.idl" => 1, "rstnot.idl" => 1, + "srcrst.idl" => 1, "sesprp.idl" => 1, "vmrender.idl" => 1, "xmldom.idl" => 1, -- 2.11.4.GIT