I've been experimenting with my problem some more and am not understanding
why the simple piece of code doesn't work. I have two methods that save and
load my app prefs:
Int16 ccPreferences::LoadAppPrefs()
{
UInt16 size;
return PrefGetAppPreferences('MYAP', 0, &AppPrefs, &size, true );
}
void
ccPreferences::SaveAppPrefs()
{
UInt16 size = sizeof(csAppPrefs);
PrefSetAppPreferences('MYAP', 0, 0, &AppPrefs, size, true);
}
where the prefs are in the struct:
typedef struct {
UInt16 Version;
UInt16 Flags;
Char RegKey[13];
} csAppPrefs;
When I call "LoadAppPrefs" just as the app is quitting, everything looks
fine in the debugger ("AppPrefs" loads find and "size" is assigned a value
of 18). *But*, when I call "LoadAppPrefs" again as the app fires back up,
"size" is assigned a value of 2 and "AppPrefs" is mostly zeros. What I'm
doing is pretty much verbatim from most of the examples I've seen, so I'm
wondering where else I might be going wrong.
~Rich
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/