Hello... I tried one of the HighJump codes in Cheat Engine 5.4: Address 008D6080, Type 4 Bytes, Value 3237909464 originally 3247909464 with highjump... But when i tried to make my trainer it got f*cked
Here is my code snippet:
Public Class Form1
Private Const PROCESS_ALL_ACCESS As Long = &H1F0FFF
Private Declare Function GetWindowThreadProcessId Lib "user32" (ByVal hwnd As Long, ByVal lpdwProcessId As Long) As Long
Private Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Long, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Long, ByVal lpNumberOfBytesWritten As Long) As Long
Public Declare Function CloseHandle Lib "kernel32" (ByVal hObject As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal Classname As String, ByVal WindowName As String) As Long
Private Declare Function ReadProcessMem Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Long, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Long, ByVal lpNumberOfBytesWritten As Long) As Long
Public ProcessHandle As Long
Public Sub WriteByte(ByVal Address As Long, ByVal Value As Integer)
Dim hwnd As Long, pid As Long, phandle As Long
'2: 9090, write in reverse
hwnd = FindWindow(vbNullString, "World of Warcraft")
If (hwnd <> 0) Then
GetWindowThreadProcessId(hwnd, pid)
phandle = OpenProcess(PROCESS_ALL_ACCESS, False, pid)
If (phandle <> 0) Then
WriteProcessMemory(phandle, Address, Value, 1, 0&)
End If
CloseHandle(phandle)
End If
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
WriteByte("&H8D6080", "3247909464")
TextBox1.Text = "Injection??."
WriteByte(&H8D6080, &H8
TextBox1.Text = "Injection Complete."
End Sub
End Class
But i get an error "Arithmetic operation resulted in an overflow."
How to prevent this?