Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Differentiate between notebook and desktop PC

Status
Not open for further replies.

ogren

Programmer
Aug 17, 2006
2
0
0
SE
I need to write a function (c or c++) that tells whether the computer is a notebook or a desktop PC. Do you know if there is a win32 function I can call or maybe a windows registry setting I can read. Any other method? Help is very much appreciated.
 
These are just guesses on what you could look at.

New laptop or old laptop? The newer ones tend to have the mobile chipset with speed step stuff. At a guess if you just scan the registry for something like that (whatever appears in the properties of My Computer), you can work out what it is.

Unfortunately, not all laptops use laptop chips. Some of the old ones use the normal chipset so you'll have problems there.

There might also be an entry for a battery somewhere.
 
Thanks.

GetSystemPowerStatus() win32 function can be used to see if there is a battery. It seems to work fine.
 
The only problem with checking for batteries is if you are running off mains like we're doing with our Dell laptops at the moment because the tech dept has taken out all the batteries in case they explode. I don't know if it still reports that there is a battery.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top