I haven't actually tried this but, according to the documentation, something like this should work:
Boolean cardPresent; UInt16 slotRefNum; UInt32 slotIterator;
cardPresent = false; slotIterator = expIteratorStart; while (slotIterator != expIteratorStop) { if (ExpSlotEnumerate (&slotRefNum, &slotIterator) != errNone) break; if (ExpCardPresent (slotRefNum) == errNone) { cardPresent = true; break; } }
It's probably a bit of an overkill - you're unlikely to have more than one slot - but better safe than sorry.
Actually, multiple slots are very likely now. The TapWave Zodiac has two external SD slots and an internal VFS filesystem stored in RAM. The Tungsten T5 has one SD slot and two internal filesystems (the main one and a hidden one).
-- Ben Combee, Senior Software Engineer, palmOne, Inc. "Combee on Palm OS" weblog: http://palmos.combee.net/ Developer Forum Archives: http://news.palmos.com/read/all_forums/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
