[Mono-dev] Question on the C->C# translation of WinApi MSG struct.
stapostol at gmail.com
Mon Sep 24 02:59:40 EDT 2007
Thanks, this makes perfect sense!
On 9/22/07, Mike Edenfield <kutulu at kutulu.org> wrote:
> The Windows API almost always passes structures like this as
> pointers. PeekMessage() and all of the GetMessage() calls
> pass an LPMSG parameter, for example. The only thing the
> unmanaged code inside Windows knows about are the field
> defined in the header, which are accessed as "x number of
> bytes past the pointer value". As long as any additional
> information is at the end of the structure, Windows will
> ignore it.
> In fact, Windows uses this fact itself when new features
> come out, by adding fields to the end of key structures and
> internally using sizeof(blah) to figure out what fields are
> The only thing you would need to watch out for is anything
> that tries to take the size of a struct MSG, but I don't
> know of any Windows API call that does so.
> -- Mike
> Still using IE? Get Firefox!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list