Ok, here is what I have presently, I've tried variations. I get an error
when re-entering the program about trying to write directly to null. The big
NULL parameter is the obvious suspect, but the Palm Developer Reference says
to do this to get the size of the buffer. Any help is appreciated.
void RetrieveDynamicStructure() {
if (PrefGetAppPreferences(APP_TYPE, dynamicPrefsID, NULL, &PrefSize,
true))
DynamicStructure = MemHandleNew(PrefSize);
dynamicStructure = MemHandleLock(DynamicStructure);
PrefGetAppPreferences(APP_TYPE, dynamicPrefsID, dynamicStructure,
&PrefSize, true);
}
}
void SaveDynamicStructure() {
if (dynamicStructure) PrefSetAppPreferences(APP_TYPE, dynamicPrefsID, 0,
dynamicStructure,
MemHandleSize(DynamicStructure),
true)
else PrefSetAppPreferences(APP_TYPE, dynamicPrefsID, 0, NULL, 0, true);
}
----- Original Message -----
From: Steve Mann <[EMAIL PROTECTED]>
To: Palm Developer Forum <[EMAIL PROTECTED]>
Sent: Friday, May 04, 2001 12:57 AM
Subject: Re: Variable Length Prefrence Resources
> >I'm trying to do this but everything I try gives me a 'writing
> >directly to NULL' error. Any caveats, suggestions, or best of all: code
> >samples? Thanks.
>
> Why don't you show us your code for getting the Prefs size? Perhaps
> we can identify a problem with it.
>
> Regards,
> Steve Mann
> --
> -------------------------------------------
> Creative Digital Publishing Inc.
> 1315 Palm Street, San Luis Obispo, CA 93401-3117
> -------------------------------------------
> 805.784.9461 805.784.9462 (fax)
> [EMAIL PROTECTED] http://www.cdpubs.com
>
> --
> 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/