Nikolay Sivov : oledb32: Implement IRowPosition_GetRowset().

Alexandre Julliard julliard at winehq.org
Fri Aug 23 13:49:34 CDT 2013


Module: wine
Branch: master
Commit: 149c392e099fd1cdad5afe48b7897d898f1adf2a
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=149c392e099fd1cdad5afe48b7897d898f1adf2a

Author: Nikolay Sivov <nsivov at codeweavers.com>
Date:   Fri Aug 23 10:33:35 2013 +0400

oledb32: Implement IRowPosition_GetRowset().

---

 dlls/oledb32/rowpos.c         |    7 +++++--
 dlls/oledb32/tests/database.c |    7 +++++++
 2 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/dlls/oledb32/rowpos.c b/dlls/oledb32/rowpos.c
index a6c68b8..cca3192 100644
--- a/dlls/oledb32/rowpos.c
+++ b/dlls/oledb32/rowpos.c
@@ -168,8 +168,11 @@ static HRESULT WINAPI rowpos_GetRowPosition(IRowPosition *iface, HCHAPTER *chapt
 static HRESULT WINAPI rowpos_GetRowset(IRowPosition *iface, REFIID riid, IUnknown **rowset)
 {
     rowpos *This = impl_from_IRowPosition(iface);
-    FIXME("(%p)->(%s %p): stub\n", This, debugstr_guid(riid), rowset);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%s %p)\n", This, debugstr_guid(riid), rowset);
+
+    if (!This->rowset) return E_UNEXPECTED;
+    return IRowset_QueryInterface(This->rowset, riid, (void**)rowset);
 }
 
 static HRESULT WINAPI rowpos_Initialize(IRowPosition *iface, IUnknown *rowset)
diff --git a/dlls/oledb32/tests/database.c b/dlls/oledb32/tests/database.c
index f42f189..ac809ef 100644
--- a/dlls/oledb32/tests/database.c
+++ b/dlls/oledb32/tests/database.c
@@ -472,6 +472,7 @@ static void init_onchange_sink(IRowPosition *rowpos)
 static void test_rowpos_clearrowposition(void)
 {
     IRowPosition *rowpos;
+    IUnknown *unk;
     HRESULT hr;
 
     hr = CoCreateInstance(&CLSID_OLEDB_ROWPOSITIONLIBRARY, NULL, CLSCTX_INPROC_SERVER, &IID_IRowPosition, (void**)&rowpos);
@@ -480,10 +481,16 @@ static void test_rowpos_clearrowposition(void)
     hr = IRowPosition_ClearRowPosition(rowpos);
     ok(hr == E_UNEXPECTED, "got %08x\n", hr);
 
+    hr = IRowPosition_GetRowset(rowpos, &IID_IStream, &unk);
+    ok(hr == E_UNEXPECTED, "got %08x\n", hr);
+
     init_test_rset();
     hr = IRowPosition_Initialize(rowpos, (IUnknown*)&test_rset.IRowset_iface);
     ok(hr == S_OK, "got %08x\n", hr);
 
+    hr = IRowPosition_GetRowset(rowpos, &IID_IRowset, &unk);
+    ok(hr == S_OK, "got %08x\n", hr);
+
     init_onchange_sink(rowpos);
     hr = IRowPosition_ClearRowPosition(rowpos);
     ok(hr == S_OK, "got %08x\n", hr);




More information about the wine-cvs mailing list