I have a c# app that reads (with thanks to this forum) the values of a native windows app via the win32 API, I can get all the text from boxes of class Edit but there is some data presented in a SysListView32 control for w开发者_开发问答hich I can get the handle.
So given the handle how do I get the data within the list view?
thanks
VirtualAllocEx
WriteProcessMemory to initlize LVITEM
SendMessage(hwnd, LVM_GETITEM, WPARAM, LPARAM)
ReadProcessMemory
VirtualFreeEx
- Need to allocate/free additional buffers if text is included
- Does not work on Windows Mobile
- Does not work across platforms, you need to compile x86 and x64 targets for 32 and 64 bit processes) and marshal the APIs with the correct bitness.
- Does not work if blocked by UIPI.
- Have race condition with the target process
A far easier way would be to inject a DLL, which would then obviously be inside the aforementioned process.
精彩评论