From: "Timothy Beamish" <[EMAIL PROTECTED]>
>   /*** 's' remains blank throughout the following statements. What am I
> doing wrong? ***/
>   error = DmWrite(s, OffsetOf(PackedAnimalInfoRecord, alphaRhythm),
>                      &src_record->alphaRhythm,
> sizeof(src_record->alphaRhythm));
>
When you say blank do you mean that you've confirmed 
that nothing is written to the buffer using 'view memory'
or do you mean that the variable displays as "" in the 
variable list?  If it's the latter remember that if alphaRhythm
is zero it's going to be interpreted as a null terminator for
the string and nothing after it will display (been there, done 
that).

> error = DmStrCopy(s, OffsetOf(PackedAnimalInfoRecord, key2),
>                     src_record->key2);
>
Is this right?  OffsetOf is good for writing fixed data into 
structures but it's going only going to increment by one for 
each successive key because that's how large they are in 
the structure.  Don't you need to initialise an offset value to 
Offset of the first string and then add StrLen + 1 to decide 
where to write the next string?

Chris Tutty

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

Reply via email to