I am facing a adddress arror when i try executing this code
please help me out
#pragma pack (1)
struct Record
{
char A[25];
Int16 B;
Int16 C;
char T;
};
int x = sizeof(Record);
LocalID ld;
DmOpenRef tst;
ld = DmFindDatabase(0,"Test_pdb");
tst = DmOpenDatabase(0,ld, dmModeReadOnly);
MemHandle DH = MemHandleNew(30);
DH= DmQueryRecord(tst,rn);
Record *rec = new Record;
UInt16 number = DmNumRecords(tst);
char * p = (char*)MemHandleLock(DH);
MemMove(rec,p,30);
int x = rec->B;----------------here the problem is
MemHandleUnlock(DH);
MemHandleFree(DH);
DmCloseDatabase(tst);
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/