|
-
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.
-
July 7th, 2011, 07:40 AM
#2
Re: Content of Listview of External Application
Why are you going the GUID route, any specific reason for this? 
I'd recommend using the EnumChildWindows and FindWindowEx APIs here.
-
July 7th, 2011, 08:08 AM
#3
Re: Content of Listview of External Application
 Originally Posted by HanneSThEGreaT
Why are you going the GUID route, any specific reason for this?
I'd recommend using the EnumChildWindows and FindWindowEx APIs here.
I got the Handle of the Listview with the same API.
But what next to get all the items of that listview.
Already tried with the sendmessage and Virtual Memory allocation in the external process techniques but resulted into blank string.
So i tried this.
Please suggest me if i am wrong or any other suitable method.
Thanks for any kind of help.
-
July 13th, 2011, 12:18 AM
#4
Re: Content of Listview of External Application
Isn't there any solution???     
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
|