Let me preface this by saying that I am new to Palm programming,
however I have been programming professionaly for a number of
years. That said, I am having a problem with the gcc (Pilot SDK
0.5.0) compiler. As part of a SIMPLE (think hello world)
program that I am trying to write I am doing some memory
allocation with MemHandleNew. When I make this call it corrupts
my local variables. Here is a snippet of the code that I have
written (please ignore the alerts... I just didn't want to mess
with the debugger).
StrPrintF(test,"%d, %d ,%d",gCategoryList
[j].string,j,i);
FrmCustomAlert(A_TEST,test,"","");
// if ((gCategoryList
[j].string=MemHandleNew(StrLen(appinfo->appinfo.categoryLabels
[i])+1))==0)
// return
memErrNotEnoughSpace;
h=MemHandleNew(4096);
gCategoryList[j].string=h;
StrPrintF(test,"%d, %d ,%d",h,j,i);
FrmCustomAlert(A_TEST,test,"","");
Prior to the call to MemHandleNew h,j, and i are all 0.
Subsequent to the call h=-32768 (seems reasonable I suppose)
however j=5458 and i=0. I have a Palm Vx and I am using PalmOS
3.1. Has anyone else had any problems like this? Is this a
problem with gcc or is it something like I'm linking with the
wrong versions of palmsdk libraries? Please help.
Trevor
[EMAIL PROTECTED]
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html