At 09:38 AM 12/30/99 -0800, you wrote:
>You sure about your offset? I usually do something like:
>
>struct xxx {
>         char foo;
>         long goo;
>         char zoo[10];
>} yyy;
>
>const struct xxx *pNIL = (struct xxx *)NULL;
>const long offset = (unsigned long)&(pNil->zoo);
>DmWrite(ptr, offset, &yyy.zoo, 10);
>

There's a macro called offsetof defined in cstddef.h (in the msl stuff)
which can be used to do this ... offsetof(struct xxx, zoo)

Reply via email to