Hi!
I'm trying to create an application that reads certain information about the hard disk on a Macintosh. Specifically, I'm interested in the model name, the hard disk serial number, and the total size (in bytes) of the drive. System Profiler gives me this information directly; I've run IORegistryExplorer and I can find some of the information, but not the exact same data that System Profiler provides. And I've barely scratched the surface using the IOKit - I can acquire the proper IOMedia object (I think), but I don't know how to get the information I'm looking for out of it (have executed IORegistryEntryCreateCFProperties on the IOMedia object which returns me a CFDictionary that contains 6 entries, none of whose values or keys is readable as text).
So does anyone have an example code of something that will
1) find the main (BSD Name: "disk0") hard drive
2) find its model name
3) find its capacity
4) find its serial number
C/C++ would be great.
Thanks!
karl
I'm trying to create an application that reads certain information about the hard disk on a Macintosh. Specifically, I'm interested in the model name, the hard disk serial number, and the total size (in bytes) of the drive. System Profiler gives me this information directly; I've run IORegistryExplorer and I can find some of the information, but not the exact same data that System Profiler provides. And I've barely scratched the surface using the IOKit - I can acquire the proper IOMedia object (I think), but I don't know how to get the information I'm looking for out of it (have executed IORegistryEntryCreateCFProperties on the IOMedia object which returns me a CFDictionary that contains 6 entries, none of whose values or keys is readable as text).
So does anyone have an example code of something that will
1) find the main (BSD Name: "disk0") hard drive
2) find its model name
3) find its capacity
4) find its serial number
C/C++ would be great.
Thanks!
karl