ReactOS 0.4.16-dev-2122-g1628f5e
corecrt_wstdlib.h
Go to the documentation of this file.
1//
2// corecrt_wstdlib.h
3//
4// Copyright (c) Microsoft Corporation. All rights reserved.
5//
6// This file declares the wide character (wchar_t) C Standard Library functions
7// that are declared by both <stdlib.h> and <wchar.h>.
8//
9#pragma once
10
11#include <corecrt.h>
12
13#pragma warning(push)
14#pragma warning(disable: _UCRT_DISABLED_WARNINGS)
16
18
19
20
21// Maximum number of elements, including null terminator (and negative sign
22// where appropriate), needed for integer-to-string conversions for several
23// bases and integer types.
24#define _MAX_ITOSTR_BASE16_COUNT (8 + 1)
25#define _MAX_ITOSTR_BASE10_COUNT (1 + 10 + 1)
26#define _MAX_ITOSTR_BASE8_COUNT (11 + 1)
27#define _MAX_ITOSTR_BASE2_COUNT (32 + 1)
28
29#define _MAX_LTOSTR_BASE16_COUNT (8 + 1)
30#define _MAX_LTOSTR_BASE10_COUNT (1 + 10 + 1)
31#define _MAX_LTOSTR_BASE8_COUNT (11 + 1)
32#define _MAX_LTOSTR_BASE2_COUNT (32 + 1)
33
34#define _MAX_ULTOSTR_BASE16_COUNT (8 + 1)
35#define _MAX_ULTOSTR_BASE10_COUNT (10 + 1)
36#define _MAX_ULTOSTR_BASE8_COUNT (11 + 1)
37#define _MAX_ULTOSTR_BASE2_COUNT (32 + 1)
38
39#define _MAX_I64TOSTR_BASE16_COUNT (16 + 1)
40#define _MAX_I64TOSTR_BASE10_COUNT (1 + 19 + 1)
41#define _MAX_I64TOSTR_BASE8_COUNT (22 + 1)
42#define _MAX_I64TOSTR_BASE2_COUNT (64 + 1)
43
44#define _MAX_U64TOSTR_BASE16_COUNT (16 + 1)
45#define _MAX_U64TOSTR_BASE10_COUNT (20 + 1)
46#define _MAX_U64TOSTR_BASE8_COUNT (22 + 1)
47#define _MAX_U64TOSTR_BASE2_COUNT (64 + 1)
48
49
50#if _CRT_FUNCTIONS_REQUIRED
51
52 _Success_(return == 0)
55 _In_ int _Value,
57 _In_ size_t _BufferCount,
58 _In_ int _Radix
59 );
60
63 _In_ int, _Value,
64 wchar_t, _Buffer,
65 _In_ int, _Radix
66 )
67
70 _In_ int, _Value,
72 _In_ int, _Radix
73 )
74
75 _Success_(return == 0)
78 _In_ long _Value,
80 _In_ size_t _BufferCount,
81 _In_ int _Radix
82 );
83
86 _In_ long, _Value,
87 wchar_t, _Buffer,
88 _In_ int, _Radix
89 )
90
93 _In_ long, _Value,
95 _In_ int, _Radix
96 )
97
100 _In_ unsigned long _Value,
102 _In_ size_t _BufferCount,
103 _In_ int _Radix
104 );
105
108 _In_ unsigned long, _Value,
109 wchar_t, _Buffer,
110 _In_ int, _Radix
111 )
112
115 _In_ unsigned long, _Value,
117 _In_ int, _Radix
118 )
119
121 _ACRTIMP double __cdecl wcstod(
122 _In_z_ wchar_t const* _String,
123 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr
124 );
125
128 _In_z_ wchar_t const* _String,
129 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
131 );
132
135 _In_z_ wchar_t const* _String,
136 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
137 _In_ int _Radix
138 );
139
142 _In_z_ wchar_t const* _String,
143 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
144 _In_ int _Radix,
146 );
147
149 _ACRTIMP long long __cdecl wcstoll(
150 _In_z_ wchar_t const* _String,
151 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
152 _In_ int _Radix
153 );
154
156 _ACRTIMP long long __cdecl _wcstoll_l(
157 _In_z_ wchar_t const* _String,
158 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
159 _In_ int _Radix,
161 );
162
164 _ACRTIMP unsigned long __cdecl wcstoul(
165 _In_z_ wchar_t const* _String,
166 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
167 _In_ int _Radix
168 );
169
171 _ACRTIMP unsigned long __cdecl _wcstoul_l(
172 _In_z_ wchar_t const* _String,
173 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
174 _In_ int _Radix,
176 );
177
179 _ACRTIMP unsigned long long __cdecl wcstoull(
180 _In_z_ wchar_t const* _String,
181 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
182 _In_ int _Radix
183 );
184
186 _ACRTIMP unsigned long long __cdecl _wcstoull_l(
187 _In_z_ wchar_t const* _String,
188 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
189 _In_ int _Radix,
191 );
192
194 _ACRTIMP long double __cdecl wcstold(
195 _In_z_ wchar_t const* _String,
196 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr
197 );
198
200 _ACRTIMP long double __cdecl _wcstold_l(
201 _In_z_ wchar_t const* _String,
202 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
204 );
205
207 _ACRTIMP float __cdecl wcstof(
208 _In_z_ wchar_t const* _String,
209 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr
210 );
211
214 _In_z_ wchar_t const* _String,
215 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
217 );
218
220 _ACRTIMP double __cdecl _wtof(
221 _In_z_ wchar_t const* _String
222 );
223
225 _ACRTIMP double __cdecl _wtof_l(
226 _In_z_ wchar_t const* _String,
228 );
229
232 _In_z_ wchar_t const* _String
233 );
234
237 _In_z_ wchar_t const* _String,
239 );
240
243 _In_z_ wchar_t const* _String
244 );
245
248 _In_z_ wchar_t const* _String,
250 );
251
253 _ACRTIMP long long __cdecl _wtoll(
254 _In_z_ wchar_t const* _String
255 );
256
258 _ACRTIMP long long __cdecl _wtoll_l(
259 _In_z_ wchar_t const* _String,
261 );
262
267 _In_ size_t _BufferCount,
268 _In_ int _Radix
269 );
270
272 _ACRTIMP wchar_t* __cdecl _i64tow(
275 _In_ int _Radix
276 );
277
280 _In_ unsigned __int64 _Value,
282 _In_ size_t _BufferCount,
283 _In_ int _Radix
284 );
285
287 _ACRTIMP wchar_t* __cdecl _ui64tow(
288 _In_ unsigned __int64 _Value,
290 _In_ int _Radix
291 );
292
295 _In_z_ wchar_t const* _String
296 );
297
300 _In_z_ wchar_t const* _String,
302 );
303
306 _In_z_ wchar_t const* _String,
307 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
308 _In_ int _Radix
309 );
310
313 _In_z_ wchar_t const* _String,
314 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
315 _In_ int _Radix,
317 );
318
321 _In_z_ wchar_t const* _String,
322 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
323 _In_ int _Radix
324 );
325
328 _In_z_ wchar_t const* _String,
329 _Out_opt_ _Deref_post_z_ wchar_t** _EndPtr,
330 _In_ int _Radix,
332 );
333
334 #pragma push_macro("_wfullpath")
335 #undef _wfullpath
336
337 _Success_(return != 0)
341 _In_z_ wchar_t const* _Path,
342 _In_ size_t _BufferCount
343 );
344
345 #pragma pop_macro("_wfullpath")
346
350 _In_ size_t _BufferCount,
351 _In_opt_z_ wchar_t const* _Drive,
352 _In_opt_z_ wchar_t const* _Dir,
353 _In_opt_z_ wchar_t const* _Filename,
354 _In_opt_z_ wchar_t const* _Ext
355 );
356
359 wchar_t, _Buffer,
360 _In_opt_z_ wchar_t const*, _Drive,
361 _In_opt_z_ wchar_t const*, _Dir,
362 _In_opt_z_ wchar_t const*, _Filename,
363 _In_opt_z_ wchar_t const*, _Ext
364 )
365
369 _In_opt_z_ wchar_t const*, _Drive,
370 _In_opt_z_ wchar_t const*, _Dir,
371 _In_opt_z_ wchar_t const*, _Filename,
372 _In_opt_z_ wchar_t const*, _Ext
373 )
374
376 _In_opt_z_ wchar_t const* _ErrorMessage
377 );
378
381 _In_z_ wchar_t const* _FullPath,
385 _Pre_maybenull_ _Post_z_ wchar_t* _Ext
386 );
387
389 _In_z_ wchar_t const* _FullPath,
390 _Out_writes_opt_z_(_DriveCount) wchar_t* _Drive,
391 _In_ size_t _DriveCount,
392 _Out_writes_opt_z_(_DirCount) wchar_t* _Dir,
393 _In_ size_t _DirCount,
394 _Out_writes_opt_z_(_FilenameCount) wchar_t* _Filename,
395 _In_ size_t _FilenameCount,
396 _Out_writes_opt_z_(_ExtCount) wchar_t* _Ext,
397 _In_ size_t _ExtCount
398 );
399
402 wchar_t, _Path
403 )
404
405 #pragma push_macro("_wdupenv_s")
406 #undef _wdupenv_s
407
411 _Out_opt_ size_t* _BufferCount,
412 _In_z_ wchar_t const* _VarName
413 );
414
415 #pragma pop_macro("_wdupenv_s")
416
418 _DCRTIMP wchar_t* __cdecl _wgetenv(
419 _In_z_ wchar_t const* _VarName
420 );
421
422 _Success_(return == 0)
425 _Out_ size_t* _RequiredCount,
427 _In_ size_t _BufferCount,
428 _In_z_ wchar_t const* _VarName
429 );
430
432 _Success_(return == 0)
434 _Out_ size_t*, _RequiredCount,
435 wchar_t, _Buffer,
436 _In_z_ wchar_t const*, _VarName
437 )
438
441 _In_z_ wchar_t const* _EnvString
442 );
443
446 _In_z_ wchar_t const* _Name,
447 _In_z_ wchar_t const* _Value
448 );
449
451 _In_z_ wchar_t const* _Filename,
452 _In_z_ wchar_t const* _VarName,
454 _In_ size_t _BufferCount
455 );
456
459 _In_z_ wchar_t const*, _Filename,
460 _In_z_ wchar_t const*, _VarName,
461 wchar_t, _ResultPath
462 )
463
466 _In_z_ wchar_t const*, _Filename,
467 _In_z_ wchar_t const*, _VarName,
468 _Pre_notnull_ _Post_z_, wchar_t, _ResultPath
469 )
470
472 _In_opt_z_ wchar_t const* _Command
473 );
474
475#endif // _CRT_FUNCTIONS_REQUIRED
476
477
478
481#pragma warning(pop) // _UCRT_DISABLED_WARNINGS
long long __cdecl _wtoll(wchar_t const *const string)
Definition: atox.cpp:89
long long __cdecl _wtoll_l(wchar_t const *const string, _locale_t const locale)
Definition: atox.cpp:94
return
Definition: dirsup.c:529
int CDECL _wsearchenv_s(const wchar_t *file, const wchar_t *env, wchar_t *buf, size_t count)
Definition: dir.c:1710
errno_t CDECL _wputenv_s(const wchar_t *name, const wchar_t *value)
Definition: environ.c:413
int errno_t
Definition: corecrt.h:249
#define __cdecl
Definition: corecrt.h:121
#define _ACRTIMP
Definition: corecrt.h:153
#define __int64
Definition: corecrt.h:72
_ACRTIMP __msvcrt_long __cdecl _wtol(const wchar_t *)
Definition: wcs.c:2798
_ACRTIMP wchar_t *__cdecl _wfullpath(wchar_t *, const wchar_t *, size_t)
Definition: dir.c:1218
_ACRTIMP __int64 __cdecl wcstoll(const wchar_t *, wchar_t **, int)
Definition: strtox.cpp:291
_ACRTIMP float __cdecl wcstof(const wchar_t *, wchar_t **)
Definition: strtod.cpp:114
_ACRTIMP wchar_t *__cdecl _wgetenv(const wchar_t *)
Definition: environ.c:254
_ACRTIMP wchar_t *__cdecl _ltow(__msvcrt_long, wchar_t *, int)
Definition: string.c:2143
_ACRTIMP void __cdecl _wmakepath(wchar_t *, const wchar_t *, const wchar_t *, const wchar_t *, const wchar_t *)
Definition: dir.c:1357
_ACRTIMP __int64 __cdecl _wcstoi64(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2720
_ACRTIMP void __cdecl _wsplitpath(const wchar_t *, wchar_t *, wchar_t *, wchar_t *, wchar_t *)
Definition: dir.c:1206
_ACRTIMP double __cdecl _wtof(const wchar_t *)
Definition: wcs.c:805
_ACRTIMP errno_t __cdecl _ultow_s(__msvcrt_ulong, wchar_t *, size_t, int)
Definition: string.c:2462
_ACRTIMP unsigned __int64 __cdecl wcstoull(const wchar_t *, wchar_t **, int)
Definition: strtox.cpp:352
_ACRTIMP float __cdecl _wcstof_l(const wchar_t *, wchar_t **, _locale_t)
Definition: strtod.cpp:122
_ACRTIMP errno_t __cdecl _ui64tow_s(unsigned __int64, wchar_t *, size_t, int)
Definition: string.c:2370
_ACRTIMP __int64 __cdecl _wtoi64(const wchar_t *)
Definition: wcs.c:3040
_ACRTIMP __msvcrt_ulong __cdecl wcstoul(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2912
_ACRTIMP unsigned __int64 __cdecl _wcstoull_l(const wchar_t *, wchar_t **, int, _locale_t)
Definition: strtox.cpp:382
_ACRTIMP void __cdecl _wperror(const wchar_t *)
Definition: errno.c:354
_ACRTIMP unsigned __int64 __cdecl _wcstoui64(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2885
_ACRTIMP void __cdecl _wsearchenv(const wchar_t *, const wchar_t *, wchar_t *)
Definition: dir.c:1796
_ACRTIMP int __cdecl _wputenv(const wchar_t *)
Definition: environ.c:377
_ACRTIMP int __cdecl _wmakepath_s(wchar_t *, size_t, const wchar_t *, const wchar_t *, const wchar_t *, const wchar_t *)
Definition: dir.c:1508
_ACRTIMP __msvcrt_long __cdecl wcstol(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2747
_ACRTIMP errno_t __cdecl _i64tow_s(__int64, wchar_t *, size_t, int)
Definition: string.c:2591
_ACRTIMP wchar_t *__cdecl _ui64tow(unsigned __int64, wchar_t *, int)
Definition: string.c:2223
_ACRTIMP errno_t __cdecl _itow_s(int, wchar_t *, size_t, int)
Definition: string.c:2127
_ACRTIMP wchar_t *__cdecl _ultow(__msvcrt_ulong, wchar_t *, int)
Definition: string.c:2199
_ACRTIMP double __cdecl wcstod(const wchar_t *, wchar_t **)
Definition: wcs.c:797
_ACRTIMP errno_t __cdecl _wgetenv_s(size_t *, wchar_t *, size_t, const wchar_t *)
Definition: environ.c:533
_ACRTIMP errno_t __cdecl _ltow_s(__msvcrt_long, wchar_t *, size_t, int)
Definition: string.c:2087
_ACRTIMP unsigned __int64 __cdecl _wcstoui64_l(const wchar_t *, wchar_t **, int, _locale_t)
Definition: wcs.c:2826
_ACRTIMP wchar_t *__cdecl _itow(int, wchar_t *, int)
Definition: string.c:2135
_ACRTIMP __int64 __cdecl _wcstoi64_l(const wchar_t *, wchar_t **, int, _locale_t)
Definition: wcs.c:2655
_ACRTIMP int __cdecl _wsystem(const wchar_t *)
Definition: process.c:1254
_ACRTIMP int __cdecl _wtoi(const wchar_t *)
Definition: wcs.c:2773
_ACRTIMP wchar_t *__cdecl _i64tow(__int64, wchar_t *, int)
Definition: string.c:2289
_ACRTIMP __int64 __cdecl _wcstoll_l(const wchar_t *, wchar_t **, int, _locale_t)
Definition: strtox.cpp:321
__int64 CDECL _wtoi64_l(const wchar_t *str, _locale_t locale)
Definition: wcs.c:3013
__msvcrt_ulong __cdecl _wcstoul_l(const wchar_t *s, wchar_t **end, int base, _locale_t locale)
Definition: wcs.c:2894
__msvcrt_long __cdecl _wtol_l(const wchar_t *str, _locale_t locale)
Definition: wcs.c:2781
int __cdecl _wtoi_l(const wchar_t *str, _locale_t locale)
Definition: wcs.c:2756
double CDECL _wcstod_l(const wchar_t *str, wchar_t **end, _locale_t locale)
Definition: wcs.c:574
double CDECL _wtof_l(const wchar_t *str, _locale_t locale)
Definition: wcs.c:813
__msvcrt_long CDECL _wcstol_l(const wchar_t *s, wchar_t **end, int base, _locale_t locale)
Definition: wcs.c:2729
errno_t __cdecl _wdupenv_s(wchar_t **const buffer_pointer, size_t *const buffer_count, wchar_t const *const name)
Definition: getenv.cpp:294
#define _wsplitpath_s(f, d, dl, p, pl, n, nl, e, el)
Definition: utility.h:211
#define _Deref_post_z_
Definition: ms_sal.h:1121
#define _Outptr_result_buffer_maybenull_(size)
Definition: ms_sal.h:464
#define _Out_writes_z_(s)
Definition: no_sal2.h:180
#define _Out_opt_
Definition: no_sal2.h:214
#define _Success_(c)
Definition: no_sal2.h:84
#define _In_z_
Definition: no_sal2.h:164
#define _Pre_maybenull_
Definition: no_sal2.h:514
#define _Check_return_
Definition: no_sal2.h:60
#define _In_opt_z_
Definition: no_sal2.h:218
#define _Post_z_
Definition: no_sal2.h:508
#define _Pre_notnull_
Definition: no_sal2.h:516
#define _Out_writes_opt_z_(s)
Definition: no_sal2.h:230
#define _Outptr_result_maybenull_z_
Definition: no_sal2.h:274
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_1_1(_ReturnType, _FuncName, _HType1, _HArg1, _DstType, _Dst, _TType1, _TArg1)
Definition: corecrt.h:181
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_2_0(_ReturnType, _FuncName, _HType1, _HArg1, _HType2, _HArg2, _DstType, _Dst)
Definition: corecrt.h:184
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_SPLITPATH(_ReturnType, _FuncName, _DstType, _Src)
Definition: corecrt.h:187
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_4(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3, _TType4, _TArg4)
Definition: corecrt.h:180
long double __cdecl wcstold(const wchar_t *__restrict__, wchar_t **__restrict__)
Definition: strtod.cpp:148
_In_ size_t _In_z_ _Printf_format_string_ const char _In_ const struct tm _In_opt_ _locale_t _Locale
Definition: time.h:159
_UCRT_DISABLE_CLANG_WARNINGS _CRT_BEGIN_C_HEADER _Check_return_wat_ _In_ size_t _BufferCount
Definition: conio.h:25
#define _DCRTIMP
Definition: corecrt.h:154
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_2_0(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _HType1, _HArg1, _HType2, _HArg2, _SalAttributeDst, _DstType, _Dst)
Definition: corecrt.h:860
#define __RETURN_POLICY_VOID(_FunctionCall)
Definition: corecrt.h:1893
#define __RETURN_POLICY_DST(_FunctionCall)
Definition: corecrt.h:1892
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_1_1(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _HType1, _HArg1, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1)
Definition: corecrt.h:857
#define _CRTALLOCATOR
Definition: corecrt.h:167
#define _UCRT_DISABLE_CLANG_WARNINGS
Definition: corecrt.h:109
#define _UCRT_RESTORE_CLANG_WARNINGS
Definition: corecrt.h:117
#define _Check_return_wat_
Definition: corecrt.h:230
#define __DEFINE_CPP_OVERLOAD_STANDARD_FUNC_0_4(_ReturnType, _ReturnPolicy, _DeclSpec, _FuncName, _SalAttributeDst, _DstType, _Dst, _TType1, _TArg1, _TType2, _TArg2, _TType3, _TArg3, _TType4, _TArg4)
Definition: corecrt.h:854
_String
_In_ _Value
_Pre_notnull_ _In_opt_z_ char const _In_opt_z_ char const _In_opt_z_ char const _Filename
Definition: stdlib.h:1100
_In_ _Pre_notnull_ _Buffer
Definition: stdlib.h:644
_Pre_notnull_ _In_opt_z_ char const _In_opt_z_ char const _Dir
Definition: stdlib.h:1099
_Pre_notnull_ _In_opt_z_ char const _Drive
Definition: stdlib.h:1098
_In_z_ char const * _Path
Definition: stdlib.h:1070
_In_ size_t _In_ int _Radix
Definition: stdlib.h:631
long double __cdecl _wcstold_l(wchar_t const *const string, wchar_t **const end_ptr, _locale_t const locale)
Definition: strtod.cpp:157
#define _CRT_END_C_HEADER
Definition: vcruntime.h:42
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:40
#define _CRT_INSECURE_DEPRECATE(_Replacement)
Definition: vcruntime.h:99
#define const
Definition: zconf.h:233