I have tried to format the memory card using VFS manager.
I load the expansion manager and vfs manager before formatting.
But it crashes in calling API VFSVolumeFormat. What's wrong?
The code I write is like this. Anything I have missed before formatting the
card?
VFSSlotMountParamType slotParamP;
UInt32 slotIterator = expIteratorStart;
UInt32 expMgrVersion = 0;
err = FtrGet(sysFileCExpansionMgr,expFtrIDVersion, &expMgrVersion);
if (err != errNone)
{ //error }
err = FtrSet(sysFileCVFSMgr,vfsFtrIDDefaultFS, expMgrVersion);
if (err != errNone)
{ //error }
while (slotIterator != expIteratorStop) {
err = ExpSlotEnumerate(&slotParamP.slotRefNum, &slotIterator);
if (err != errNone)
{ //error }
err = ExpSlotLibFind(slotParamP.slotRefNum, &(slotParamP.slotLibRefNum));
if (err != errNone)
{ //error }
err = VFSVolumeUnmount(gVolRefNum);
if (err != errNone)
{ //error }
err = VFSVolumeFormat(NULL, NULL, (VFSAnyMountParamPtr) & slotParamP);
if (err != errNone)
{ //error }
}
Thx for your great help!!!!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/