Huw Davies : msdaps: Add support for remoting IRowset_GetNextRows.

Alexandre Julliard julliard at winehq.org
Thu Feb 4 11:11:04 CST 2010


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Feb  4 11:52:52 2010 +0000

msdaps: Add support for remoting IRowset_GetNextRows.

---

 dlls/msdaps/row_server.c |   31 +++++++++++++++++++++++++++----
 1 files changed, 27 insertions(+), 4 deletions(-)

diff --git a/dlls/msdaps/row_server.c b/dlls/msdaps/row_server.c
index a1abbf3..1dea799 100644
--- a/dlls/msdaps/row_server.c
+++ b/dlls/msdaps/row_server.c
@@ -265,8 +265,20 @@ static HRESULT WINAPI server_GetNextRows(IWineRowServer* iface, HCHAPTER hReserv
                                          DBROWCOUNT cRows, DBCOUNTITEM *pcRowObtained, HROW **prghRows)
 {
     server *This = impl_from_IWineRowServer(iface);
-    FIXME("(%p)->(%08lx, %d, %d, %p, %p): stub\n", This, hReserved, lRowsOffset, cRows, pcRowObtained, prghRows);
-    return E_NOTIMPL;
+    IRowset *rowset;
+    HRESULT hr;
+
+    TRACE("(%p)->(%08lx, %d, %d, %p, %p)\n", This, hReserved, lRowsOffset, cRows, pcRowObtained, prghRows);
+
+    hr = IUnknown_QueryInterface(This->inner_unk, &IID_IRowset, (void**)&rowset);
+    if(FAILED(hr)) return hr;
+
+    *prghRows = NULL;
+
+    hr = IRowset_GetNextRows(rowset, hReserved, lRowsOffset, cRows, pcRowObtained, prghRows);
+    IRowset_Release(rowset);
+    TRACE("returning %08x, got %d rows\n", hr, *pcRowObtained);
+    return hr;
 }
 
 static HRESULT WINAPI server_ReleaseRows(IWineRowServer* iface, DBCOUNTITEM cRows, const HROW rghRows[],
@@ -627,10 +639,21 @@ static HRESULT WINAPI rowset_GetNextRows(IRowset *iface, HCHAPTER hReserved, DBR
                                          DBROWCOUNT cRows, DBCOUNTITEM *pcRowObtained, HROW **prghRows)
 {
     rowset_proxy *This = impl_from_IRowset(iface);
+    HRESULT hr;
+    HROW *rows = NULL;
 
-    FIXME("(%p)->(%08lx, %d, %d, %p, %p): stub\n", This, hReserved, lRowsOffset, cRows, pcRowObtained, prghRows);
+    TRACE("(%p)->(%08lx, %d, %d, %p, %p)\n", This, hReserved, lRowsOffset, cRows, pcRowObtained, prghRows);
 
-    return E_NOTIMPL;
+    hr = IWineRowServer_GetNextRows(This->server, hReserved, lRowsOffset, cRows, pcRowObtained, &rows);
+    if(*prghRows)
+    {
+        memcpy(*prghRows, rows, *pcRowObtained * sizeof(rows[0]));
+        CoTaskMemFree(rows);
+    }
+    else
+        *prghRows = rows;
+
+    return hr;
 }
 
 static HRESULT WINAPI rowset_ReleaseRows(IRowset *iface, DBCOUNTITEM cRows, const HROW rghRows[],




More information about the wine-cvs mailing list