oleacc: Add AccessibleObjectFromWindow implementation.

This commit is contained in:
Piotr Caban 2014-04-28 17:30:31 +02:00 committed by Alexandre Julliard
parent 91f2b04625
commit 817222558d
1 changed files with 17 additions and 2 deletions

View File

@ -217,9 +217,24 @@ HRESULT WINAPI AccessibleObjectFromPoint( POINT ptScreen, IAccessible** ppacc, V
HRESULT WINAPI AccessibleObjectFromWindow( HWND hwnd, DWORD dwObjectID, HRESULT WINAPI AccessibleObjectFromWindow( HWND hwnd, DWORD dwObjectID,
REFIID riid, void** ppvObject ) REFIID riid, void** ppvObject )
{ {
FIXME("%p %d %s %p\n", hwnd, dwObjectID, TRACE("%p %d %s %p\n", hwnd, dwObjectID,
debugstr_guid( riid ), ppvObject ); debugstr_guid( riid ), ppvObject );
return E_NOTIMPL;
if(!ppvObject)
return E_INVALIDARG;
*ppvObject = NULL;
if(IsWindow(hwnd)) {
LRESULT lres;
lres = SendMessageW(hwnd, WM_GETOBJECT, 0xffffffff, dwObjectID);
if(FAILED(lres))
return lres;
else if(lres)
return ObjectFromLresult(lres, riid, 0, ppvObject);
}
return CreateStdAccessibleObject(hwnd, dwObjectID, riid, ppvObject);
} }
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason,