Re: unmanaged structure layout error

Mike Andrews <[email protected]> Wed, 11 Nov 2009 14:48:13 -0600
Newsgroups gmane.comp.windows.devel.dotnet.advanced
Message-ID <[email protected]>
That would explain the problems then.
I'll just stick with sequential as that seems to do the trick nicely.
I read the Pack field member description for the StructLayout attribute and
I failed to notice that it only worked for Sequential.  Thanks for pointing
that out.


On Wed, Nov 11, 2009 at 2:40 PM, Benjamin Schwehn <[email protected]> wrote:

> On 11.11.2009 20:37, Mike Andrews wrote:
>
>> But I thought that's what Pack = 1 was for in the StructLayout attribute,
>> so
>> that you could do just that.
>>
>
> The MSDN page for Pack says:
>
> "This field indicates the packing size that should be used when the
> LayoutKind.Sequential value is specified. "
>
> This sounds to me like the attribute Pack is ignored for explicit layout,
> but I'm not sure.
>
> Ben
>
>
> ===================================
> View archives and manage your subscription(s) at
> http://peach.ease.lsoft.com/archives
>

===================================
View archives and manage your subscription(s) at http://peach.ease.lsoft.com/archives