20 _In_ size_t cjDstSize,
21 _In_z_ const wchar_t * pwszSrc,
22 _In_ size_t cjMaxCount)
24 size_t cchMax, cchConverted;
29 ((cjDstSize == 0) && (pmbstrDst == 0)) ))
49 if ((pmbstrDst == 0) && (pwszSrc == 0))
62 cchMax = (cjMaxCount < cjDstSize) ? cjMaxCount + 1 : cjDstSize;
68 if (cchConverted ==
cchMax)
71 if (cchConverted == cjDstSize)
89 pmbstrDst[cchConverted - 1] =
L'\0';
100 cchConverted =
wcsnlen(pwszSrc, cjMaxCount) + 1;
105 cchConverted = cjMaxCount + 1;
112 *pcchConverted = cchConverted;
#define MSVCRT_CHECK_PMT(x)
_Check_return_wat_ _CRTIMP errno_t __cdecl wcstombs_s(_Out_opt_ size_t *pcchConverted, _Out_writes_bytes_to_opt_(cjDstSize, *pcchConverted) char *pmbsDst, _In_ size_t cjDstSize, _In_z_ const wchar_t *pwszSrc, _In_ size_t cjMaxCount)
#define _Out_writes_bytes_to_opt_(s, c)
errno_t __cdecl _set_errno(_In_ int _Value)
size_t __cdecl wcsnlen(wchar_t const *const string, size_t const maximum_count)
#define _Check_return_wat_