Hi.
My question is in relation to the preprocessor definition 'PACKED_RECORD'
that I keep running into in sample code for some major apps. From what I can
make out, the 'PACKED_RECORD' macro basically does a Stolen operation on
some character pointer so that when we can pass in this value to a function
that assigns exactly that much memory for a record. What I don't understand
is why we need to use these preprocessor definitions. Why is the following
code not good enough to accomplish the same task?
namePtr = FldGetTextPtr((FieldPtr)GetObjectPtr(MainUnnamed1002Field));
nameLen = StrLen(namePtr) + 1;
newRecordHandle = DmNewHandle (dbRef, nameLen);
newNameRecord = MemHandleLock(newRecordHandle);
DmWrite(newNameRecord, 0, namePtr, nameLen);
MemHandleUnlock(newRecordHandle);
I'm sure the answer lies in my grasp of what a packed record actually is.
Thanks for any help.
regards,
Akshay
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html