From 95c9417e0a161b5d2a19f3d0e060329e3601ed0f Mon Sep 17 00:00:00 2001 From: Huw Davies Date: Thu, 4 Feb 2010 14:07:25 +0000 Subject: [PATCH] msdaps: Add support for remoting IAccessor_CreateAccessor. --- dlls/msdaps/row_server.c | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/dlls/msdaps/row_server.c b/dlls/msdaps/row_server.c index 849ee788c5e..43da90ba7ee 100644 --- a/dlls/msdaps/row_server.c +++ b/dlls/msdaps/row_server.c @@ -384,8 +384,19 @@ static HRESULT WINAPI server_CreateAccessor(IWineRowServer* iface, DBACCESSORFLA HACCESSOR *phAccessor, DBBINDSTATUS *rgStatus) { server *This = impl_from_IWineRowServer(iface); - FIXME("(%p)->(%08x, %d, %p, %d, %p, %p): stub\n", This, dwAccessorFlags, cBindings, rgBindings, cbRowSize, phAccessor, rgStatus); - return E_NOTIMPL; + HRESULT hr; + IAccessor *accessor; + + TRACE("(%p)->(%08x, %d, %p, %d, %p, %p)\n", This, dwAccessorFlags, cBindings, rgBindings, cbRowSize, phAccessor, rgStatus); + + hr = IUnknown_QueryInterface(This->inner_unk, &IID_IAccessor, (void**)&accessor); + if(FAILED(hr)) return hr; + + hr = IAccessor_CreateAccessor(accessor, dwAccessorFlags, cBindings, rgBindings, cbRowSize, phAccessor, rgStatus); + IAccessor_Release(accessor); + + TRACE("returning %08x, accessor %08lx\n", hr, *phAccessor); + return hr; } static HRESULT WINAPI server_GetBindings(IWineRowServer* iface, HACCESSOR hAccessor, @@ -1037,8 +1048,19 @@ static HRESULT WINAPI accessor_CreateAccessor(IAccessor *iface, DBACCESSORFLAGS DBBINDSTATUS rgStatus[]) { rowset_proxy *This = impl_from_IAccessor(iface); - FIXME("(%p)\n", This); - return E_NOTIMPL; + HRESULT hr; + DBBINDSTATUS *status; + + TRACE("(%p)->(%08x, %d, %p, %d, %p, %p)\n", This, dwAccessorFlags, cBindings, rgBindings, cbRowSize, phAccessor, rgStatus); + + if(!rgStatus) status = CoTaskMemAlloc(cBindings * sizeof(status[0])); + else status = rgStatus; + + hr = IWineRowServer_CreateAccessor(This->server, dwAccessorFlags, cBindings, rgBindings, cbRowSize, phAccessor, status); + + if(!rgStatus) CoTaskMemFree(status); + + return hr; } static HRESULT WINAPI accessor_GetBindings(IAccessor *iface, HACCESSOR hAccessor, DBACCESSORFLAGS *pdwAccessorFlags,