I am trying to write a simple UInt32 value to feature memory and then retrieve it. Here are my two functions - one to write the value to memory, and the other to read the value and write it to the screen. Note that HRWinDrawChars() is the Sony HiRes Library equivalent of WinDrawChars().
//globals UInt32 creator='CTlv'; UInt16 ftrnum=1; void *FtrPtr; static void WriteFtr() { UInt32 data=320; FtrPtrNew(creator,ftrnum,400,&FtrPtr); DmWrite(FtrPtr,0,&data,sizeof(data)); } static void ReadFtr() { UInt32 data; Char str[maxStrIToALen]; FtrGet(creator,ftrnum,(UInt32*)&data); StrIToA(str,data); HRWinDrawChars(refNum,str,sizeof(str),20,20); } When I run the functions, the screen prints out a number like 15393046 and then garbage. The number changes each time I run the program. I tried to follow the example used in listing 11.1 at http://www.palmos.com/dev/support/docs/palmos/SystemFeatures.html Can someone tell me what I'm doing wrong? -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/