Solved How do I distinguish 2 equal named processes?

Hexui Undetected CSGO Cheats Sinkicheat PUBG Cheat

Liduen

Hacker
Dank Tier VIP
May 19, 2013
702
8,478
33
Hi guys,

I need a little help here. I have written a trainer for a game but now I have a problem. How do I force the trainer to only write or read memory from the first opened process of the game?
Everytime I open a new process of my game the trainer switches reading/writing from/to the new process.
How can I force the trainer to use only the first process opened?


Liduen
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
12,638
76
As Szaka stated, with Process ID (PID)
 

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
Hi guys,

I need a little help here. I have written a trainer for a game but now I have a problem. How do I force the trainer to only write or read memory from the first opened process of the game?
Everytime I open a new process of my game the trainer switches reading/writing from/to the new process.
How can I force the trainer to use only the first process opened?


Liduen
Maybe you could just do Process.GetProcessByName("X.exe")[0] (in C#)..

Not quite sure if that will work though..
 

Szaka

Coder
Full Member
Nobleman
Mar 14, 2013
161
718
3
So it means that trainer doesnt know which window should he work with, so user has to make the choice, best is with PID i guess
 

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
As Szaka stated, with Process ID (PID)
I think you mean me, I said that.. But I deleted my post because I just opened 2 calculators and the 2nd one is smaller then the first one and they're somehow just random..
 

c5

Kim Kong Trasher
Dank Tier VIP
Dank Tier Donator
Jul 19, 2012
1,187
12,638
76
they're somehow just random..
They are random, it's just they are unique in a sense that no running process has the same id has another. And no I didn't mean you because I didn't see you mentioning it anywhere..
 

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
And no I didn't mean you because I didn't see you mentioning it anywhere..
As I said, I posted it but then checked whether it was like I said and it wasn't. And I didn't want to give him a wrong suggestion, therefor I deleted it.
 

Liduen

Hacker
Dank Tier VIP
May 19, 2013
702
8,478
33
//How do I check the processID or how do I close the unwanted process if found?

Edit: Thanks for the help I will try this now.

Edit2: Still cant get it working. How did you guys do it?
 
Last edited:

till0sch

Respected Hacker
Dank Tier VIP
Dank Tier Donator
Oct 14, 2012
1,104
12,593
51
//How do I check the processID or how do I close the unwanted process if found?

Edit: Thanks for the help I will try this now.

Edit2: Still cant get it working. How did you guys do it?
Coding C#?
 

Liduen

Hacker
Dank Tier VIP
May 19, 2013
702
8,478
33
Yep.
My brother just helped me out a little bit xD
The problem is solved:

C++:
int ProcessCount = 0;
Process[] procList = Process.GetProcesses();
foreach (Process p in procList)
{
    if (p.ProcessName.ToString() == "abc123") ProcessCount += 1;
    if (ProcessCount == 2)
    {
        p.Kill();
        ProcessCount -= 1;
    }
}
 
Attention! Before you post:

Read the How to Ask Questions Guide
99% of questions are answered in the Beginner's Guide, do it before asking a question.

No Hack Requests. Post in the correct section.  Search the forum first. Read the rules.

How to make a good post:

  • Fill out the form correctly
  • Tell us the game name & coding language
  • Post everything we need to know to help you
  • Ask specific questions, be descriptive
  • Post errors, line numbers & screenshots
  • Post code snippets using code tags
  • If it's a large project, zip it up and attach it

If you do not comply, your post may be deleted.  We want to help, please make a good post and we will do our best to help you.

Thread starter Similar threads Forum Replies Date
KISKE Solved Distinguish enemies from local player doesn't work. Cheat Engine & Pointers 1

Similar threads

Community Mods