From: Esme Povirk esme@codeweavers.com
--- dlls/comctl32/syslink.c | 18 ++++++++++++++++-- dlls/comctl32/tests/syslink.c | 4 ---- 2 files changed, 16 insertions(+), 6 deletions(-)
diff --git a/dlls/comctl32/syslink.c b/dlls/comctl32/syslink.c index 424d46acff9..657ce6d61bf 100644 --- a/dlls/comctl32/syslink.c +++ b/dlls/comctl32/syslink.c @@ -251,8 +251,22 @@ static HRESULT WINAPI Accessible_get_accChildCount(IAccessible *iface, LONG *cou
static HRESULT WINAPI Accessible_get_accChild(IAccessible *iface, VARIANT childid, IDispatch **disp) { - FIXME("%p\n", iface); - return E_NOTIMPL; + SYSLINK_ACC *This = impl_from_IAccessible(iface); + HRESULT hr; + DOC_ITEM* item; + + TRACE("%p, %s\n", iface, debugstr_variant(&childid)); + + *disp = NULL; + + hr = Accessible_FindChild(This, childid, &item); + if (FAILED(hr)) + return hr; + + if (item) + return S_FALSE; + else + return E_INVALIDARG; }
static HRESULT WINAPI Accessible_get_accName(IAccessible *iface, VARIANT childid, BSTR *name) diff --git a/dlls/comctl32/tests/syslink.c b/dlls/comctl32/tests/syslink.c index 55df8d8b59c..a6503d13506 100644 --- a/dlls/comctl32/tests/syslink.c +++ b/dlls/comctl32/tests/syslink.c @@ -342,13 +342,11 @@ static void test_msaa(void) ok(hr == S_OK, "accChildCount failed, hr=%lx\n", hr); ok(count == 2, "accChildCount returned %li\n", count);
-todo_wine { /* child 1 */ V_I4(&varChild) = 1; hr = IAccessible_get_accChild(acc, varChild, &child); ok(hr == S_FALSE, "accChild hr=%lx\n", hr); ok(!child, "accChild returned IDispatch\n"); -}
hr = IAccessible_get_accRole(acc, varChild, &varResult); ok(hr == S_OK, "accRole failed, hr=%lx\n", hr); @@ -388,13 +386,11 @@ todo_wine { hr = IAccessible_accLocation(acc, &left, &top, &width, &height, varChild); ok(hr == S_OK, "accLocation failed, hr=%lx\n", hr);
-todo_wine { /* child 2 */ V_I4(&varChild) = 2; hr = IAccessible_get_accChild(acc, varChild, &child); ok(hr == S_FALSE, "accChild hr=%lx\n", hr); ok(!child, "accChild returned IDispatch\n"); -}
hr = IAccessible_get_accRole(acc, varChild, &varResult); ok(hr == S_OK, "accRole failed, hr=%lx\n", hr);