Hi,
I am using IOKit for getting the list of all the physical drives in the system.
CFMutableDictionaryRef classesToMatch; kern_return_t kernResult = KERN_FAILURE;
classesToMatch = IOServiceMatching( kIOMediaClass ); if ( classesToMatch == NULL ) goto Bail; CFDictionarySetValue(classesToMatch, CFSTR(kIOMediaWholeKey), kCFBooleanTrue );
kernResult = IOServiceGetMatchingServices( kIOMasterPortDefault,classesToMatch, mediaIterator ); if ( KERN_SUCCESS != kernResult ) qDebug("IOServiceGetMatchingServices returned 0xx\n", kernResult);
Bail: return( kernResult );
and using FSGetVolumeInfo to get all the Volume. SO can you please tell me which Class to use in order to get the list of all the volumes or I have to use some other approach.
Thanks & Regards: vishal chauhan
On Apr 24, 2009, at 3:57 AM, Terry Lambert wrote: On Apr 23, 2009, at 4:28 AM, vishal chauhan wrote: Dear All,
I am making a program which can get the list of volume in the system. I can get volumes which are mounted on the system and their information such as (Volume Name. Block size, free block , total block, file system etc..).
But how can I get the volume information of unmounted volumes that is I want to get the list of all the volumes whether it is (mounted or unmounted).
Any help would be appreciable.
Typically you would open the IO Device Registry and ask it for the device information.
-- Terry
|