Hi All,

How would the following struct be declared in .NET

typedef struct tag_SCRIPT_CONTROL {
DWORD uDefaultLanguage :16;
DWORD fContextDigits :1;
DWORD fInvertPreBoundDir :1;
DWORD fInvertPostBoundDir :1;
DWORD fLinkStringBefore :1;
DWORD fLinkStringAfter :1;
DWORD fNeutralOverride :1;
DWORD fNumericOverride :1;
DWORD fLegacyBidiClass :1;
DWORD fReserved :8;
} SCRIPT_CONTROL;

thanks,

Re: how would this struct look in .NET using C# by Chris

Chris
Fri Jan 09 03:25:17 CST 2004

Hi,

You can not use bit fields in a struct, you will have to emulate the
functionality using either BitVector32 (beware of a bug in this class with
the most significant bit not being handled correctly) or a BitArray.

Hope this helps

--
Chris Taylor
http://dotnetjunkies.com/WebLog/chris.taylor/
"Maersa" <ma_ersa@hotmail.com> wrote in message
news:uTHQMmn1DHA.2328@TK2MSFTNGP10.phx.gbl...
> Hi All,
>
> How would the following struct be declared in .NET
>
> typedef struct tag_SCRIPT_CONTROL {
> DWORD uDefaultLanguage :16;
> DWORD fContextDigits :1;
> DWORD fInvertPreBoundDir :1;
> DWORD fInvertPostBoundDir :1;
> DWORD fLinkStringBefore :1;
> DWORD fLinkStringAfter :1;
> DWORD fNeutralOverride :1;
> DWORD fNumericOverride :1;
> DWORD fLegacyBidiClass :1;
> DWORD fReserved :8;
> } SCRIPT_CONTROL;
>
> thanks,
>
>