At 06:02 PM 1/9/2003 -0600, you wrote:
Well yes, there is a good reason I have for not spawning any additional files on the VFS card, but I'm afraid I can't disclose that information. Using a prefs file on the SD card sure would make this problem a lot easier!At 15:58 2003-1-9 -0800, you wrote:I have a utility that auto-runs from an unlocked SD card as "/Palm/start.prc". This utility is never run on the same device twice, so I cannot rely on storing application-specific prefs on the device itself. Any such persistent values must be embedded into "/Palm/start.prc"Jeff, is there a reason you can't just store your own prefs file in /Palm/Programs/MySecretProgram/prefs.dat or some file like that. I think that's a lot safer and simpler than trying to write back to a PRC file on the VFS volume.
I need this application to present a user-modifiable preference, and to persist this information between invocations. This means I have to read/write the preference from the "/Palm/start.prc" file on the SD card, and NOT from the in-memory temporary copy of the application.
I've also considered an approach #3:
3) Create a string resource in the PRC to store the preference value. Use VFSFileDBGetResource() to read the value. Then use VFSFileTell() to discover its offset, and VFSFileWrite to set the value.
Unfortunately, in this approach, I keep getting vfsErrBadData when I try to call VFSFileDBGetResource() on my successfully-opened file. I love cryptic VFS error codes!
Thanks,
-Jeff
--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
