David Beers wrote:
> for (i = 0; i < fieldCount; i++) {
>       DmWrite(appInfo, (UInt32) &nil->fields[i].dtype, &stringP,
>               sizeof(appInfo->fields[i].dtype));
>       DmWrite(appInfo, (UInt32) &nil->fields[i].dsize, &zeroSizeP,
>               sizeof(appInfo->fields[i].dsize));
> }

The prototype to DmWrite is:

  Err DmWrite(void* recordP, UInt32 offset, const void* srcP, UInt32 bytes)

where offset is measured from the start of recordP.  Did you mean to use the
offsetof macro instead?

You also could use:

  DmWrite(appInfo, 0, &nil->fields[i], sizeof nil->fields[i]);

to write an entire UxoDataFieldType structure directly.


__________________________________
Do you Yahoo!?
Yahoo! Calendar - Free online calendar with sync to Outlook(TM).
http://calendar.yahoo.com

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

Reply via email to