Piotr Caban : oleacc: Add IOleWindow:: GetWindow implementation in default client accessible object.

Alexandre Julliard julliard at winehq.org
Thu May 15 15:14:31 CDT 2014


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

Author: Piotr Caban <piotr at codeweavers.com>
Date:   Thu May 15 17:53:37 2014 +0200

oleacc: Add IOleWindow::GetWindow implementation in default client accessible object.

---

 dlls/oleacc/client.c     |    7 +++++--
 dlls/oleacc/tests/main.c |    5 ++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/dlls/oleacc/client.c b/dlls/oleacc/client.c
index 8c3f011..cc7b53a 100644
--- a/dlls/oleacc/client.c
+++ b/dlls/oleacc/client.c
@@ -471,8 +471,11 @@ static ULONG WINAPI Client_OleWindow_Release(IOleWindow *iface)
 static HRESULT WINAPI Client_OleWindow_GetWindow(IOleWindow *iface, HWND *phwnd)
 {
     Client *This = impl_from_Client_OleWindow(iface);
-    FIXME("(%p)->(%p)\n", This, phwnd);
-    return E_NOTIMPL;
+
+    TRACE("(%p)->(%p)\n", This, phwnd);
+
+    *phwnd = This->hwnd;
+    return S_OK;
 }
 
 static HRESULT WINAPI Client_OleWindow_ContextSensitiveHelp(IOleWindow *iface, BOOL fEnterMode)
diff --git a/dlls/oleacc/tests/main.c b/dlls/oleacc/tests/main.c
index 3783d36..dde2786 100644
--- a/dlls/oleacc/tests/main.c
+++ b/dlls/oleacc/tests/main.c
@@ -384,7 +384,7 @@ static void test_default_client_accessible_object(void)
     IAccessible *acc;
     IDispatch *disp;
     IOleWindow *ow;
-    HWND chld, hwnd;
+    HWND chld, hwnd, hwnd2;
     HRESULT hr;
     VARIANT vid, v;
     BSTR str;
@@ -407,6 +407,9 @@ static void test_default_client_accessible_object(void)
 
     hr = IAccessible_QueryInterface(acc, &IID_IOleWindow, (void**)&ow);
     ok(hr == S_OK, "got %x\n", hr);
+    hr = IOleWindow_GetWindow(ow, &hwnd2);
+    ok(hr == S_OK, "got %x\n", hr);
+    ok(hwnd == hwnd2, "hwnd2 = %p, expected %p\n", hwnd2, hwnd);
     IOleWindow_Release(ow);
 
     hr = IAccessible_get_accChildCount(acc, &l);




More information about the wine-cvs mailing list