Just a guess but 2 sounds like you might have done something like
sizeof() on your size variable.  The size of the pointer
variable might be 2; don't know what you are using.


On Tue, 18 Apr 2000, Marty Rice wrote:

> Hi,
> 
> I'm trying to implement an upgrade to a program where the new version has
> more data in the preferences structure than the previous version.  I've got
> both structures in the new program; the original is 142 bytes, the new one
> is 228 bytes.  In my AppStart() function I am calling PrefGetAppPreferences,
> first with a NULL pointer to the structure and a value of "zero" for the
> structure size, and then I look at the return value to determine which
> version of the preferences is stored on the device.  Make sense so far?  I
> had planned to perform a second call to PrefGetAppPreferences() to write the
> stored preferences into the proper structure (v1 or v2).  I then wrote a
> function to "upgrade" the v1 preferences to the v2 structure.  But I'm not
> getting that far.
> 
> The problem is that the returned value corresponds to neither version of the
> preferences - it returns a value of 2 instead of the expected values 142 or
> 228.
> 
> Any ideas what I might be doing wrong?
> 
> TIA!
> -Marty
> 
> 
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe, please see 
>http://www.palm.com/devzone/mailinglists.html
> 
> 

----------------------------------------------------
Shoot-to-Win

Protect the 2nd Amendment
----------------------------------------------------


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to