ReactOS 0.4.15-dev-7674-gc0b4db1
wchar_s.h
Go to the documentation of this file.
1
7#ifndef _INC_WCHAR_S
8#define _INC_WCHAR_S
9
10#include <wchar.h>
11
12#if defined(MINGW_HAS_SECURE_API)
13
14#ifdef __cplusplus
15extern "C" {
16#endif
17
18#ifndef _WIO_S_DEFINED
19#define _WIO_S_DEFINED
20
26 _In_z_ const wchar_t *_Filename,
27 _In_ int _AccessMode);
28
32 _wmktemp_s(
33 _Inout_updates_z_(_SizeInWords) wchar_t *_TemplateName,
34 _In_ size_t _SizeInWords);
35
36#endif /* _WIO_S_DEFINED */
37
38#ifndef _WCONIO_S_DEFINED
39#define _WCONIO_S_DEFINED
40
45 _cgetws_s(
46 _Out_writes_to_(_SizeInWords, *_SizeRead) wchar_t *_Buffer,
47 _In_ size_t _SizeInWords,
48 _Out_ size_t *_SizeRead);
49
52 int
54 _cwprintf_s(
56 ...);
57
60 int
62 _cwscanf_s(
64 ...);
65
68 int
70 _cwscanf_s_l(
73 ...);
74
77 int
79 _vcwprintf_s(
81 va_list _ArgList);
82
84 int
86 _cwprintf_s_l(
89 ...);
90
92 int
94 _vcwprintf_s_l(
97 va_list _ArgList);
98
99#endif /* _WCONIO_S_DEFINED */
100
101#ifndef _WSTDIO_S_DEFINED
102#define _WSTDIO_S_DEFINED
103
105 _CRTIMP
106 wchar_t *
107 __cdecl
108 _getws_s(
109 _Out_writes_z_(_SizeInWords) wchar_t *_Str,
110 _In_ size_t _SizeInWords);
111
113 int
114 __cdecl
116 _Inout_ FILE *_File,
118 ...);
119
121 int
122 __cdecl
123 wprintf_s(
125 ...);
126
128 int
129 __cdecl
131 _Inout_ FILE *_File,
133 va_list _ArgList);
134
136 int
137 __cdecl
140 va_list _ArgList);
141
142 int
143 __cdecl
144 swprintf_s(
145 _Out_writes_z_(_SizeInWords) wchar_t *_Dst,
146 _In_ size_t _SizeInWords,
148 ...);
149
150 int
151 __cdecl
152 vswprintf_s(
153 _Out_writes_z_(_SizeInWords) wchar_t *_Dst,
154 _In_ size_t _SizeInWords,
156 va_list _ArgList);
157
159 _CRTIMP
160 int
161 __cdecl
162 _snwprintf_s(
163 _Out_writes_z_(_DstSizeInWords) wchar_t *_DstBuf,
164 _In_ size_t _DstSizeInWords,
165 _In_ size_t _MaxCount,
167 ...);
168
170 _CRTIMP
171 int
172 __cdecl
173 _vsnwprintf_s(
174 _Out_writes_z_(_DstSizeInWords) wchar_t *_DstBuf,
175 _In_ size_t _DstSizeInWords,
176 _In_ size_t _MaxCount,
178 va_list _ArgList);
179
181 _CRTIMP
182 int
183 __cdecl
184 _wprintf_s_l(
187 ...);
188
190 _CRTIMP
191 int
192 __cdecl
193 _vwprintf_s_l(
196 va_list _ArgList);
197
199 _CRTIMP
200 int
201 __cdecl
202 _fwprintf_s_l(
203 _Inout_ FILE *_File,
206 ...);
207
209 _CRTIMP
210 int
211 __cdecl
212 _vfwprintf_s_l(
213 _Inout_ FILE *_File,
216 va_list _ArgList);
217
219 _CRTIMP
220 int
221 __cdecl
222 _swprintf_s_l(
223 _Out_writes_z_(_DstSize) wchar_t *_DstBuf,
224 _In_ size_t _DstSize,
227 ...);
228
230 _CRTIMP
231 int
232 __cdecl
233 _vswprintf_s_l(
234 _Out_writes_z_(_DstSize) wchar_t *_DstBuf,
235 _In_ size_t _DstSize,
238 va_list _ArgList);
239
241 _CRTIMP
242 int
243 __cdecl
244 _snwprintf_s_l(
245 _Out_writes_z_(_DstSize) wchar_t *_DstBuf,
246 _In_ size_t _DstSize,
247 _In_ size_t _MaxCount,
250 ...);
251
253 _CRTIMP
254 int
255 __cdecl
256 _vsnwprintf_s_l(
257 _Out_writes_z_(_DstSize) wchar_t *_DstBuf,
258 _In_ size_t _DstSize,
259 _In_ size_t _MaxCount,
262 va_list _ArgList);
263
265 _CRTIMP
266 int
267 __cdecl
268 _fwscanf_s_l(
269 _Inout_ FILE *_File,
272 ...);
273
275 _CRTIMP
276 int
277 __cdecl
278 _swscanf_s_l(
279 _In_z_ const wchar_t *_Src,
282 ...);
283
285 _CRTIMP
286 int
287 __cdecl
288 _snwscanf_s(
289 _In_reads_(_MaxCount) _Pre_z_ const wchar_t *_Src,
290 _In_ size_t _MaxCount,
292 ...);
293
295 _CRTIMP
296 int
297 __cdecl
298 _snwscanf_s_l(
299 _In_reads_(_MaxCount) _Pre_z_ const wchar_t *_Src,
300 _In_ size_t _MaxCount,
303 ...);
304
306 _CRTIMP
307 int
308 __cdecl
309 _wscanf_s_l(
312 ...);
313
315 _CRTIMP
316 errno_t
317 __cdecl
318 _wfopen_s(
320 _In_z_ const wchar_t *_Filename,
321 _In_z_ const wchar_t *_Mode);
322
324 _CRTIMP
325 errno_t
326 __cdecl
327 _wfreopen_s(
329 _In_z_ const wchar_t *_Filename,
330 _In_z_ const wchar_t *_Mode,
331 _Inout_ FILE *_OldFile);
332
334 _CRTIMP
335 errno_t
336 __cdecl
337 _wtmpnam_s(
338 _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
339 _In_ size_t _SizeInWords);
340
341#endif /* _WSTDIO_S_DEFINED */
342
343#ifndef _WSTDLIB_S_DEFINED
344#define _WSTDLIB_S_DEFINED
345
347 _CRTIMP
348 errno_t
349 __cdecl
350 _itow_s(
351 _In_ int _Val,
352 _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
353 _In_ size_t _SizeInWords,
354 _In_ int _Radix);
355
357 _CRTIMP
358 errno_t
359 __cdecl
360 _ltow_s(
361 _In_ long _Val,
362 _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
363 _In_ size_t _SizeInWords,
364 _In_ int _Radix);
365
367 _CRTIMP
368 errno_t
369 __cdecl
370 _ultow_s(
371 _In_ unsigned long _Val,
372 _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
373 _In_ size_t _SizeInWords,
374 _In_ int _Radix);
375
377 _CRTIMP
378 errno_t
379 __cdecl
380 _wgetenv_s(
381 _Out_ size_t *_ReturnSize,
382 _Out_writes_z_(_DstSizeInWords) wchar_t *_DstBuf,
383 _In_ size_t _DstSizeInWords,
384 _In_z_ const wchar_t *_VarName);
385
387 _CRTIMP
388 errno_t
389 __cdecl
390 _wdupenv_s(
391 _Outptr_result_buffer_maybenull_(*_BufferSizeInWords) _Deref_post_z_ wchar_t **_Buffer,
392 _Out_opt_ size_t *_BufferSizeInWords,
393 _In_z_ const wchar_t *_VarName);
394
396 _CRTIMP
397 errno_t
398 __cdecl
399 _i64tow_s(
401 _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
402 _In_ size_t _SizeInWords,
403 _In_ int _Radix);
404
406 _CRTIMP
407 errno_t
408 __cdecl
410 _In_ unsigned __int64 _Val,
411 _Out_writes_z_(_SizeInWords) wchar_t *_DstBuf,
412 _In_ size_t _SizeInWords,
413 _In_ int _Radix);
414
415#endif /* _WSTDLIB_S_DEFINED */
416
417#ifndef _POSIX_
418#ifndef _WSTDLIBP_S_DEFINED
419#define _WSTDLIBP_S_DEFINED
420
422 _CRTIMP
423 errno_t
424 __cdecl
426 _Out_writes_z_(_SizeInBytes) wchar_t *_PathResult,
427 _In_ size_t _SizeInWords,
428 _In_opt_z_ const wchar_t *_Drive,
429 _In_opt_z_ const wchar_t *_Dir,
430 _In_opt_z_ const wchar_t *_Filename,
431 _In_opt_z_ const wchar_t *_Ext);
432
434 _CRTIMP
435 errno_t
436 __cdecl
437 _wputenv_s(
438 _In_z_ const wchar_t *_Name,
439 _In_z_ const wchar_t *_Value);
440
441 _CRTIMP
442 errno_t
443 __cdecl
444 _wsearchenv_s(
445 _In_z_ const wchar_t *_Filename,
446 _In_z_ const wchar_t *_EnvVar,
447 _Out_writes_z_(_SizeInWords) wchar_t *_ResultPath,
448 _In_ size_t _SizeInWords);
449
450 _CRTIMP
451 errno_t
452 __cdecl
454 _In_z_ const wchar_t *_FullPath,
455 _Out_writes_opt_z_(_DriveSizeInWords) wchar_t *_Drive,
456 _In_ size_t _DriveSizeInWords,
457 _Out_writes_opt_z_(_DirSizeInWords) wchar_t *_Dir,
458 _In_ size_t _DirSizeInWords,
459 _Out_writes_opt_z_(_FilenameSizeInWords) wchar_t *_Filename,
460 _In_ size_t _FilenameSizeInWords,
461 _Out_writes_opt_z_(_ExtSizeInWords) wchar_t *_Ext,
462 _In_ size_t _ExtSizeInWords);
463
464#endif /* _WSTDLIBP_S_DEFINED */
465#endif /* _POSIX_ */
466
467#ifndef _WSTRING_S_DEFINED
468#define _WSTRING_S_DEFINED
469
471 _CRTIMP
472 wchar_t *
473 __cdecl
474 wcstok_s(
475 _Inout_opt_z_ wchar_t *_Str,
476 _In_z_ const wchar_t *_Delim,
477 _Inout_ _Deref_prepost_opt_z_ wchar_t **_Context);
478
480 _CRTIMP
481 errno_t
482 __cdecl
484 _Out_writes_opt_z_(_SizeInWords) wchar_t *_Buf,
485 _In_ size_t _SizeInWords,
486 _In_ int _ErrNum);
487
489 _CRTIMP
490 errno_t
491 __cdecl
493 _Out_writes_opt_z_(_SizeInWords) wchar_t *_Buffer,
494 _In_ size_t _SizeInWords,
495 _In_z_ const wchar_t *_ErrMsg);
496
498 _CRTIMP
499 errno_t
500 __cdecl
502 _Inout_updates_z_(_DstSizeInWords) wchar_t *_Dst,
503 _In_ size_t _DstSizeInWords,
504 wchar_t _Val,
505 _In_ size_t _MaxCount);
506
508 _CRTIMP
509 errno_t
510 __cdecl
511 _wcsset_s(
512 _Inout_updates_z_(_SizeInWords) wchar_t *_Str,
513 _In_ size_t _SizeInWords,
514 wchar_t _Val);
515
517 _CRTIMP
518 errno_t
519 __cdecl
520 _wcslwr_s(
521 _Inout_updates_z_(_SizeInWords) wchar_t *_Str,
522 _In_ size_t _SizeInWords);
523
525 _CRTIMP
526 errno_t
527 __cdecl
529 _Inout_updates_z_(_SizeInWords) wchar_t *_Str,
530 _In_ size_t _SizeInWords,
532
534 _CRTIMP
535 errno_t
536 __cdecl
537 _wcsupr_s(
538 _Inout_updates_z_(_Size) wchar_t *_Str,
539 _In_ size_t _Size);
540
542 _CRTIMP
543 errno_t
544 __cdecl
546 _Inout_updates_z_(_Size) wchar_t *_Str,
547 _In_ size_t _Size,
549
551 _CRTIMP
552 errno_t
553 __cdecl
554 wcsncat_s(
555 _Inout_updates_z_(_DstSizeInChars) wchar_t *_Dst,
556 _In_ size_t _DstSizeInChars,
557 _In_z_ const wchar_t *_Src,
558 _In_ size_t _MaxCount);
559
561 _CRTIMP
562 errno_t
563 __cdecl
564 _wcsncat_s_l(
565 _Inout_updates_z_(_DstSizeInChars) wchar_t *_Dst,
566 _In_ size_t _DstSizeInChars,
567 _In_z_ const wchar_t *_Src,
568 _In_ size_t _MaxCount,
570
572 _CRTIMP
573 errno_t
574 __cdecl
575 wcsncpy_s(
576 _Out_writes_z_(_DstSizeInChars) wchar_t *_Dst,
577 _In_ size_t _DstSizeInChars,
578 _In_z_ const wchar_t *_Src,
579 _In_ size_t _MaxCount);
580
582 _CRTIMP
583 errno_t
584 __cdecl
585 _wcsncpy_s_l(
586 _Out_writes_z_(_DstSizeInChars) wchar_t *_Dst,
587 _In_ size_t _DstSizeInChars,
588 _In_z_ const wchar_t *_Src,
589 _In_ size_t _MaxCount,
591
592 _CRTIMP
593 wchar_t *
594 __cdecl
595 _wcstok_s_l(
596 wchar_t *_Str,
597 const wchar_t *_Delim,
598 wchar_t **_Context,
600
601 _CRTIMP
602 errno_t
603 __cdecl
604 _wcsset_s_l(
605 wchar_t *_Str,
606 size_t _SizeInChars,
607 unsigned int _Val,
609
610 _CRTIMP
611 errno_t
612 __cdecl
613 _wcsnset_s_l(
614 wchar_t *_Str,
615 size_t _SizeInChars,
616 unsigned int _Val,
617 size_t _Count,
619
620#endif /* _WSTRING_S_DEFINED */
621
622#ifndef _WTIME_S_DEFINED
623#define _WTIME_S_DEFINED
624
625 _CRTIMP
626 errno_t
627 __cdecl
630 _In_ size_t _SizeInWords,
631 _In_ const struct tm *_Tm);
632
633 _CRTIMP
634 errno_t
635 __cdecl
638 _In_ size_t _SizeInWords,
639 _In_ const __time32_t *_Time);
640
641 _CRTIMP
642 errno_t
643 __cdecl
646 _In_range_(>= , 9) size_t _SizeInWords);
647
648 _CRTIMP
649 errno_t
650 __cdecl
653 _In_ size_t _SizeInWords);
654
655 _CRTIMP
656 errno_t
657 __cdecl
658 _wctime64_s(
660 _In_ size_t _SizeInWords,
661 _In_ const __time64_t *_Time);
662
663#if !defined (RC_INVOKED) && !defined (_INC_WTIME_S_INL)
664#define _INC_WTIME_S_INL
665 errno_t __cdecl _wctime_s(wchar_t *, size_t, const time_t *);
666#ifndef _USE_32BIT_TIME_T
667__CRT_INLINE errno_t __cdecl _wctime_s(wchar_t *_Buffer,size_t _SizeInWords,const time_t *_Time) { return _wctime64_s(_Buffer,_SizeInWords,_Time); }
668#endif
669#endif
670
671#endif /* _WTIME_S_DEFINED */
672
673 _CRTIMP
674 errno_t
675 __cdecl
676 mbsrtowcs_s(
677 _Out_opt_ size_t *_Retval,
678 _Out_writes_opt_z_(_SizeInWords) wchar_t *_Dst,
679 _In_ size_t _SizeInWords,
680 _Inout_ _Deref_prepost_opt_valid_ const char **_PSrc,
681 _In_ size_t _N,
682 _Out_opt_ mbstate_t *_State);
683
684 _CRTIMP
685 errno_t
686 __cdecl
687 wcrtomb_s(
688 _Out_opt_ size_t *_Retval,
690 _In_ size_t _SizeInBytes,
691 _In_ wchar_t _Ch,
692 _Out_opt_ mbstate_t *_State);
693
694 _CRTIMP
695 errno_t
696 __cdecl
697 wcsrtombs_s(
698 _Out_opt_ size_t *_Retval,
699 _Out_writes_bytes_to_opt_(_SizeInBytes, *_Retval) char *_Dst,
700 _In_ size_t _SizeInBytes,
701 _Inout_ _Deref_prepost_z_ const wchar_t **_Src,
702 _In_ size_t _Size,
703 _Out_opt_ mbstate_t *_State);
704
705#ifdef __cplusplus
706}
707#endif
708
709#endif /* MINGW_HAS_SECURE_API */
710
711#endif /* _INC_WCHAR_S */
#define __cdecl
Definition: accygwin.h:79
char * va_list
Definition: acmsvcex.h:78
#define __int64
Definition: basetyps.h:16
int _Value
Definition: setjmp.h:214
#define _Check_return_opt_
Definition: crtdefs.h:453
#define _Check_return_wat_
Definition: crtdefs.h:459
#define _CRTIMP
Definition: crtdefs.h:72
long __time32_t
Definition: crtdefs.h:379
int errno_t
Definition: crtdefs.h:374
_Check_return_wat_ _CRTIMP errno_t __cdecl _wcsupr_s_l(_Inout_updates_z_(_Size) wchar_t *str, _In_ size_t size, _In_opt_ _locale_t locale)
Definition: stubs.c:897
_Check_return_wat_ _CRTIMP errno_t __cdecl _wcsnset_s(_Inout_updates_z_(_DstSizeInWords) wchar_t *dst, _In_ size_t sizeInWords, _In_ wchar_t val, _In_ size_t maxCount)
Definition: stubs.c:870
_Check_return_wat_ _CRTIMP errno_t __cdecl _wcsset_s(_Inout_updates_z_(_SizeInWords) wchar_t *str, _In_ size_t sizeInWords, _In_ wchar_t val)
Definition: stubs.c:884
_Check_return_wat_ _CRTIMP errno_t __cdecl _wcslwr_s_l(_Inout_updates_z_(sizeInWords) wchar_t *str, _In_ size_t sizeInWords, _In_opt_ _locale_t locale)
Definition: stubs.c:771
_Check_return_wat_ _CRTIMP errno_t __cdecl _wcslwr_s(_Inout_updates_z_(sizeInWords) wchar_t *str, _In_ size_t sizeInWords)
Definition: stubs.c:760
__kernel_time_t time_t
Definition: linux.h:252
int __cdecl fwprintf_s(FILE *file, const wchar_t *format,...)
Definition: fwprintf_s.c:16
_CRTIMP errno_t __cdecl _wctime32_s(_Out_writes_(_SizeInWords) _Post_readable_size_(26) wchar_t *_Buf, _In_ size_t _SizeInWords, _In_ const __time32_t *_Time)
_N
Definition: wchar.h:2478
int CDECL _ui64tow_s(unsigned __int64 value, wchar_t *str, size_t size, int radix)
Definition: itow.c:172
int CDECL _i64tow_s(__int64 value, wchar_t *str, size_t size, int radix)
Definition: itow.c:61
int CDECL _ltow_s(long value, wchar_t *str, size_t size, int radix)
Definition: itow.c:276
int CDECL _itow_s(int value, wchar_t *str, size_t size, int radix)
Definition: itow.c:222
_Check_return_ _Ret_maybenull_ _In_ size_t _Count
Definition: malloc.h:108
_Check_return_ _Ret_maybenull_ _In_ size_t _In_ size_t _Size
Definition: malloc.h:109
#define _wsplitpath_s(f, d, dl, p, pl, n, nl, e, el)
Definition: utility.h:211
#define wcsncpy_s(d, l, s, n)
Definition: utility.h:202
#define _Out_opt_
Definition: ms_sal.h:346
#define _Inout_
Definition: ms_sal.h:378
#define _Out_writes_z_(size)
Definition: ms_sal.h:352
#define _Deref_post_z_
Definition: ms_sal.h:1121
#define _Deref_prepost_opt_z_
Definition: ms_sal.h:1424
#define _Outptr_result_maybenull_
Definition: ms_sal.h:428
#define _In_z_
Definition: ms_sal.h:313
#define _Check_return_
Definition: ms_sal.h:557
#define _In_opt_z_
Definition: ms_sal.h:314
#define _Deref_prepost_opt_valid_
Definition: ms_sal.h:1462
#define _Scanf_s_format_string_
Definition: ms_sal.h:563
#define _Deref_prepost_z_
Definition: ms_sal.h:1423
#define _Out_writes_(size)
Definition: ms_sal.h:348
#define _Inout_updates_z_(size)
Definition: ms_sal.h:389
#define _Out_writes_opt_z_(size)
Definition: ms_sal.h:353
#define _Out_
Definition: ms_sal.h:345
#define _Out_writes_bytes_to_opt_(size, count)
Definition: ms_sal.h:361
#define _In_
Definition: ms_sal.h:308
#define _In_opt_
Definition: ms_sal.h:309
#define _Post_readable_size_(size)
Definition: ms_sal.h:649
#define _Pre_z_
Definition: ms_sal.h:668
#define _Inout_opt_z_
Definition: ms_sal.h:384
#define _Out_writes_to_(size, count)
Definition: ms_sal.h:355
#define _Outptr_result_buffer_maybenull_(size)
Definition: ms_sal.h:464
#define _In_range_(lb, ub)
Definition: ms_sal.h:571
#define _Printf_format_string_
Definition: ms_sal.h:561
#define _In_reads_(size)
Definition: ms_sal.h:319
_MaxCount
Definition: memory.h:72
_In_ int _Val
Definition: memory.h:91
_Check_return_ wchar_t _Ch
Definition: string.h:640
_In_ size_t _In_z_ _Printf_format_string_ const char _In_ const struct tm * _Tm
Definition: time.h:148
_CRTIMP errno_t __cdecl _wstrdate_s(_Out_writes_(_SizeInWords) _Post_readable_size_(9) wchar_t *_Buf, _In_ size_t _SizeInWords)
_CRTIMP errno_t __cdecl _wasctime_s(_Out_writes_(_SizeInWords) _Post_readable_size_(26) wchar_t *_Buf, _In_range_(>=, 26) size_t _SizeInWords, _In_ const struct tm *_Tm)
_In_ size_t _In_ const __time32_t * _Time
Definition: time.h:192
_In_ size_t _SizeInBytes
Definition: time.h:146
_CRTIMP errno_t __cdecl _wstrtime_s(_Out_writes_(_SizeInWords) _Post_readable_size_(9) wchar_t *_Buf, _In_range_(>=, 9) size_t _SizeInWords)
_In_ size_t _In_z_ _Printf_format_string_ const char * _Format
Definition: time.h:147
_In_ size_t _SizeInWords
Definition: time.h:309
_In_ size_t _In_z_ _Printf_format_string_ const char _In_ const struct tm _In_opt_ _locale_t _Locale
Definition: time.h:159
int CDECL _waccess_s(const wchar_t *filename, int mode)
Definition: file.c:749
int CDECL _wfopen_s(FILE **pFile, const wchar_t *filename, const wchar_t *mode)
Definition: file.c:3282
int CDECL __wcserror_s(wchar_t *buffer, size_t nc, const wchar_t *str)
Definition: strerror.c:194
int CDECL _wcserror_s(wchar_t *buffer, size_t nc, int err)
Definition: strerror.c:166
Definition: time.h:68
int __cdecl vfwprintf_s(FILE *file, const wchar_t *format, va_list argptr)
Definition: vfwprintf_s.c:20
int __cdecl vwprintf_s(const wchar_t *format, va_list valist)
Definition: vwprintf_s.c:16
INT CDECL wcsncat_s(wchar_t *dst, size_t elem, const wchar_t *src, size_t count)
Definition: wcs.c:432
INT CDECL _wcsupr_s(wchar_t *str, size_t n)
Definition: wcs.c:115
wchar_t *CDECL wcstok_s(wchar_t *str, const wchar_t *delim, wchar_t **next_token)
Definition: wcstok.c:8
int CDECL _wmakepath_s(wchar_t *path, size_t size, const wchar_t *drive, const wchar_t *directory, const wchar_t *filename, const wchar_t *extension)
Definition: wmakpath_s.c:23
int __cdecl wprintf_s(const wchar_t *format,...)
Definition: wprintf_s.c:16