Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


C++ getting PID by name help

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
mdockz
Cheater
Reputation: 0

Joined: 24 Feb 2013
Posts: 41

PostPosted: Fri Dec 16, 2016 5:43 pm    Post subject: C++ getting PID by name help Reply with quote

I am not really sure how to start or word this.

I managed to find how to get the process ID by name, but i am having a new dilemma.

I need to get the process ID of an exe by the name of the exe, but if the exe is already open it needs to ignore those process ids.

For example.

If i have 6 "notepad.exe" open, i need my application to ignore the 6 already running and wait for a new one to open, then save that process id in a variable.

Can anyone help me with this?

Thanks.
Back to top
View user's profile Send private message
Zanzer
I post too much
Reputation: 126

Joined: 09 Jun 2013
Posts: 3278

PostPosted: Fri Dec 16, 2016 5:57 pm    Post subject: Reply with quote

On load, go through all processes and save the ID of each notepad.exe.
Then, on a timer, go through all processes again and again until you find a new ID.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites