主题:【求助】关于读取内存数据问题
程序1可用:
API:
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Function rMem(vAdd As Long, L As Integer) As Long
Dim ret As Long
Call ReadProcessMemory(hProcess, vAdd, ret, L, 0&)
rMem = ret
End Function
窗口:
text1 = rMem(&H5CCDABC, 3)
上面能把地址5CCDABC的数显示在文本框里
*******************
程序2不可用:
API:
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
窗口:
dim a as long
Call ReadProcessMemory(hProcess, &H5CCDABC, a, 8, 0&)
Text1.Text = Val("a")
这个则显示为0
为什么,该如何解决?
API:
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
Function rMem(vAdd As Long, L As Integer) As Long
Dim ret As Long
Call ReadProcessMemory(hProcess, vAdd, ret, L, 0&)
rMem = ret
End Function
窗口:
text1 = rMem(&H5CCDABC, 3)
上面能把地址5CCDABC的数显示在文本框里
*******************
程序2不可用:
API:
Private Declare Function ReadProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Any, lpBuffer As Any, ByVal nSize As Long, lpNumberOfBytesWritten As Long) As Long
窗口:
dim a as long
Call ReadProcessMemory(hProcess, &H5CCDABC, a, 8, 0&)
Text1.Text = Val("a")
这个则显示为0
为什么,该如何解决?