Hi folks,
I have a user reporting that my app (Preference doctor) can't see the nvfs
on his E2.
All I'm doing is looking for the NVFS vol ref using the code from the Palm
companion. It works fine on my Lifedrive and treo, but I don't have an E2
to check.
Can anyone help?
Thanks,
Rob
//returns NULL if not found
UInt16 NVFSVolRefNum(void)
{
UInt32 volIterator;
UInt16 otherVolRefNum;
VolumeInfoType volInfo;
UInt16 volRefNum=NULL;
Err error;
//find NVFS volume
volIterator = vfsIteratorStart | vfsIncludePrivateVolumes;
while (volIterator != vfsIteratorStop)
{
if ((error = VFSVolumeEnumerate(&otherVolRefNum, &volIterator))
==errNone)
{
error = VFSVolumeInfo(otherVolRefNum, &volInfo);
if (error)
break;
if (volInfo.attributes & vfsVolumeAttrHidden)
{
// This is an internal file volume. Perform actions
now...
volRefNum=otherVolRefNum;
}
}
}
return volRefNum;
}
I call this here:
static Err RomVersionCompatible(UInt32 requiredVersion, UInt16 launchFlags)
{
/* See if we're on in minimum required version of the ROM or later. */
if (!NVFSVolRefNum())
{
if ((launchFlags & (sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp))
==
(sysAppLaunchFlagNewGlobals | sysAppLaunchFlagUIApp))
{
FrmCustomAlert (InfoAlert,"You don't have NVFS on this device - so you
don't need PrefDoctor\n\n(That's a good thing!)",NULL,NULL);
}
return sysErrRomIncompatible;
}
return errNone;
}
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/