Iulia, if you combine the various pieces of advice, you get this:
AppInfoType *foo=NULL;
foo = MemPtrNew(sizeof(AppInfoType));
if (foo)
MemSet(foo,sizeof(AppInfoType),0);There should be nothing wrong with those lines of code, and if you still have trouble then the problem must lie elsewhere.
Bob.
Chris Tutty wrote:
From: "Orasanu Iuliana" <[EMAIL PROTECTED]>
i tryed to use what u told me.. but still when i debug to see what mystructer contains i can see only "invalid pointer"!!
i'm using AppInfoType* foo = (AppInfoType *)MemPtrNew(sizeof(AppInfoType)); MemSet(foo,sizeof(AppInfoType),0); Heeelllppp!
Do you mean before or after the 'foo =' line? It will almost certainly be invalid before that. If it's still invalid before the MemSet line (and since any memory allocation can fail that should be *foo = ; if (foo) {MemSet} else {error}) then perhaps your AppInfoType is larger than 64K, or the allocation is failing for some other reason.
Chris Tutty
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
