It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming Visual Basic Forum

read an address from memory with visual basic 2008 express

Moderator: dafunkymunky

read an address from memory with visual basic 2008 express

Postby crazed8s on Mon Jan 18, 2010 1:05 am

Ok, I'm going to explain the whole project.
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
crazed8s
 
Posts: 1
Joined: Mon Jan 18, 2010 1:00 am

Who is online

Users browsing this forum: No registered users and 2 guests