下你所需,载你所想!
汇集开发技术源码资料

易语言读取64位进程超级列表框内容

:49.201KB :1 :2021-12-13 17:28:34

部分简介

hListView = 264338 ' SysListView32组件句柄
GetWindowThreadProcessId (hListView, dwProcessId)
hProcess = OpenProcess (#PROCESS_ALL_ACCESS, 0, dwProcessId)
.如果真 (hProcess ≠ #INVALID_HANDLE_VALUE)
dwCount = SendMessageW (hListView, #LVM_GETITEMCOUNT, #NULL, #NULL) ' 取表项数
pszMem = VirtualAllocEx (hProcess, #NULL, 4096, 位或 (#MEM_RESERVE, #MEM_COMMIT), #PAGE_READWRITE)
dwSize = 88 ' sizeof(LVITEMW)
lvItem = LocalAlloc (#LMEM_ZEROINIT, dwSize)
__set (lvItem, 0, 1) ' mask => LVIF_TEXT
__set (lvItem, 8, 0) ' iSubItem
__set (lvItem, 24, pszMem + dwSize) ' pszText
__set (lvItem, 32, #MAX_PATH) ' cchTextMax
pszText = LocalAlloc (#LMEM_ZEROINIT, #MAX_PATH × 2)
.变量循环首 (0, dwCount - 1, 1, i)
__set (lvItem, 4, i) ' iItem
WriteProcessMemory_整数型 (hProcess, pszMem, lvItem, dwSize, 取指针整数_ (uBytesLen))
SendMessageW (hListView, #LVM_GETITEMW, #NULL, pszMem)
memset (pszText, 0, #MAX_PATH × 2)
ReadProcessMemory_整数型1 (hProcess, pszMem + dwSize, pszText, #MAX_PATH × 2, 取指针整数_ (uBytesLen))
输出调试文本 (编码_Unicode到Ansi (指针_到字节集W (pszText)))
.变量循环尾 ()
LocalFree (pszText)
LocalFree (lvItem)
VirtualFreeEx (hProcess, pszMem, 0, #MEM_RELEASE)
CloseHandle (hProcess)
易语言读取64位进程超级列表框内容例子源代码。

易语言读取64位进程超级列表框内容

热门推荐

相关文章