| July 2, 2008 9:00 PM PDT | |
Designing and developing good software requires an understanding of the hardware platform the software is running on. This Platform Discovery Code sample is a starting point to help application developers gather information about the platform on which the software is running. It lets you adapt the behavior of the application appropriately; for example, that new virus checker you're writing may choose to not perform a check when the batter is low! Included is code to check CPU information (number of physical and logical processors, CPU frequency and utilization), network connections as well as battery information (whether the battery is being charged, current battery state and dissipation rate).
This code sample provides a set of C++ classes to implement the platform discovery features. In addition to the core C++ classes, a set of COM objects are also made available that encapsulate this functionality and which can in turn be called from other languages supported by .Net. A sample HTML page embeds these COM objects, showing the results of running the platform discovery code. The download is made available as an MSI file. This installs the source code, as well as lib and demo application.
The sample code includes the capability to discover the platform features below.
CPU information:
• Number of Physical Processors
• Number of Logical Processors
• CPU Frequency
• CPU Utilization
Battery information:
• Full charge value
• Battery power state
• Battery dissipation rate
Network:
• Connection State
Physical Disk:
• Percent Disk Time
Please download the sample code package and try to create your own software applications.
Reference
For more complete information about compiler optimizations, see our Optimization Notice.
Comments (4) 
| December 13, 2009 6:31 AM PST
Connie DiNicolo-Kosmo |
Hi I am not so sure if I need any of these downloads as I use my laptop pretty much to read emails,check websites, listen to music while working & have not added photos yet, etc....... At this time I am not interested in developing my own web pages & as embarassing as this is, what is a URL(please define) Lastly if I do need to download I can download a simple Google reminder for battery power etc...... Thank you Connie |
| January 18, 2010 6:59 AM PST
Ayebaye | Thanks for the package. My first time using it but I hope to enjoy every bit of it. Thank you so much. |
| September 23, 2010 3:00 PM PDT
israel | code for classmate.intel |


snwhuang86
5
because most plateform at Web behavior are the simi-like just like your program can detect CPU/MEM/Disk lots hotware. then we can use remote methodlogy to have test for factory doing thetest and realtime collect the log and Data.
Sorry I'm not the Testing or programming engineer, only have the different thinking with the test, my base is indutrial Eng. and leading a test/diagnostic team. who try to have different way doing Server test.
Nelson Huang