| View previous topic :: View next topic |
| Author |
Message |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Sun Dec 21, 2008 9:32 pm Post subject: [C] Quick question |
|
|
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
_________________
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 |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sun Dec 21, 2008 10:07 pm Post subject: |
|
|
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 |
|
 |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Sun Dec 21, 2008 10:10 pm Post subject: |
|
|
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
_________________
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 |
|
 |
hcavolsdsadgadsg I'm a spammer
Reputation: 26
Joined: 11 Jun 2007 Posts: 5801
|
Posted: Sun Dec 21, 2008 10:16 pm Post subject: |
|
|
| 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 |
|
 |
Overload Master Cheater
Reputation: 0
Joined: 08 Feb 2008 Posts: 293
|
Posted: Sun Dec 21, 2008 10:38 pm Post subject: |
|
|
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 |
|
 |
nog_lorp Grandmaster Cheater
Reputation: 0
Joined: 26 Feb 2006 Posts: 743
|
Posted: Sun Dec 21, 2008 10:55 pm Post subject: |
|
|
%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 |
|
 |
|