My code for finding the volume number of the T5's external card is running and works great on the simulators, but I'm having trouble on a physical T5. When I pass a cardIndex of zero, everything's fine, but when cardIndex is 1, then expErrCardNotPresent is being returned (when on the physical T5). I'm guessing that the volume numbers on the simulator are some default value and are different on my physical card? I could use much guidance.


   Err cfVolNum(
        UInt16& volNum,    // returned
        UInt8 cardIndex)      // 0 for first card, 1 for second, etc.
   {
        Err err;
        UInt32 volIterator = vfsIteratorStart;
        while (volIterator != vfsIteratorStop) {
             err = VFSVolumeEnumerate(&volNum, &volIterator);
             if (err == errNone) {
                  // found a volume -- return if it's the one we want
                  if (cardIndex == 0)
                       return errNone;
                  else
                       cardIndex--;
             }
        }
        return expErrCardNotPresent;
   }


--
For information on using the Palm Developer Forums, or to unsubscribe, please 
see http://www.palmos.com/dev/support/forums/

Reply via email to