[EMAIL PROTECTED] wrote:
thank you bob for your previous help i made the nesscarry changes in my code but still couldnt fix the problem
aptr=MemHandleLock(newrecord); length += StrLen(a.Name);
DmWrite(aptr,0 ,&a.Name,length);// getting error here
Try it with "a.name" not "&a.name". Like this... DmWrite(aptr,0 ,a.Name,length);
length += 1;Remember to write the trailing NULL here, or your 'notes' string will not be terminated correctly. The simplest fix would be to write it as...
DmWrite(aptr,length,"\0",1);
length += 1;
DmWrite(aptr,length ,a.notes,StrLen(a.notes));
DmWrite(aptr,length ,a.notes,StrLen(a.notes)+1);
...becaus a.notes (in your structure) already has the trailing NULL.
MemHandleUnlock(newrecord);
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
