At 9:44 AM -0700 1999/05/19, Bryan Nystrom wrote:
>This thread was somewhat thrown off by the last post, so:
>
>...can anybody give an example of how to get back the version parameter that
>is set in PrefSetAppPreferences? You can pass a version number as a
>parameter IN with PrefGetAppPreferences, but I don't see a way of later
>getting it back. Bob Ebert seemed to imply that you can, so I must be
>missing something.
The return value of the PrefGetAppPreferences call is the version number. The docs are
rather vague about this, however, indicating that the 'special' value
noPreferenceFound (-1) will be returned if the pref resource does not exist.
For the curious, the version number is written into the first 16-bits of the
preference resource, and stripped when it is retrieved. The version number and
preference data are used together internally by PrefSetAppPreferences to determine
whether or not to actually write the resource to the storage heap and thus dirty the
prefs database so that HotSync will back it up.
Regards,
Jim Schram
3Com/Palm Computing
Partner Engineering