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] Quick question

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

Joined: 08 Feb 2008
Posts: 293

PostPosted: Sun Dec 21, 2008 9:32 pm    Post subject: [C] Quick question Reply with quote

When I'm iterating through processes to see if a specified process is active, what is the most efficient way? I've seen I think two methods so far. One uses a do{...}while( Process32Next()) and the other one uses Process32First and Process32Next. Which one is better and why?

And if you have a different method please post it here, I'd love another way to do this Smile

_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Dec 21, 2008 10:07 pm    Post subject: Reply with quote

in reality, I think you would be hard pressed to find any enormous differences.

if you are really that curious, just look at the disassembly.
Back to top
View user's profile Send private message
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Sun Dec 21, 2008 10:10 pm    Post subject: Reply with quote

Really? I thought there might be some other methods that would make a difference. Anyways, sorry. I know quite a bit about computers, just not very good at putting my knowledge into a compiler and code Razz
_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
hcavolsdsadgadsg
I'm a spammer
Reputation: 26

Joined: 11 Jun 2007
Posts: 5801

PostPosted: Sun Dec 21, 2008 10:16 pm    Post subject: Reply with quote

You can also use FindWindow, or EnumProcesses, though I would generally avoid FindWindow for the sake of checking if something is running
Back to top
View user's profile Send private message
Overload
Master Cheater
Reputation: 0

Joined: 08 Feb 2008
Posts: 293

PostPosted: Sun Dec 21, 2008 10:38 pm    Post subject: Reply with quote

Yeah I wasn't planning on using FindWindow. Anyways, I've got it working so thanks a lot. But for the sake of not making another thread...

what is the scanf/printf identifier for a DWORD and UINT?

_________________
Blog

Quote:
Rhys says:
you can be my maid
Rhys says:
ill buy you a french maid outfit
Tyler says:
Sounds good
Rhys says:
ill hold you to that
Back to top
View user's profile Send private message MSN Messenger
nog_lorp
Grandmaster Cheater
Reputation: 0

Joined: 26 Feb 2006
Posts: 743

PostPosted: Sun Dec 21, 2008 10:55 pm    Post subject: Reply with quote

%u is uint.
_________________
Mutilated lips give a kiss on the wrist of the worm-like tips of tentacles expanding in my mind
I'm fine accepting only fresh brine you can get another drop of this yeah you wish
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