"Bruno" <[EMAIL PROTECTED]> �b�l�� news:[EMAIL PROTECTED] �����g...
>
> "Bruno" <[EMAIL PROTECTED]> �b�l�� news:[EMAIL PROTECTED] �����g
...
> > hello,
> >
> > I have a record which contains 3 binary data, they are :
> > (short integer)(string with exactly 35 chars)(short integer)
> > I read the first 2 data successfully, but when I try to read the third
> data
> > (short integer) there is error
> > i think the pointing address is wrong but I don't know how to correct
it,
> > any suggestion?
> > thank you!
> >
> >
> > char*                text;
> > Int16                *intPtr, *int2Ptr;
> > MemHandle     recordH;
> >
> >
> > recordH = DmQueryRecord(DB, recordNo);
> >
> >  if (recordH == NULL) {
> >   abort("Read NULL from Database");
> >   return false;
> >  }
> >
> > intPtr = (Int16*)MemHandleLock(recordH);
> > number = intPtr[0];
> > text = (char*)&intPtr[1];
> > int2Ptr = (Int16*)&text[1];
>
> I use text[35] to run at simulator
> but  Fatal Alert  occurs
> run68k.c, Line:2297, Odd aligned read from 58019905
> I don't know why

I have solved the problem
I changed the string from 35 to 34 chars in the record data directly
and use      text = (char*)&intPtr[34];    instead

but I am interested to know the method for the string of 35 chars
any suggestion ?

>
>
> >
> > MemHandleUnlock(recordH);
> >
> >
>
>
>



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to