I'am writing a memo clone with a duplicate feature. But i have difficulties
in duplicating a record.
Here's my code:
 srcmemoRec = DmGetRecord( MemoDB, nummemo );
 size = MemHandleSize(srcmemoRec);
 srcp = MemHandleLock (srcmemoRec);

 // Add a new record at the end of the database.
 index = DmNumRecords (MemoDB);
 destmemoRec = DmNewRecord (MemoDB, &index, size);

 // If the allocate failed, display a warning.
 if (! destmemoRec)
  {
  FrmAlert (DeviceFullAlert);
  return (false);
  }

 destp = MemHandleLock (destmemoRec);

 DmWrite (destp, offset, &srcp, size);

 MemPtrUnlock (srcp);
 MemPtrUnlock (destp);


--- during the DmWrite , it fails saying i'm reading in Memory manager data
structures ?
thanks






-- 
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