Version: 1.0

Posted: 2005-05-05

Build Requirements: Mac OS X 10.3.8, XCode 1.1

Runtime Requirements: Mac OS X 10.3.8 or greater

View Source Code:

Download Sample (“ProfileSystem.zip”, 14.0K)
Download Sample (“ProfileSystem.dmg”, 71.9K)



Description

ProfileSystem demonstrates the use of the system_profiler shell command and how it can be called by a Core Foundation application to retrieve the same information that is displayed in the System Profiler utility. The sample uses the UNIX popen call to open a stream and read the results of the system_profiler command. The resultant data is then read into a buffer and converted to a CFArray using the CFPropertyListCreateFromXMLData call. For this sample, the CFArray is then parsed for specific information about PCI and USB devices.

Document Revision History

Date Notes
2005-05-05Shows how to obtain the same information that System Profiler displays.

Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.