Answer the question
In order to leave comments, you need to log in
How to get data from ListView which is in another program?
I try to do so
LVITEM lvi = new LVITEM();
lvi.mask = WinAPI.LVIF_TEXT;
lvi.cchTextMax = 512;
lvi.iItem = 1;
lvi.iSubItem = 0;
lvi.pszText = Marshal.AllocHGlobal(512);
IntPtr ptrLvi = Marshal.AllocHGlobal(Marshal.SizeOf(lvi));
Marshal.StructureToPtr(lvi, ptrLvi, false);
SendMessage(hListView, LVM_GETITEM, IntPtr.Zero, ptrLvi);
string itemText = Marshal.PtrToStringAuto(lvi.pszText);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question