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
Re: Content of Listview of External Application
Why are you going the GUID route, any specific reason for this? :confused:
I'd recommend using the EnumChildWindows and FindWindowEx APIs here.
Re: Content of Listview of External Application
Quote:
Originally Posted by
HanneSThEGreaT
Why are you going the GUID route, any specific reason for this? :confused:
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.
Re: Content of Listview of External Application
Isn't there any solution???:(:(:(:(:(:(:(