MSAA UI Automation get_accChildCount Incorrectly Returning 0 for Infragistics UltraTree in Winforms
While working on automating an Infragistics UltraTree control in a C# Winforms application I found that the UltraTree implemented the AccessibleObject model (MSAA). I was able to successfully grab the IAccessible interface by putting the hwnd grabbed from spy++ into IAccessible* accessibleObject; AccessibleObjectFromWindow(hwnd, OBJID_CLIENT, IID_IAccessible, (void**)&accessibleObj); The problem is that when I now call long childCount; accessibleObj->get_accChildCount(&childCount); The result that I get back is zero. From looking at the UltraTree source code I noticed that its implementation