Huw Davies : msdaps: Add support for remoting IRowsetLocate_GetRowsAt.

Alexandre Julliard julliard at winehq.org
Fri Feb 5 08:42:33 CST 2010


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

Author: Huw Davies <huw at codeweavers.com>
Date:   Thu Feb  4 14:47:56 2010 +0000

msdaps: Add support for remoting IRowsetLocate_GetRowsAt.

---

 dlls/msdaps/row_server.c |   37 ++++++++++++++++++++++++++++++++-----
 1 files changed, 32 insertions(+), 5 deletions(-)

diff --git a/dlls/msdaps/row_server.c b/dlls/msdaps/row_server.c
index c54ce47..26d0e13 100644
--- a/dlls/msdaps/row_server.c
+++ b/dlls/msdaps/row_server.c
@@ -332,11 +332,23 @@ static HRESULT WINAPI server_GetRowsAt(IWineRowServer *iface, HWATCHREGION hRese
                                        DBROWCOUNT cRows, DBCOUNTITEM *pcRowsObtained, HROW **prghRows)
 {
     server *This = impl_from_IWineRowServer(iface);
+    IRowsetLocate *rowsetlocate;
+    HRESULT hr;
 
-    FIXME("(%p)->(%08lx, %08lx, %d, %p, %d, %d, %p, %p): stub\n", This, hReserved1, hReserved2, cbBookmark, pBookmark,
-          lRowsOffset, cRows, pcRowsObtained, prghRows);
+    TRACE("(%p)->(%08lx, %08lx, %d, %p, %d, %d, %p, %p\n", This, hReserved1, hReserved2, cbBookmark, pBookmark, lRowsOffset, cRows,
+          pcRowsObtained, prghRows);
 
-    return E_NOTIMPL;
+    *prghRows = NULL;
+
+    hr = IUnknown_QueryInterface(This->inner_unk, &IID_IRowsetLocate, (void**)&rowsetlocate);
+    if(FAILED(hr)) return hr;
+
+    hr = IRowsetLocate_GetRowsAt(rowsetlocate, hReserved1, hReserved2, cbBookmark, pBookmark, lRowsOffset,
+                                 cRows, pcRowsObtained, prghRows);
+    IRowsetLocate_Release(rowsetlocate);
+
+    TRACE("returning %08x\n", hr);
+    return hr;
 }
 
 static HRESULT WINAPI server_GetRowsByBookmark(IWineRowServer *iface, HCHAPTER hReserved, DBCOUNTITEM cRows,
@@ -1006,8 +1018,23 @@ static HRESULT WINAPI rowsetlocate_GetRowsAt(IRowsetLocate *iface, HWATCHREGION
                                              HROW **prghRows)
 {
     rowset_proxy *This = impl_from_IRowsetLocate(iface);
-    FIXME("(%p)\n", This);
-    return E_NOTIMPL;
+    HRESULT hr;
+    HROW *rows = NULL;
+
+    TRACE("(%p)->(%08lx, %08lx, %d, %p, %d, %d, %p, %p\n", This, hReserved1, hReserved2, cbBookmark, pBookmark, lRowsOffset, cRows,
+          pcRowsObtained, prghRows);
+
+    hr = IWineRowServer_GetRowsAt(This->server, hReserved1, hReserved2, cbBookmark, pBookmark, lRowsOffset, cRows, pcRowsObtained, &rows);
+
+    if(*prghRows)
+    {
+        memcpy(*prghRows, rows, *pcRowsObtained * sizeof(rows[0]));
+        CoTaskMemFree(rows);
+    }
+    else
+        *prghRows = rows;
+
+    return hr;
 }
 
 static HRESULT WINAPI rowsetlocate_GetRowsByBookmark(IRowsetLocate *iface, HCHAPTER hReserved, DBCOUNTITEM cRows, const DBBKMARK rgcbBookmarks[],




More information about the wine-cvs mailing list