WriteProcessMemory参数中myItem(i)里面有值吗?

tel88821675 2020-07-29 07:22:56
Private Type LV_ITEMA // LV_ITEMA结构体
(略)
End Type
Private Function GetListViewTextArray(ByVal hWindow As Long, ByVal ProcessID As Long) As String()
Dim (略)
Dim myItem() As LV_ITEMA //定义一个体实例化
pHandle = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE, False, ProcessID)
ReDim myItem(hCount) //实例化,在内存中分配空间 。hCount是行数
For j = 0 To SendMessage(hWindow, LVM_GETITEMCOUNT, 0, 0) - 1
For i = 0 To hCount
pStrBufferMemory = VirtualAllocEx(pHandle, 0, MAX_LVMSTRING, MEM_COMMIT, PAGE_READWRITE)
myItem(i).mask = LVIF_TEXT
myItem(i).iSubItem = i
myItem(i).pszText = pStrBufferMemory
myItem(i).cchTextMax = MAX_LVMSTRING
pMyItemMemory = VirtualAllocEx(pHandle, 0, Len(myItem(i)), MEM_COMMIT, PAGE_READWRITE)
result = WriteProcessMemory(pHandle, pMyItemMemory, myItem(i), Len(myItem(i)), 0) //问题1:WriteProcessMemory功能是把myItem(i),写到pMyItemMemory内存地址去,那么,myItem(i)里面有“任务管理器的数据吗?”。如果有,是怎么传递到myItem(i)里面的?
(仅仅知道“任务管理器”的listview的线程句柄pHandle啊)
...全文
133 回复 打赏 收藏 举报
写回复
回复
切换为时间正序
请发表友善的回复…
发表回复
相关推荐
发帖
API
加入

1472

社区成员

VB API
社区管理员
  • API
申请成为版主
帖子事件
创建了帖子
2020-07-29 07:22
社区公告
暂无公告