OK, sorry for the stupid question here, but....:

Let's say I write a record like this:

UInt16 someNum;

DmStrCopy(record, 0, str);
DmWrite(record, StrLen(str) + 1, &someNum, sizeof(someNum));


When I read it back, I'd do:


Char *record = (Char *) MemHandleLock(h);
record += StrLen(record) + 1;

Now record is at the offset where that UInt16 was written.
How do I grab that value back into a UInt16?  I've always just
had a UInt8 before, so I'd just say:  UInt8 n = (UInt8) *record;

a UInt16 is two bytes though, so that's not going to work.  Sorry for
such a simple question, but I've left my book at home so I can't consult
it.


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

Reply via email to