If this is a simple string (why a char** ??) you can use : char itemStrings1[100];
----- Original Message ----- From: "Pit" <[EMAIL PROTECTED]> Newsgroups: palm-dev-forum To: "Palm Developer Forum" <[EMAIL PROTECTED]> Sent: Wednesday, April 21, 2004 3:08 PM Subject: Re: Can i store a handle in the application preferences block. > This is also actually logic. But when i store a char** in the prefs, i can > not get it back, when i > call the following > > UInt16 size = sizeof (AppPrefs); > PrefGetAppPreferences (CREATORID, 0, &myAppPrefs, &size, false); > > myAppPrefs.itemStrings1 shows invalid pointer > > > > > "Chris Apers" <[EMAIL PROTECTED]> schrieb im Newsbeitrag > news:[EMAIL PROTECTED] > > You cannot store handle or memory pointer on app pref > > because the system free all handles/memory blocks when you exit your app > > you need to store this in another way in a database for example as > records. > > > > ----- Original Message ----- > > From: "Pit" <[EMAIL PROTECTED]> > > Newsgroups: palm-dev-forum > > To: "Palm Developer Forum" <[EMAIL PROTECTED]> > > Sent: Wednesday, April 21, 2004 2:46 PM > > Subject: Can i store a handle in the application preferences block. > > > > > > > Hi, > > > > > > i have a MemHandle in a struct which holds a char**, which stores > multipe > > > strings. > > > > > > When the application is exited, i want to store the struct in the > > > application preferences block. > > > After starting the application again, i want to get the stored struct > out > > > of the application preferences block. > > > > > > The problem is, when i call MemHandleLock(itemStrings1), i get a > > > MemHandleFree error. > > > Is the handle not stored correctly, or what is here the problem? > > > > > > Best Regards > > > Peter > > > > > > Enclosed you will find the code snip: > > > > > > typedef struct { > > > int kundennummer; > > > MemHandle itemStrings1; > > > } AppPrefs; > > > AppPrefs myAppPrefs; > > > > > > > > > Exit Application: > > > PrefSetAppPreferences (CREATORID, 0, 0, &myAppPrefs, sizeof (AppPrefs), > > > false); > > > > > > Start Application: > > > UInt16 size = sizeof (AppPrefs); > > > PrefGetAppPreferences (CREATORID, 0, &myAppPrefs, &size, false); > > > > > > > > > > > > -- > > > For information on using the Palm Developer Forums, or to unsubscribe, > > please see http://www.palmos.com/dev/support/forums/ > > > > > > > > > -- > For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/ > -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
