台灣最大程式設計社群網站
線上人數
1060
 
會員總數:241752
討論主題:187055
歡迎您免費加入會員
討論區列表 >> VB.NET >> readprocessmemory 回傳值為 0
[ 變換順序 ]  
[我要回覆]
1
回應主題 加入我的關注話題 檢舉此篇討論 將提問者加入個人黑名單
readprocessmemory 回傳值為 0
價值 : 200 QP  點閱數:95 回應數:1

樓主

mars
門外漢
0 1
10 0
發送站內信

想請教各位高手為何傳回值都為0?試了好久


<DllImport("kernel32.dll")>
Public Shared Function OpenProcess(dwDesiredAccess As Integer, bInheritHandle As Boolean, dwProcessId As Integer) As IntPtr
End Function

<DllImport("kernel32.dll", SetLastError:=True)>
Public Shared Function ReadProcessMemory(ByVal hProcess As IntPtr,
ByVal lpBaseAddress As IntPtr,
<Out()> ByVal lpBuffer() As Byte,
ByVal dwSize As Integer,
ByRef lpBytesRead As Integer) As Boolean
End Function



Dim myProcesses As Process = Process.GetProcessesByName("BlueStacks")(0)
Dim processHandle As IntPtr = OpenProcess(PROCESS_WM_READ, False, myProcesses.Id)
'MsgBox(processHandle)
Dim result As Integer
Dim bytesRead As Integer = 0
Dim buffer(4) As Byte
Dim rvalue As Integer
Dim bool As Boolean
bool = ReadProcessMemory((processHandle), &H8CCFEAF0, buffer, 4, rvalue)

MsgBox(BitConverter.ToInt32(buffer, 0))
MsgBox(BitConverter.ToSingle(buffer, 0))
MsgBox(BitConverter.ToInt16(buffer, 0))

搜尋相關Tags的文章: [ readprocessmemory ] ,
本篇文章發表於2018-01-13 12:25
別忘捐VP感謝幫助你的人 新手會員瞧一瞧
1樓
回應

香帥
檢舉此回應
請參考
http://www.blueshop.com.tw/board/FUM200501271723350KG/BRD201208311540473EO.html
本篇文章回覆於2018-01-13 21:28
== 簽名檔 ==
--未登入的會員無法查看對方簽名檔--
[ 變換順序 ]   
1

回覆
如要回應,請先登入.