How to Retrieve Text Under the Mouse Cursor Using AA

Raymond Chen has a post with sample code on How to Retrieve Text under the cursor (mouse pointer) using MSAA. The code sample include how to call AccessibleObjectFromPoint, IAccessible::get_accName, and IAccessible::get_accValue.