The AccessibleObjectFromPoint function retrieves the address of the IAccessible interface pointer for the object at a specified point on the screen.

For more information about COM parameter attributes, allocating memory, and freeing memory, see Definitions of Parameter Attributes.

STDAPI AccessibleObjectFromPoint(
POINTptScreen,IAccessible** ppacc,VARIANT* pvarChild);


  • ptScreen
    [in] Specifies the point that is examined, in physical screen coordinates.
  • ppacc
    [out] Address of a pointer variable that receives the address of the object's IAccessible interface.
  • pvarChild
    [out] Address of a VARIANT structure that specifies whether the IAccessible interface pointer returned in ppacc belongs to the object at the specified point or to the parent of the element at the specified point. The vt member of the VARIANT is always VT_I4. If the lVal member is CHILDID_SELF, then the IAccessible interface pointer at ppacc belongs to the object at the point. Otherwise, ppacc is the address of the IAccessible interface of the child element's parent object. Clients must call VariantClear on the retrieved VARIANT parameter when finished using it.

Return Values

If successful, returns S_OK.

If not successful, returns the following or another standard COM error code.

Error Description
E_INVALIDARG An argument is invalid.


This function retrieves the lowest-level accessible object in the object hierarchy at a given point. If the element at the point is not an accessible object (that is, does not support IAccessible), then the function retrieves the IAccessible interface of the parent object. The parent object must provide information about the child element through the IAccessible interface.

As with other IAccessible methods and functions, clients might receive errors for IAccessible interface pointers because of a user action. For more information, see Receiving Errors for IAccessible Interface Pointers.


**  Windows NT/2000/XP/Server 2003:** Included in Windows 2000 and later.
**  Windows 95/98/Me:** Included in Windows 98 and later.
**  Redistributable:** Requires Active Accessibility 1.3 RDK on Windows NT 4.0 SP6 and Windows 95.
**  Header:** Declared in Oleacc.h.
**  Library:** Use Oleacc.lib.

See Also

IAccessible, AccessibleObjectFromEvent, AccessibleObjectFromWindow, VARIANT Structure, Active Accessibility and Windows Vista Screen Scaling