NOTE
The CommonPoint application system on a UNIX host recognizes all mounted volumes. Using TVolumesIterator in a UNIX environment returns a correct TVolume for each mounted volume.
Example::DisplayVolumes defines a member function that displays the name of each mounted volume. The code uses two functions, PrintText and PrintName, which do not appear in this sample.
TVolume Example::DisplayVolumes () const
{
PrintText("Displaying all volume names...\n\n");
// Create an iterator
TVolumesIterator volumeIterator;
// Create a volume instance equal to the first volume that the iterator
// encounters, and remember that name.
TVolume aVolume = volumesIterator.First;
// keep iterating as long as there are volumes left to iterate through
while (aVolume != TVolumesIterator::kEndOfIteration)
{
PrintName(aVolume.GetName());
aVolume = volumesIterator.Next();
}
}