C>S 0x12 SID_LOCALEINFO
Transport Layer: | Transmission Control Protocol (TCP) |
---|---|
Application Layer: | Battle.net v1 TCP Messages (SID) |
Message Id: | 0x12 |
Message Name: | SID_LOCALEINFO |
Direction: | Client to Server |
Used By: | Diablo Retail, Diablo Shareware Warcraft II BNE |
Message Format: (does not include protocol header) |
|
Remarks
Informs the server of the client's locale information. Much of this functionality has been incorporated into C>S 0x50 SID_AUTH_INFO, and more in-depth remarks can be found there.
These fields can all be retrieved from system calls:
- System time: GetSystemTime()
- Local time: GetLocalTime()
- Timezone bias: Retrieve using TIME_ZONE_INFORMATION structure returned from GetTimeZoneInformation()
- Depending on whether the return value is
TIME_ZONE_ID_STANDARD
orTIME_ZONE_ID_DAYLINE
, addTZI.Bias + TZI.StandardBias
orTZI.Bias + TZI.DaylightBias
to get the bias in minutes, whereTZI
is the returnedTIME_ZONE_INFORMATION
structure. - Alternatively, you may use GetSystemTime(), GetLocalTime(), and SystemTimeToFileTime(): convert both system and local time to FILETIMEs, subtract local time from system time, and divide by 600,000,000 to get the bias in minutes.
- Depending on whether the return value is
- System LCID: GetSystemDefaultLCID()
- User LCID: GetUserDefaultLCID()
- User language ID: GetUserDefaultLangID()
- Abbreviated language name, country code, abbreviated country name, and country name: GetLocaleInfo() with LCType set to
LOCALE_SABBREVLANGNAME
(three-letter code),LOCALE_ICOUNTRY
(numeric code),LOCALE_SABBREVCTRYNAME
(three-letter code),LOCALE_SENGLISHCOUNTRYNAME
(English country name) respectively.
| Edited:
Anonymous