You should use the StructLayout attributes on your structs if you are
passing back and forth between C dll's and a managed application. The
StructLayout will allow you to set up the unmanaged size of the structure,
packing, character sets for strings, whether the layout should be sequential
(field order), or allow you to set offsets explicitly. Then for each field
(if using explicit), you can set the FieldOffset. This is how you might
attempt to support unions and other such structures.
--
Justin Rogers
DigiTec Web Consultants, LLC.
"John" <john@no_spam> wrote in message
news:uY*************@tk2msftngp13.phx.gbl...
Hi,
What is the struct member aligment of a C# program? Are there any issues
with P/Invoke when passing structs to 3rd party C dlls?
Thanks