The following code compiled fine using the 3.1 SDK.

Handle hErrorStringsRsrc;
Handle hErrorStringsRsrcArray;
Handle pErrorStringRsrcArray;
int len;

hErrorStringsRsrc = (char**)DmGetResource('tSTL', ErrorCodesStringList); //
get the resource

StrListPtr ErrorStringsPtr = (StrListPtr)MemHandleLock(hErrorStringsRsrc);
// lock the list resource

// set the string array
hErrorStringsRsrcArray =
(char**)SysFormPointerArrayToStrings(ErrorStringsPtr->firstString,ErrorStrin
gsPtr->numStrings);

pErrorStringRsrcArray = (char**)MemHandleLock(hErrorStringsRsrcArray);

// other code here

// get the length if the string at a particular index
len = StrLen(pErrorStringRsrcArray[x]) ;


Trying to compile the same code in the 4.0 SDK gives me all kinds of errors:
Seems I no longer need the (char**) typecasts, so I take them out...exepct
for the MemHandleLock. If I take out the typecast, it gives me a "Illegal
implicit conversion void* to _opaque*.  What the heck is an _opaque*? If I
cast it (_opaque*) then it gets past it, but either way, I get "Illegal
type" error on the last line (the StrLen).  It highlights the last "]".

What the heck is going on here?

It's a wonder how I got this far...

-Mike






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

Reply via email to