First of all , make a module , call it what ever
then replace all the codes in it with this one :
Code:
Imports System.Runtime.InteropServices
Module WritePointers
Private Declare Function GetAsyncKeyState Lib "User32" (ByVal Tuş As Integer) As Integer
<DllImport("kernel32", EntryPoint:="ReadProcessMemory", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Function ReadMemoryByte(ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Byte, Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Byte
End Function
<DllImport("kernel32", EntryPoint:="ReadProcessMemory", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Function ReadMemoryDouble(ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Double, Optional ByVal Size As Integer = 8, Optional ByRef Bytes As Integer = 0) As Double
End Function
<DllImport("kernel32", EntryPoint:="ReadProcessMemory", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Function ReadMemoryFloat(ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Single, Optional ByVal Size As Integer = 4, Optional ByRef Bytes As Integer = 0) As Single
End Function
<DllImport("kernel32", EntryPoint:="ReadProcessMemory", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Function ReadMemoryInteger(ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Integer, Optional ByVal Size As Integer = 4, Optional ByRef Bytes As Integer = 0) As Integer
End Function
<DllImport("kernel32", EntryPoint:="WriteProcessMemory", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Function WriteMemoryByte(ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Byte, Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Byte
End Function
<DllImport("kernel32", EntryPoint:="WriteProcessMemory", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Function WriteMemoryDouble(ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Double, Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Double
End Function
<DllImport("kernel32", EntryPoint:="WriteProcessMemory", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Function WriteMemoryFloat(ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Single, Optional ByVal Size As Integer = 2, Optional ByRef Bytes As Integer = 0) As Single
End Function
<DllImport("kernel32", EntryPoint:="WriteProcessMemory", CharSet:=CharSet.Ansi, SetLastError:=True, ExactSpelling:=True)> _
Private Function WriteMemoryInteger(ByVal Handle As Integer, ByVal Address As Integer, ByRef Value As Integer, Optional ByVal Size As Integer = 4, Optional ByRef Bytes As Integer = 0) As Integer
End Function
Public Sub WritePointerInteger(ByVal EXENAME As String, ByVal Pointer As Integer, ByVal Value As Integer, ByVal ParamArray Offset As Integer())
If (Process.GetProcessesByName(EXENAME).Length <> 0) Then
Dim handle As Integer = CInt(Process.GetProcessesByName(EXENAME)(0).Handle)
If (handle <> 0) Then
Dim num3 As Integer
Dim num2 As Integer
For Each num2 In Offset
num3 = 0
ReadMemoryInteger(handle, Pointer, Pointer, 4, num3)
Pointer = (Pointer + num2)
Next
num3 = 0
WriteMemoryInteger(handle, Pointer, Value, 4, num3)
End If
End If
End Sub
End Module
How to use :
Code:
WritePointerInteger("YourGame",&H028A59FC,'value',&H40,&H24)
Note , That these codes are ripped off my old hacks, so the you might some useless codes in it as well...