msdaps: Add support for ISourcesRowset (try 2)

Alistair Leslie-Hughes leslie_alistair at hotmail.com
Fri Jun 14 05:12:55 CDT 2013


Hi,


Changelog:
      msdaps:  Add support for ISourcesRowset


Best Regards
   Alistair Leslie-Hughes

-------------- next part --------------
>From d49ad5009a39cdd77c2242a3d31fc49b7fef2ef3 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair at hotmail.com>
Date: Mon, 3 Jun 2013 12:29:34 +1000
Subject: [PATCH] Add interface ISourcesRowset
To: wine-patches <wine-patches at winehq.org>

---
 dlls/msdaps/usrmarshal.c | 36 ++++++++++++++++++++++++++++++++
 include/oledb.idl        |  1 +
 include/srcrst.idl       | 53 ++++++++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 90 insertions(+)
 create mode 100644 include/srcrst.idl

diff --git a/dlls/msdaps/usrmarshal.c b/dlls/msdaps/usrmarshal.c
index 92bd802..7bbaa7b 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/oledb.idl b/include/oledb.idl
index eaa49a6..0580932 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 0000000..83aae52
--- /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);
+}
-- 
1.8.1.2



More information about the wine-patches mailing list