58 cchCount1 =
static_cast<int>(
__strncnt(lpString1, cchCount1));
59 else if (cchCount1 < -1)
63 cchCount2 =
static_cast<int>(
__strncnt(lpString2, cchCount2));
64 else if (cchCount2 < -1)
82 if (!cchCount1 || !cchCount2)
88 if (cchCount1 == cchCount2)
108 _ASSERTE(cchCount1==0 && cchCount2==1 || cchCount1==1 && cchCount2==0);
119 if ( (*(
unsigned char *)lpString1 >=
cp[0]) &&
120 (*(
unsigned char *)lpString1 <=
cp[1]) )
135 if ( (*(
unsigned char *)lpString2 >=
cp[0]) &&
136 (*(
unsigned char *)lpString2 <=
cp[1]) )
148 if ( 0 == (buff_size1 = __acrt_MultiByteToWideChar(
code_page,
158 __crt_scoped_stack_ptr<wchar_t> wbuffer1(_malloca_crt_t(
wchar_t, buff_size1));
159 if (wbuffer1.get() ==
nullptr)
163 if ( 0 == __acrt_MultiByteToWideChar(
code_page,
172 if ( 0 == (buff_size2 = __acrt_MultiByteToWideChar(
code_page,
182 __crt_scoped_stack_ptr<wchar_t>
const wbuffer2(_malloca_crt_t(
wchar_t, buff_size2));
183 if (wbuffer2.get() ==
nullptr)
186 int const actual_size = __acrt_MultiByteToWideChar(
194 if (actual_size == 0)
212 DWORD const compare_flags,
214 int const string1_count,
216 int const string2_count,
220 _LocaleUpdate locale_update(
locale);
223 locale_update.GetLocaleT(),
int __cdecl __acrt_CompareStringA(_locale_t const locale, LPCWSTR const locale_name, DWORD const compare_flags, PCCH const string1, int const string1_count, PCCH const string2, int const string2_count, int const code_page)
static int __cdecl InternalCompareStringA(_locale_t plocinfo, LPCWSTR LocaleName, DWORD dwCmpFlags, PCCH lpString1, int cchCount1, PCCH lpString2, int cchCount2, int code_page)
static _In_ LPCWSTR LocaleName
_Out_opt_ UINT * code_page
int WINAPI __acrt_CompareStringEx(_In_opt_ LPCWSTR locale_name, _In_ DWORD flags, _In_NLS_string_(string1_count) LPCWCH string1, _In_ int string1_count, _In_NLS_string_(string2_count) LPCWCH string2, _In_ int string2_count, _Reserved_ LPNLSVERSIONINFO version, _Reserved_ LPVOID reserved, _Reserved_ LPARAM param)
BOOL WINAPI GetCPInfo(UINT codepage, LPCPINFO cpinfo)
#define MB_ERR_INVALID_CHARS
_CRTIMP size_t __cdecl __strncnt(const char *_Str, size_t _Cnt)
static CHAR string1[MAX_PATH]
static CHAR string2[MAX_PATH]
BYTE LeadByte[MAX_LEADBYTES]