How to use Cheat Engine Addresses in Visual Basic?

Posts 1–8 of 8 · Page 1 of 1
How to use Cheat Engine Addresses in Visual Basic?
Hello, I am new here and this is my first post.
I am not really good in Visual Basic.

My Problem is that I found the right addresses in Cheat Engine and if I change the value, the value also changes in the game. (So it works!)
But I want to make it better in Visual Basic.
So I searched for it and found a youtube tutorial.

"How to make a trainer/hacker in VB.net"

There I found a ReaderWriter.vb (that is required I think for the command : "WriteInteger").
Now with that command it is possible to change integer values.
My problem is that I dont have only a single process but more than one. I know the Process Hex Number but I cant use it for Visual Basic somehow.

Sorry for my English, I hope you get what I mean.

Thanks in advance and have a nice day.
Maybe find the right process. Some might be for protection, and the other for the game itself. Actually no, use the process that you used for CE.
I know the process already. But it have the same name. For example chrome.exe chrome.exe chrome.exe and I know the second chrome.exe is the right one.
How can I select that process?
Quote Originally Posted by OtakuGaming View Post
I know the process already. But it have the same name. For example chrome.exe chrome.exe chrome.exe and I know the second chrome.exe is the right one.
How can I select that process?
Well Chrome uses multiple processes for all tabs and plugins for some reason. I myself haven't yet found a way to do something that you want to do. I would suggest you to download a different webbrowser. Firefox works well.

Also, a quick question. Are you trying to hack a flash game?
You can use the Process class:
Process Class (System.Diagnostics)

With that you can use the 'GetProcessesByName' to obtain all the processes named Chrome.exe then filter them for the one you are looking for after that.
@OP Post your ReadWriter.vb class

I'm assuming the functions expect ("processName",0xaddress,newValue) or something similar. Since you're willing to check task manager to get the procId each time..just change the functions to expect a processID instead of a name. It probably uses OpenProcess() anyway which expects a processID not a string, so you'll probably just have to erase a couple lines : D Or, could even use the Process class. Post code : ) Use [ code ] [ /code ] tags around the code for formatting.
ie.
Code:
Dim xx as Integer
Dim ss as String
first you can use openprocess api to get process handle
next you can use readprocessmemory & writeprocessmemory to get address value & write value

i made a function about openprocess

Public Function OpenProcessBypName(ByVal pName As String) As IntPtr
Dim process As Process = process.GetProcessesByName(pName)(0)
If Not process.MainWindowHandle.Equals(IntPtr.Zero) Then
hProc = OpenProcess(&H1F0FFF, False, process.Id)
End If
OpenProcessBypName = hProc
End Function

how to use:
for example game process name is kingdom.exe
you just paste: Dim hProc as intptr = OpenProcessBypName("kingdom")
then you can get the process handle

Get address Value:

dim Value as integer = 0
ReadProcessMemory(hProc, &H12345678, Value, 4, False)
msgbox Value.Tostring

Write address value:
WriteProcessMemory(hProc,&H12345678, 123, 4, 0)
&h12345678 = address
123 = value

that just for no pointer address

if your address is pointer address
you must read address + offset

for example:
Write Pointer:
Dim Offset As IntPtr = 0
Dim Offset1 As IntPtr = 0
ReadProcessMemory(hProc, &HF7306C, Offset, 4, 0)
ReadProcessMemory(hProc, Offset + &H28, Offset1, 4, 0)
WriteProcessMemory(hProc, Offset1 + &H908, 0, 4, 0)

Read Pointer:
Dim Offset As IntPtr = 0
Dim Offset1 As IntPtr = 0
Dim Value As Integer = 0
ReadProcessMemory(hProc, &HF7306C, Offset, 4, 0)
ReadProcessMemory(hProc, Offset + &H28, Offset1, 4, 0)
ReadProcessMemory(hProc, Offset1 + &H908, Value, 4, 0)
Msgbox Value.Tostring
Posts 1–8 of 8 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?