WinRT相当于GetThreadLocale和GetACP

时间:2012-06-27 23:59:44

标签: c++ winapi windows-runtime

我需要在WinRT上制作以下代码(来自ICU)。失败发生在GetThreadLocaleGetACP

elif U_PLATFORM_USES_ONLY_WIN32_API
   UErrorCode status = U_ZERO_ERROR;
   LCID id = GetThreadLocale();
   const char* locID = uprv_convertToPosix(id, &status);

   if (U_FAILURE(status)) {
       locID = "en_US";
   }
   return locID;

#elif U_PLATFORM_USES_ONLY_WIN32_API
    static char codepage[64];
    sprintf(codepage, "windows-%d", GetACP());
    return codepage;

旧的Win32函数和WinRT之间是否有转换表?

0 个答案:

没有答案