Hello, All!

Here's an example for VFSVolumeMount function in Palm OS Reference:

***

VFSSlotMountParamType slotParamP;
UInt32 slotIterator = expIteratorStart;
slotParamP.vfsMountParamP.mountClass = VFSMountClass_SlotDriver;
err = ExpSlotEnumerate(&slotParamP.slotRefNum, &slotIterator);
err = ExpSlotLibFind(slotParamP.slotRefNum, slotParamP.slotLibRefNum);
err = VFSVolumeMount(NULL, NULL, (VFSAnyMountParamPtr)&slotParamP);

***

Seems to contain mistakes:
1.   VFSSlotMountParamType slotParamP;
Why do they call the variable "slotParamP", not a "slotParam" - it is not a
pointer.
2. slotParamP.vfsMountParamP.mountClass = VFSMountClass_SlotDriver;
Seems that it must be slotParamP.vfsMountParam.mountClass = ...
3.  ExpSlotLibFind(slotParamP.slotRefNum, slotParamP.slotLibRefNum);
Should be ExpSlotLibFind(slotParamP.slotRefNum, &(slotParamP.slotLibRefNum))
4.  (VFSAnyMountParamPtr)&slotParamP
Why do they need such an odd conversion?

SO, can anyone help me with a correct VFSVolumeMount  example???

I managed to correct this example, but the program immediately exits after I
call VFSVolumeMount!
But, if I do not call VFSVolumeMount  and pass "1" to VFSFileOpen instead of
volRefNum, it works!

Please help!
Eugene.


-- 
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