Hi there,

about a week ago Werner Poschenrieder described a problem he has using
PrefSet/GetAppPreferences. I now have evidently the same:

typedef struct prefs
{
        Int16 connectionspeed;
        Int16 interface;
        Int16 keepalive;
};

        prefs.interface = 1;
        prefs.connectionspeed = 2;
        prefs.keepalive = 3;
        prefsize = sizeof(prefs);
        PrefSetAppPreferences('PCRR', 0, 0x0014, &prefs, &prefsize, true);

Calling PrefGetAppPreferences() and the program hasn't been restarted
since saving, everything's fine.
After exiting and reentering my app, PrefGetAppPreferences('PCRR', 0,
&prefs, &prefsize, true) fills prefsize with 6 and so it looks good. But
it only retreives the first two variables (so four bytes), not the third.


BTW, defining prefs like this:
typedef struct prefs
{
        Char connectionspeed;
        Char interface;
        Int16 keepalive;
};

doesn't work at all. Alle values are 0 when reading.

It didn't look that hard when I read the reference, so where's the error?

Regards,
Christian


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

Reply via email to