From 9551bbe4f031d63761132147d81b073149528357 Mon Sep 17 00:00:00 2001 From: Pietro Gagliardi Date: Thu, 25 Dec 2014 09:53:45 -0500 Subject: [PATCH] Added a testing implementation of IAccessible::get_accName(). --- wintable/new/accessibility.h | 13 +++++++++++-- wintable/new/main.c | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/wintable/new/accessibility.h b/wintable/new/accessibility.h index a676a09..3148df9 100644 --- a/wintable/new/accessibility.h +++ b/wintable/new/accessibility.h @@ -96,8 +96,17 @@ static HRESULT STDMETHODCALLTYPE tableAccget_accChild(IAccessible *this, VARIANT static HRESULT STDMETHODCALLTYPE tableAccget_accName(IAccessible *this, VARIANT varChild, BSTR *pszName) { - // TODO - return DISP_E_MEMBERNOTFOUND; + // TODO check pointer + if (varChild.vt != VT_I4) { + *pszName = NULL; + return E_INVALIDARG; + } + if (varChild.lVal == CHILDID_SELF) + ; // TODO standard accessible object + // TODO actually get the real name + *pszName = SysAllocString("This is a test of the accessibility interface."); + // TODO check null pointer + return S_OK; } static HRESULT STDMETHODCALLTYPE tableAccget_accValue(IAccessible *this, VARIANT varChild, BSTR *pszValue) diff --git a/wintable/new/main.c b/wintable/new/main.c index ae8d314..c5a8346 100644 --- a/wintable/new/main.c +++ b/wintable/new/main.c @@ -21,7 +21,7 @@ #include #include -// #qo LIBS: user32 kernel32 gdi32 comctl32 uxtheme ole32 oleacc uuid +// #qo LIBS: user32 kernel32 gdi32 comctl32 uxtheme ole32 oleaut32 oleacc uuid // TODO // - should tablePanic be CALLBACK or some other equivalent macro? and definitely export initTable somehow, but which alias macro to use?