struct wimp_message_header

Tony van der Hoff OSLib at mk-net.demon.co.uk
Thu Oct 19 10:11:16 BST 2000


On Wed, 18 Oct 2000, at 18:45:04, David Bryan
<D.J.Bryan at cranfield.ac.uk> wrote on the subject "struct
wimp_message_header":

>Why does struct wimp_message_header have a data member?  This
>makes its sizeof differ from what I would expect.
>

Yes, it is legacy code, retained for backwards compatibility only. The
macro wimp_SIZEOF_MESSAGE_HEADER(0) will return the correct size.

Current code should not need to use the wimp_message_header structure,
which has been subsumed in the macro wimp_MESSAGE_HEADER_MEMBERS, which
in turn forms the basis for the definition of the preferred individual
message structures.

If you really want a header with no data members, you can define your
own:
  struct
  {
    wimp_MESSAGE_HEADER_MEMBERS
  } message_header;

and, if you so choose, take the sizeof that. 
-- 
Tony van der Hoff         |  mailto:OSLib at mk-net.demon.co.uk
Buckinghamshire, England  |  http://www.mk-net.demon.co.uk/oslib/
----------------------------------------------------------------



More information about the oslib-user mailing list