how would this struct look in .NET using C#

  • Thread starter Thread starter Maersa
  • Start date Start date
M

Maersa

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,
 
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
 
Back
Top