Search code examples
vb.netcheat-engine

Read/WriteProcessMemory using CheatEngine Values with Pointer VB


I am using Cheat Engine to get addresses to edit something in the application. But it seems like I'm doing it wrong when putting the values in Visual Studio using Read/WriteProcessMemory and Visual Basic.

Image

Here is the values I got in Cheat Engine. Now how can I translate these information and use ReadProcessMemory to get the value?

Here is my code which isn't working and giving different value:

    Dim hp = OpenProcess(2035711, 0, ComboBox1.SelectedItem)
    Dim Pointer = 0
    ReadProcessMemory(hp, 22724000, Pointer, 4, 0)
    Dim Address As Integer = Pointer + Convert.ToInt32("784B2", 16)

    Dim value As Integer = 0
    ReadProcessMemory(hp, Address, value, 4, Nothing)
    MsgBox(value)

Solution

  • The code works perfectly but the address I want to change was wrong. That's why I thought the code is wrong. Anyways, thank you to all of you who helped me and suggested to use Hex.