[This is preliminary documentation and subject to change.]
Retrieves the address of the IAccessible interface accessible object at a specified point on the screen.
STDAPI AccessibleObjectFromPoint(
POINT ptScreen,
IAccessible** ppacc,
VARIANT* pvarChild
);
Returns S_OK if successful or a standard COM error code otherwise.
This function retrieves the lowest-level accessible object at a given point. If the child at the point is not an accessible object (that is, does not support IAccessible), then the function returns that child's parent. The parent is assumed to support the functionality extended by the IAccessible interface on the child's behalf.
This function increases an object's reference count, and must have a corresponding Release. Even though an object has a reference count greater than zero, that object can still be destroyed, and clients are not guaranteed that getting properties from or calling methods on an object will succeed. This is what Word does with its objects when it shuts down: As with a standard OLE Automation object, Word will quit and CoDisconnect the object so that if anyone tries to access it cross-process after the quit, OLE will return an error. A reference count on a OLE Automation object does not affect the reference count in the application.
AccessibleObjectFromEvent, AccessibleObjectFromWindow, WinEventProc, VARIANT Structure