| * Copyright 2013 Google Inc. |
| * Use of this source code is governed by a BSD-style license that can be |
| * found in the LICENSE file. |
| BOOL CALLBACK MyFuncLocaleEx(LPWSTR pStr, DWORD dwFlags, LPARAM lparam) { |
| WCHAR wcBuffer[BUFFER_SIZE]; |
| bufferSize = GetLocaleInfoEx(pStr, LOCALE_SENGLANGUAGE, wcBuffer, BUFFER_SIZE); |
| wprintf(L"Locale %s had error %d\n", pStr, GetLastError()); |
| LCID lcid = LocaleNameToLCID(pStr, nullptr); |
| wprintf(L"Error %d getting LCID\n", GetLastError()); |
| wprintf(L" { 0x%.4x, \"%s\" }, //%s\n", lcid, pStr, wcBuffer); |
| int main(int argc, wchar_t* argv[]) { |
| EnumSystemLocalesEx(MyFuncLocaleEx, LOCALE_ALL, nullptr, nullptr); |