Since there are no macros in C#, and since you can view the winnt.h
file...
why didn't you create methods like this:
/*
A language ID is a 16 bit value which is the combination of a
primary language ID and a secondary language ID. The bits are
allocated as follows:
+-----------------------+-------------------------+
| Sublanguage ID | Primary Language ID |
+-----------------------+-------------------------+
15 10 9 0 bit
Language ID creation/extraction macros:
MAKELANGID - construct language id from a primary language id
and
a sublanguage id.
PRIMARYLANGID - extract primary language id from a language id.
SUBLANGID - extract sublanguage id from a language id.
#define MAKELANGID(p, s) ((((WORD )(s)) << 10) | (WORD )(p))
#define PRIMARYLANGID(lgid) ((WORD )(lgid) & 0x3ff)
#define SUBLANGID(lgid) ((WORD )(lgid) >> 10)
*/
public ushort MAKELANGID(byte primaryLanguage, byte subLanguage)
{
return (ushort)((((ushort)subLanguage) << 10) |
(ushort)primaryLanguage);
}
public byte PRIMARYLANGID(ushort languageId)
{
return (byte)(languageId & 0x3ff);
}
public byte SUBLANGID(ushort languageId)
{
return (byte)(languageId >> 10);
}
Eyal.