On Wed, Jun 13, 2001 at 08:53:47PM +0400, Evgeny Rokhlin wrote:
> Hello, All!
> 
> Hi All,
> I'm currently updating some program to make it use the VFS. The program uses
> a .pdb file and I'd like to let the user place  this file on the SD card. So
> I'm trying to register a default directory on the SD card with a piece of
> code like this:

1. You should go through the process of enumerating each slot - the
Handera 330 has more than one :).

2. I'm just guessing, but it might not like the trailing slash.  The
examples in the companion don't use it.

3. Also be sure to restore the default after you are done with it.

> ***
>  Err err;
>  Char pathStr[50];
>  UInt16 bufLenP;
> 
>  VFSSlotMountParamType slotParamP;
>  UInt32 slotIterator = expIteratorStart;
> 
>  bufLenP = 50;
> 
>  slotParamP.vfsMountParam.mountClass = VFSMountClass_SlotDriver;
>  err = ExpSlotEnumerate(&slotParamP.slotRefNum, &slotIterator);
>  err = ExpSlotLibFind(slotParamP.slotRefNum, &(slotParamP.slotLibRefNum));
>  err = VFSVolumeMount(NULL, NULL, (VFSAnyMountParamPtr)&slotParamP);
> 
>  VFSGetDefaultDirectory (slotParamP.vfsMountParam.volRefNum, ".pdb",
> pathStr, &bufLenP);
> 
>  err = VFSUnregisterDefaultDirectory(".pdb", expMediaType_Any);
>  err = VFSRegisterDefaultDirectory(".pdb", expMediaType_Any, "/MyDir/");
> ***
> 
> When executing,  'err' variable is NULL after every function call.
> But:
> 1. If I call VFSGetDefaultDirectory again, I do not get "/MyDir/", but an
> empty string.
> 2. After that, the DmOpenDatabaseByTypeCreator function still does not find
> the .pdb file in the /MyDir on the SD card.
> 
> What do I miss?
> 
> BTW, are there any docs somewhere on the net on using the VFS manager?
> 
> Thank you for your help.
> Evgeny.
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palmos.com/dev/tech/support/forums/

-- 


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

Reply via email to