Checking for multiple processors

I

ibn4n

Its been a long time since I've done any c++ programming; however, I've
run into a situation at work where it would be very useful to be able
to write a small piece of custom code. I can do most of it, but one
very important part is checking to see if the server the code is
running on has multiple processors (it will be running under Windows
NT). Does anyone know how to have the program check the number of
processors without relying on setup.log (which is the source of our
whole problem)?
 
V

Victor Bazarov

Its been a long time since I've done any c++ programming; however, I've
run into a situation at work where it would be very useful to be able
to write a small piece of custom code. I can do most of it, but one
very important part is checking to see if the server the code is
running on has multiple processors (it will be running under Windows
NT). Does anyone know how to have the program check the number of
processors without relying on setup.log (which is the source of our
whole problem)?

Check the 'NUMBER_OF_PROCESSORS' environment variable.

But the question (and my answer) is off-topic, unfortunately. C++ has
no means to show this information, you have to use some kind of method
specific to the OS, so ask in comp.os.ms-windows.programmer.win32.

V
 
P

puzzlecracker

Its been a long time since I've done any c++ programming; however, I've
run into a situation at work where it would be very useful to be able
to write a small piece of custom code. I can do most of it, but one
very important part is checking to see if the server the code is
running on has multiple processors (it will be running under Windows
NT). Does anyone know how to have the program check the number of
processors without relying on setup.log (which is the source of our
whole problem)?

Have you ever thought of looking inside the case - always works!
But seriously, it is the pertinent group for this question (system
programming), so the qualifications you expect here shouldn't be given
any weight to.

Good Luck!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,022
Latest member
MaybelleMa

Latest Threads

Top