AccessibleObjectFromPoint

[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
);
 

Parameters

ptScreen
Win32 POINT structure describing the point to be examined, in screen coordinates.
ppacc
Address of a variable that will contain the address of the object's IAccessible interface.
pvarChild
Address of a VARIANT structure that will contain information describing the call's result. The vt member is always VT_I4. If the lVal member is set to zero, then the IAccessible interface pointer at ppacc belongs to the child object at the specified point. Otherwise, ppacc is the address of the IAccessible interface of the child's parent object.

Return Values

Returns S_OK if successful or a standard COM error code otherwise.

Remarks

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.

See Also

AccessibleObjectFromEvent, AccessibleObjectFromWindow, WinEventProc, VARIANT Structure