|
-
July 7th, 2011, 02:45 AM
#1
Content of Listview of External Application
Hi all,
I am trying to get the contents of the listview which is in external application (Not my application)
Type of the window is "WindowsForms10.SysListView32.app7". [As per SPY++]
I am making use of Active Accessibility with the Handle of the Listview window.
Following is the code
Code:
object obj = new object();
Guid guid = new Guid("{618736E0-3C3D-11CF-810C-00AA00389B71}");
if (hListView != 0)
{
AccessibleObjectFromWindow((IntPtr)hListView, (uint)OBJID.WINDOW, ref guid, ref obj);
//hListview is the handle to the Listview Window
IAccessible accessible = obj as IAccessible;
Object[] childs = new Object[accessible.accChildCount];
int obtained = 0;
AccessibleChildren(accessible, 0, accessible.accChildCount - 1, childs, out obtained);
// The problem is that inside the for loop every child element I am getting is null.
for (int i = 0; i < obtained; i++)
{
IAccessible child = childs[i] as IAccessible;
Object[] accchilds = new Object[child.accChildCount];
int result = 0;
AccessibleChildren(child, 0, child.accChildCount - 1, accchilds, out result);
for (int j = 0; j < result; j++)
{
IAccessible jchild = accchilds[j] as IAccessible;
}
}
}
Thanks for any kind of help.
Regards,
shail2k4
Last edited by shail2k4; July 7th, 2011 at 04:31 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|