我想請問會程式設計的高手大大
如果我讀取我人物的HP位子
為什麼值有17@@?
明明同一個位子在ME讀取出來是4千多
然而我把這個17改成0我ME上面的數字會-17
怎麼樣才能顯示完整的數值呢@@?
Public Sub est(ByRef Bass As Long)
Dim s() As Byte, n As Long, i As Long
lBassAddr = Bass 'Text2.Text
n = 1
ReDim s(n - 1)
hWndOfApp = FindWindow(vbNullString, Text1.Text)
If hWndOfApp = 0 Then
MsgBox "無法找到該視窗"
Exit Sub
End If
hThreadID = GetWindowThreadProcessId(hWndOfApp, hProcessID)
If hProcessID = 0 Then
MsgBox "無法取得ProcessID"
Exit Sub
End If
hProcess = OpenProcess(PROCESS_VM_OPERATION Or PROCESS_VM_READ Or PROCESS_VM_WRITE _
, 0, hProcessID)
If hProcess = 0 Then
MsgBox "無法開啟該Process"
Exit Sub
End If
ReadProcessMemory hProcess, ByVal lBassAddr, s(0), n, ByVal 0&
Label3 = "位址:" & (i + lBassAddr) & "= " & s(i)
CloseHandle hProcess
End Sub |