#include <precomp.h>
#include <mbstring.h>
Go to the source code of this file.
◆ _Success_()
Definition at line 12 of file mbstowcs_s.c.
23{
26
27
29 ((sizeInWords == 0) && (pwcstr == 0)) ))
30 {
33 }
34
35
36 if (pcchConverted)
37 {
38
39 *pcchConverted = 0;
40 }
41
43 {
46 }
47
48
49 if ((pwcstr == 0) && (pmbstr == 0))
50 {
53 }
54
55
56 if (pmbstr)
57 {
58
59 if (pwcstr)
60 {
61
63
64
66
67
69 {
70
71 if (cwcWritten == sizeInWords)
72 {
73
75 {
76
78
79
82 }
83
84
86 }
87
88
89 pwcstr[cwcWritten - 1] =
L'\0';
90 }
91 else
92 {
93
94 cwcWritten++;
95 }
96 }
97 else
98 {
99
100 cwcWritten =
_mbsnlen((
const unsigned char *)pmbstr,
count) + 1;
101 }
102 }
103 else
104 {
105 cwcWritten =
count + 1;
106 }
107
108
109 if (pcchConverted)
110 {
111
112 *pcchConverted = cwcWritten;
113 }
114
116}
GLuint GLuint GLsizei count
_Check_return_ _CRTIMP size_t __cdecl _mbsnlen(_In_z_ const unsigned char *_Str, _In_ size_t _MaxCount)
#define MSVCRT_CHECK_PMT(x)
errno_t __cdecl _set_errno(_In_ int _Value)