[EMAIL PROTECTED] wrote in message <26052@palm-dev-forum>...
>
>
>
>I can't use offsetof() in my application. My StructType is defined as
>typedef struct {
>UInt32 Id1;
>UInt32 Id2;
>char Data[1];
>} StructType;
>
>I can use offsetof(StructType, Id1) to write to the first field, but how
can I
>update data in the 5th field (also have to consider there is also data in
the
>sixth field and new data might have a different size)?
>
You can't. In a situation such as you describe it's better just to
read & write the whole record w/ paired pack() and unpack()
routines.
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/
- How to update a specified field in the database Chang . Elizabeth
- Re: How to update a specified field in the databas... Richard Burmeister
- Re: How to update a specified field in the databas... Chang . Elizabeth
- Re: How to update a specified field in the databas... Grounderyoyo22
- Re: How to update a specified field in the databas... Chang . Elizabeth
- Re: How to update a specified field in the databas... Richard Hartman
- Re: How to update a specified field in the databas... Chang . Elizabeth
- Re: How to update a specified field in the databas... Richard Hartman
- Re: How to update a specified field in the databas... chongwm
- Re: How to update a specified field in the databas... Chang . Elizabeth
- Re: How to update a specified field in the databas... Chang . Elizabeth
- Re: How to update a specified field in the databas... Richard Hartman
- Re: How to update a specified field in the databas... Ben Combee
- Re: How to update a specified field in the databas... Richard Hartman
- Re: How to update a specified field in the databas... Ben Combee
- Re: How to update a specified field in the databas... chongwm
