45 DWORD const info_type,
47 int const string_size_in_bytes,
48 unsigned short*
const char_type,
53 _LocaleUpdate locale_update(
locale);
64 int const actual_code_page =
code_page != 0
66 : locale_update.GetLocaleT()->locinfo->_public._locale_lc_codepage;
69 int const required_extent = __acrt_MultiByteToWideChar(
77 if (required_extent == 0)
81 __crt_scoped_stack_ptr<wchar_t>
buffer(_malloca_crt_t(
wchar_t, required_extent));
82 if (
buffer.get() ==
nullptr)
85 memset(
buffer.get(), 0,
sizeof(
wchar_t) * required_extent);
88 int const actual_extent = __acrt_MultiByteToWideChar(
96 if (actual_extent == 0)
BOOL __cdecl __acrt_GetStringTypeA(_locale_t const locale, DWORD const info_type, LPCSTR const string, int const string_size_in_bytes, unsigned short *const char_type, int const code_page, BOOL const error)
_Out_opt_ UINT * code_page
BOOL WINAPI GetStringTypeW(DWORD type, LPCWSTR src, INT count, LPWORD chartype)
#define MB_ERR_INVALID_CHARS