What is the pszFileName? palms expect Unix style paths. I use this type of function to set up the global volRefNum which is used throughout my system to access files on an sdcard. It looks for a known file at /TopPath/IAmHere.DAT

Hope this helps.

bool filebase::FindVolRefNum() // look for known file
{
UInt32 volIterator = vfsIteratorStart;
FileRef _FileRef;
Err err;
if (volRefNum!=-1) return true; // was already found
while(volIterator != vfsIteratorStop)
{
 err = VFSVolumeEnumerate(&volRefNum,&volIterator);
 if (err==errNone)
 {
  // Found a volume
err = VFSFileOpen(volRefNum,"/TOPPATH/IAMHERE.DAT",vfsModeRead,&_FileRef);
  if (err==errNone) // found go.prm
  {
   VFSFileClose(_FileRef);
   return true;
  }
  else
  {  // couldn't open file continue on
  }

 }
 else // couldn't open volume continue on
 {
 }
}
// we are done. Couldn't find compulife on system.
volRefNum = -1; // make sure
return false;
}

Chris Bruner
Compulife Software Inc.
==============================================
----- Original Message ----- From: <[EMAIL PROTECTED]>
To: "Palm Developer Forum" <[email protected]>
Sent: Monday, October 17, 2005 5:16 AM
Subject: VFSFileOpen crash


hi all,

I am trying to open a file which is not present. The function which I am using is

UInt16 volRefNum = 1;
FileRef fileRefP;

VFSFileOpen(volRefNum,pszFileName,vfsModeRead, &fileRefP);

Here it should return some error(as my file does not exist) but it crashes giving message "VFSMgr.cpp(164): Got a partial path in PrvMakeIOSPath"

can anybody please tell me what is the problem?

thanks in advance.

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




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

Reply via email to