Hello,
I have successfully created a project that attached to a Process and reads/writes to its memory address.
Pointers isnt my concern as I have that covered.
My problem is that, I wanted to run 2 instances of the same Game but my Application only reads the "newer" instance of the game.
For example:
Lets say, My app name is Bot1. Game Name is Game1, Game2.
I started Bot1.
Started Game1.
Bot1 reads the information I needed from Game1.
Started Game2.
Now, Bot1 reads the information from Game2 instead of Game1.
So, my solution in my mind would be to read Game Memory using the Game's PID instead of ProcessName.
In this way I can control which Game Process my Bot1 will attach to. And of course, I can run another instance of Bot1 to read Game2's process.
Any help?
Solution?
For easier to understand, refer to the image below.
This bot is from battle of Immortals, see the "multi-client selection" option below? That is what I wanted to achieve.
Please help.
- - - Updated - - -
Update:
Here's the code in Button to get the process name & its corresponding Process ID.
Code:
Private Sub btnGetProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGetProcess.Click
lstProcess.Items.Clear()
Dim psList() As Process
Try
psList = Process.GetProcessesByName("Notepad")
For Each p As Process In psList
lstProcess.Items.Add("ID:" + p.Id.ToString() + " , " + p.ProcessName)
Next p
Catch ex As Exception
End Try
End Sub
Now, my problem is how to Attach my Application to the selected "Process".