Home > Software engineering >  WriteProcessMemory myItem parameters in (I) there is a value?
WriteProcessMemory myItem parameters in (I) there is a value?

Time:11-06

Private Type LV_ITEMA//LV_ITEMA structure
(abbreviated)
End Type
Private Function GetListViewTextArray (ByVal hWindow As Long, ByVal ProcessID) As Long As the String ()
Dim (abbreviated)
Dim myItem () As LV_ITEMA//define a individual instantiation
PHandle=OpenProcess (PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE, False, ProcessID)
ReDim myItem (hCount)//instantiate, allocate space in the memory, hCount is the number of rows
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). The mask=LVIF_TEXT
MyItem (I). The iSubItem=I
MyItem (I). The 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) //question 1: WriteProcessMemory functions is to put the myItem (I), writes pMyItemMemory memory address, so, myItem (I) there are "task manager data?" , and if so, what is passed to the myItem (I)?
(just know "task manager" handle to the thread of the listview pHandle)
  •  Tags:  
  • API
  • Related