I need to be able to read an address from memory of a game that is currently being played and dispaly that number as a label on my visual basic form? heres what i have right now, i don't have an address just yet so i can't test it but would this code do what i need it to do?
- Code: Select all
Public Class LookMaNoHands
Public Declare Function WriteProcessMemory Lib "kernel32" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Long
Public Declare Function OpenProcess Lib "kernel32" (ByVal dwDesiredAccess As Long, ByVal bInheritHandle As Long, ByVal dwProcessId As Long) As Long
Public Declare Function ReadProcessMemory Lib "kernel32" Alias "ReadProcessMemory" (ByVal hProcess As Integer, ByVal lpBaseAddress As Integer, ByRef lpBuffer As Integer, ByVal nSize As Integer, ByRef lpNumberOfBytesWritten As Integer) As Long
Dim myProcesses As Process() = Process.GetProcessesByName("MapleStory")
Dim processHandle As IntPtr = OpenProcess(PROCESS_ALL_ACCESS, 0, myProcesses(0).Id)
Const PROCESS_ALL_ACCESS = &H1F0FFF
Private Sub LookMaNoHands_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim pointer As Long
ReadProcessMemory("Maplestory", &H12345, pointer, 4, 0)
End Sub
End Class


