Hi all,

Is there anything wrong with the following line of code?

PrefGetAppPreferences('Loco', 1, NULL, &LevelStateSize, false);

I'm given to understand that this is a valid way of determining the required 
size, LevelStateSize, but instead it causes a "MemSet to NULL" error in 
POSEr.  I'm certain it is this line as the line is surrounded by debug 
messages i.e.

DbgMessage("About to load prefs");
Version = PrefGetAppPreferences('Loco', 1, NULL, &LevelStateSize, false);
DbgMessage("Prefs loaded");

and "Prefs loaded" never appears.  If I continue, I get "Writing to low 
memory" errors, starting from 0x00000000 - almost as if 
PrefGetAppPreferences where trying to write to the NULL pointer supplied! 
(and the second debug message never appears).

The preference resources has previously been written to (without error) by

PrefSetAppPreferences('Loco',1,1,PrefsBufferPtr,LevelStateSize,false);

LevelStateSize was greater than zero.

I'm completely baffled by this, and any help would be greatly appreciated.  
Hopefully, it's just a stupid error on my part...

Many thanks in advance,
Simon





_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com



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

Reply via email to