STLdoc
STLdocumentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
corecrt_wconio.h
Go to the documentation of this file.
1 //
2 // corecrt_wconio.h
3 //
4 // Copyright (c) Microsoft Corporation. All rights reserved.
5 //
6 // This file declares the wide character (wchar_t) console I/O functionality,
7 // shared by both <conio.h> and <wchar.h>
8 //
9 #pragma once
10 
11 #include <corecrt.h>
12 #include <corecrt_stdio_config.h>
13 
15 
16 
17 
18 #define WEOF ((wint_t)(0xFFFF))
19 
20 
21 
22 #ifdef _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
23 
26  _DCRTIMP errno_t __cdecl _cgetws_s(
28  _In_ size_t _BufferCount,
29  _Out_ size_t* _SizeRead
30  );
31 
33  _Success_(return == 0)
34  errno_t, _cgetws_s,
35  _Out_writes_z_(*_Buffer) wchar_t, _Buffer,
36  _In_ size_t*, _SizeRead
37  )
38 
40  _DCRTIMP int __cdecl _cputws(
41  _In_z_ wchar_t const* _Buffer
42  );
43 
44  _Check_return_ _DCRTIMP wint_t __cdecl _getwch (void);
45  _Check_return_ _DCRTIMP wint_t __cdecl _getwche (void);
46  _Check_return_opt_ _DCRTIMP wint_t __cdecl _putwch (_In_ wchar_t _Character);
48 
51  _Check_return_opt_ _DCRTIMP wint_t __cdecl _putwch_nolock (_In_ wchar_t _Character);
53 
54 
55 
56  //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
57  //
58  // Wide Character Formatted Output Functions (Console)
59  //
60  //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
63  _In_ unsigned __int64 _Options,
67  );
68 
71  _In_ unsigned __int64 _Options,
72  _In_z_ _Printf_format_string_params_(2) wchar_t const* _Format,
73  _In_opt_ _locale_t _Locale,
74  va_list _ArgList
75  );
76 
79  _In_ unsigned __int64 _Options,
80  _In_z_ _Printf_format_string_params_(2) wchar_t const* _Format,
81  _In_opt_ _locale_t _Locale,
82  va_list _ArgList
83  );
84 
87  _In_z_ _Printf_format_string_params_(2) wchar_t const* const _Format,
88  _In_opt_ _locale_t const _Locale,
89  va_list _ArgList
90  )
91 #if defined _NO_CRT_STDIO_INLINE
92 ;
93 #else
94  {
95  return __conio_common_vcwprintf(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Format, _Locale, _ArgList);
96  }
97 #endif
98 
101  _In_z_ _Printf_format_string_ wchar_t const* const _Format,
102  va_list _ArgList
103  )
104 #if defined _NO_CRT_STDIO_INLINE
105 ;
106 #else
107  {
108  return _vcwprintf_l(_Format, NULL, _ArgList);
109  }
110 #endif
111 
114  _In_z_ _Printf_format_string_params_(2) wchar_t const* const _Format,
115  _In_opt_ _locale_t const _Locale,
116  va_list _ArgList
117  )
118 #if defined _NO_CRT_STDIO_INLINE
119 ;
120 #else
121  {
122  return __conio_common_vcwprintf_s(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Format, _Locale, _ArgList);
123  }
124 #endif
125 
128  _In_z_ _Printf_format_string_ wchar_t const* const _Format,
129  va_list _ArgList
130  )
131 #if defined _NO_CRT_STDIO_INLINE
132 ;
133 #else
134  {
135  return _vcwprintf_s_l(_Format, NULL, _ArgList);
136  }
137 #endif
138 
141  _In_z_ _Printf_format_string_params_(2) wchar_t const* const _Format,
142  _In_opt_ _locale_t const _Locale,
143  va_list _ArgList
144  )
145 #if defined _NO_CRT_STDIO_INLINE
146 ;
147 #else
148  {
149  return __conio_common_vcwprintf_p(_CRT_INTERNAL_LOCAL_PRINTF_OPTIONS, _Format, _Locale, _ArgList);
150  }
151 #endif
152 
155  _In_z_ _Printf_format_string_ const wchar_t* const _Format,
156  va_list _ArgList
157  )
158 #if defined _NO_CRT_STDIO_INLINE
159 ;
160 #else
161  {
162  return _vcwprintf_p_l(_Format, NULL, _ArgList);
163  }
164 #endif
165 
168  _In_z_ _Printf_format_string_params_(0) wchar_t const* const _Format,
169  _In_opt_ _locale_t const _Locale,
170  ...)
171 #if defined _NO_CRT_STDIO_INLINE
172 ;
173 #else
174  {
175  int _Result;
177  __crt_va_start(_ArgList, _Locale);
178  _Result = _vcwprintf_l(_Format, _Locale, _ArgList);
179  __crt_va_end(_ArgList);
180  return _Result;
181  }
182 #endif
183 
186  _In_z_ _Printf_format_string_ wchar_t const* const _Format,
187  ...)
188 #if defined _NO_CRT_STDIO_INLINE
189 ;
190 #else
191  {
192  int _Result;
194  __crt_va_start(_ArgList, _Format);
195  _Result = _vcwprintf_l(_Format, NULL, _ArgList);
196  __crt_va_end(_ArgList);
197  return _Result;
198  }
199 #endif
200 
203  _In_z_ _Printf_format_string_params_(0) wchar_t const* const _Format,
204  _In_opt_ _locale_t const _Locale,
205  ...)
206 #if defined _NO_CRT_STDIO_INLINE
207 ;
208 #else
209  {
210  int _Result;
212  __crt_va_start(_ArgList, _Locale);
213  _Result = _vcwprintf_s_l(_Format, _Locale, _ArgList);
214  __crt_va_end(_ArgList);
215  return _Result;
216  }
217 #endif
218 
221  _In_z_ _Printf_format_string_ wchar_t const* const _Format,
222  ...)
223 #if defined _NO_CRT_STDIO_INLINE
224 ;
225 #else
226  {
227  int _Result;
229  __crt_va_start(_ArgList, _Format);
230  _Result = _vcwprintf_s_l(_Format, NULL, _ArgList);
231  __crt_va_end(_ArgList);
232  return _Result;
233  }
234 #endif
235 
238  _In_z_ _Printf_format_string_params_(0) wchar_t const* const _Format,
239  _In_opt_ _locale_t const _Locale,
240  ...)
241 #if defined _NO_CRT_STDIO_INLINE
242 ;
243 #else
244  {
245  int _Result;
247  __crt_va_start(_ArgList, _Locale);
248  _Result = _vcwprintf_p_l(_Format, _Locale, _ArgList);
249  __crt_va_end(_ArgList);
250  return _Result;
251  }
252 #endif
253 
256  _In_z_ _Printf_format_string_ wchar_t const* const _Format,
257  ...)
258 #if defined _NO_CRT_STDIO_INLINE
259 ;
260 #else
261  {
262  int _Result;
264  __crt_va_start(_ArgList, _Format);
265  _Result = _vcwprintf_p_l(_Format, NULL, _ArgList);
266  __crt_va_end(_ArgList);
267  return _Result;
268  }
269 #endif
270 
271 
272 
273  //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
274  //
275  // Wide Character Formatted Input Functions (Console)
276  //
277  //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
279  _DCRTIMP int __cdecl __conio_common_vcwscanf(
280  _In_ unsigned __int64 _Options,
281  _In_z_ _Scanf_format_string_params_(2) wchar_t const* _Format,
282  _In_opt_ _locale_t _Locale,
283  va_list _ArgList
284  );
285 
287  _CRT_STDIO_INLINE int __CRTDECL _vcwscanf_l(
288  _In_z_ _Scanf_format_string_params_(2) wchar_t const* const _Format,
289  _In_opt_ _locale_t const _Locale,
290  va_list _ArgList
291  )
292 #if defined _NO_CRT_STDIO_INLINE
293 ;
294 #else
295  {
298  _Format, _Locale, _ArgList);
299  }
300 #endif
301 
303  _CRT_STDIO_INLINE int __CRTDECL _vcwscanf(
304  _In_z_ _Scanf_format_string_params_(1) wchar_t const* const _Format,
305  va_list _ArgList
306  )
307 #if defined _NO_CRT_STDIO_INLINE
308 ;
309 #else
310  {
311  #pragma warning(push)
312  #pragma warning(disable: 4996) // Deprecation
313  return _vcwscanf_l(_Format, NULL, _ArgList);
314  #pragma warning(pop)
315  }
316 #endif
317 
320  _In_z_ _Scanf_format_string_params_(2) wchar_t const* const _Format,
321  _In_opt_ _locale_t const _Locale,
322  va_list _ArgList
323  )
324 #if defined _NO_CRT_STDIO_INLINE
325 ;
326 #else
327  {
330  _Format, _Locale, _ArgList);
331  }
332 #endif
333 
336  _In_z_ _Scanf_format_string_params_(1) wchar_t const* const _Format,
337  va_list _ArgList
338  )
339 #if defined _NO_CRT_STDIO_INLINE
340 ;
341 #else
342  {
343  return _vcwscanf_s_l(_Format, NULL, _ArgList);
344  }
345 #endif
346 
348  _CRT_STDIO_INLINE int __CRTDECL _cwscanf_l(
349  _In_z_ _Scanf_format_string_params_(0) wchar_t const* const _Format,
350  _In_opt_ _locale_t const _Locale,
351  ...)
352 #if defined _NO_CRT_STDIO_INLINE
353 ;
354 #else
355  {
356  int _Result;
358  __crt_va_start(_ArgList, _Locale);
359 
360  #pragma warning(push)
361  #pragma warning(disable: 4996) // Deprecation
362  _Result = _vcwscanf_l(_Format, _Locale, _ArgList);
363  #pragma warning(pop)
364 
365  __crt_va_end(_ArgList);
366  return _Result;
367  }
368 #endif
369 
371  _CRT_STDIO_INLINE int __CRTDECL _cwscanf(
372  _In_z_ _Scanf_format_string_ wchar_t const* const _Format,
373  ...)
374 #if defined _NO_CRT_STDIO_INLINE
375 ;
376 #else
377  {
378  int _Result;
380  __crt_va_start(_ArgList, _Format);
381 
382  #pragma warning(push)
383  #pragma warning(disable: 4996) // Deprecation
384  _Result = _vcwscanf_l(_Format, NULL, _ArgList);
385  #pragma warning(pop)
386 
387  __crt_va_end(_ArgList);
388  return _Result;
389  }
390 #endif
391 
394  _In_z_ _Scanf_format_string_params_(0) wchar_t const* const _Format,
395  _In_opt_ _locale_t const _Locale,
396  ...)
397 #if defined _NO_CRT_STDIO_INLINE
398 ;
399 #else
400  {
401  int _Result;
403  __crt_va_start(_ArgList, _Locale);
404  _Result = _vcwscanf_s_l(_Format, _Locale, _ArgList);
405  __crt_va_end(_ArgList);
406  return _Result;
407  }
408 #endif
409 
412  _In_z_ _Scanf_format_string_ wchar_t const* const _Format,
413  ...)
414 #if defined _NO_CRT_STDIO_INLINE
415 ;
416 #else
417  {
418  int _Result;
420  __crt_va_start(_ArgList, _Format);
421  _Result = _vcwscanf_s_l(_Format, NULL, _ArgList);
422  __crt_va_end(_ArgList);
423  return _Result;
424  }
425 #endif
426 
427 #endif // _CRT_USE_WINAPI_FAMILY_DESKTOP_APP
428 
429 
430 
#define _Out_
Definition: sal.h:342
_Check_return_ _DCRTIMP wint_t __cdecl _getwche(void)
return
Definition: corecrt_memcpy_s.h:60
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf_l(_In_z_ _Printf_format_string_params_(2) wchar_t const *const _Format, _In_opt_ _locale_t const _Locale, va_list _ArgList)
Definition: corecrt_wconio.h:86
__crt_va_start(_ArgList, _Locale)
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf_s(_In_z_ _Printf_format_string_ wchar_t const *const _Format, va_list _ArgList)
Definition: corecrt_wconio.h:127
Definition: corecrt.h:489
#define _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS
Definition: corecrt_stdio_config.h:104
#define _Out_writes_to_(size, count)
Definition: sal.h:352
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcwscanf_s_l(_In_z_ _Scanf_format_string_params_(2) wchar_t const *const _Format, _In_opt_ _locale_t const _Locale, va_list _ArgList)
Definition: corecrt_wconio.h:319
_Check_return_opt_ _DCRTIMP wint_t __cdecl _putwch_nolock(_In_ wchar_t _Character)
#define _CRT_STDIO_INLINE
Definition: corecrt_stdio_config.h:22
#define _Check_return_opt_
Definition: corecrt.h:96
#define _Out_writes_z_(size)
Definition: sal.h:349
unsigned short wint_t
Definition: corecrt.h:477
_Check_return_opt_ _DCRTIMP int __cdecl __conio_common_vcwprintf(_In_ unsigned __int64 _Options, _In_z_ _Printf_format_string_params_(2) wchar_t const *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList)
_Check_return_opt_ _DCRTIMP wint_t __cdecl _ungetwch_nolock(_In_ wint_t _Character)
int errno_t
Definition: corecrt.h:476
#define _Check_return_wat_
Definition: corecrt.h:102
_Check_return_opt_ _DCRTIMP int __cdecl __conio_common_vcwprintf_s(_In_ unsigned __int64 _Options, _In_z_ _Printf_format_string_params_(2) wchar_t const *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList)
_Check_return_wat_ *_SizeRead wchar_t _In_ size_t _BufferCount
Definition: corecrt_wconio.h:27
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf(_In_z_ _Printf_format_string_ wchar_t const *const _Format, va_list _ArgList)
Definition: corecrt_wconio.h:100
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf_p_l(_In_z_ _Printf_format_string_params_(2) wchar_t const *const _Format, _In_opt_ _locale_t const _Locale, va_list _ArgList)
Definition: corecrt_wconio.h:140
#define _CRT_BEGIN_C_HEADER
Definition: vcruntime.h:73
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf_s_l(_In_z_ _Printf_format_string_params_(2) wchar_t const *const _Format, _In_opt_ _locale_t const _Locale, va_list _ArgList)
Definition: corecrt_wconio.h:113
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cwscanf_s_l(_In_z_ _Scanf_format_string_params_(0) wchar_t const *const _Format, _In_opt_ _locale_t const _Locale,...)
Definition: corecrt_wconio.h:393
_Check_return_ _In_z_ _Scanf_format_string_ wchar_t const *const _Format
Definition: corecrt_wstdio.h:855
#define __CRTDECL
Definition: vcruntime.h:156
_Check_return_opt_ _DCRTIMP wint_t __cdecl _putwch(_In_ wchar_t _Character)
__DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(_Success_(return==0) errno_t, _cgetws_s, _Out_writes_z_(*_Buffer) wchar_t, _Buffer, _In_ size_t *, _SizeRead) _Check_return_opt_ _DCRTIMP int __cdecl _cputws(_In_z_ wchar_t const *_Buffer)
#define _Check_return_
Definition: sal.h:554
#define _In_z_
Definition: sal.h:310
#define _In_
Definition: sal.h:305
_Check_return_opt_ _CRT_INSECURE_DEPRECATE(_vcwscanf_s_l) _CRT_STDIO_INLINE int __CRTDECL _vcwscanf_l(_In_z_ _Scanf_format_string_params_(2) wchar_t const *const _Format
#define _CRT_INTERNAL_LOCAL_SCANF_OPTIONS
Definition: corecrt_stdio_config.h:105
#define _In_opt_
Definition: sal.h:306
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcwprintf_p(_In_z_ _Printf_format_string_ const wchar_t *const _Format, va_list _ArgList)
Definition: corecrt_wconio.h:154
#define _DCRTIMP
Definition: corecrt.h:43
_Check_return_opt_ _DCRTIMP wint_t __cdecl _ungetwch(_In_ wint_t _Character)
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cwscanf_s(_In_z_ _Scanf_format_string_ wchar_t const *const _Format,...)
Definition: corecrt_wconio.h:411
_Check_return_wat_ *_SizeRead wchar_t * _Buffer
Definition: corecrt_wconio.h:27
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cwprintf_s(_In_z_ _Printf_format_string_ wchar_t const *const _Format,...)
Definition: corecrt_wconio.h:220
#define _Printf_format_string_params_(x)
Definition: sal.h:563
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cwprintf(_In_z_ _Printf_format_string_ wchar_t const *const _Format,...)
Definition: corecrt_wconio.h:185
#define _Printf_format_string_
Definition: sal.h:558
__crt_va_end(_ArgList)
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cwprintf_p_l(_In_z_ _Printf_format_string_params_(0) wchar_t const *const _Format, _In_opt_ _locale_t const _Locale,...)
Definition: corecrt_wconio.h:237
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cwprintf_s_l(_In_z_ _Printf_format_string_params_(0) wchar_t const *const _Format, _In_opt_ _locale_t const _Locale,...)
Definition: corecrt_wconio.h:202
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cwprintf_l(_In_z_ _Printf_format_string_params_(0) wchar_t const *const _Format, _In_opt_ _locale_t const _Locale,...)
Definition: corecrt_wconio.h:167
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcwscanf_s(_In_z_ _Scanf_format_string_params_(1) wchar_t const *const _Format, va_list _ArgList)
Definition: corecrt_wconio.h:335
#define _CRT_END_C_HEADER
Definition: vcruntime.h:76
#define _Scanf_format_string_
Definition: sal.h:559
_Check_return_ _DCRTIMP wint_t __cdecl _getwch(void)
_Check_return_opt_ _DCRTIMP int __cdecl __conio_common_vcwscanf(_In_ unsigned __int64 _Options, _In_z_ _Scanf_format_string_params_(2) wchar_t const *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList)
_Check_return_opt_ _DCRTIMP int __cdecl __conio_common_vcwprintf_p(_In_ unsigned __int64 _Options, _In_z_ _Printf_format_string_params_(2) wchar_t const *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList)
_Check_return_wat_ *_SizeRead wchar_t _In_ size_t _Out_ size_t * _SizeRead
Definition: corecrt_wconio.h:27
#define _CRT_INTERNAL_SCANF_SECURECRT
Definition: corecrt_stdio_config.h:116
_Check_return_opt_ _In_opt_ _locale_t const _Locale
Definition: corecrt_wconio.h:289
#define _Scanf_format_string_params_(x)
Definition: sal.h:564
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cwprintf_p(_In_z_ _Printf_format_string_ wchar_t const *const _Format,...)
Definition: corecrt_wconio.h:255
_Check_return_ _DCRTIMP wint_t __cdecl _getwche_nolock(void)
_Check_return_ _DCRTIMP wint_t __cdecl _getwch_nolock(void)
char * va_list
Definition: vadefs.h:39
_Result
Definition: corecrt_wconio.h:362
_Check_return_wat_ _Success_(_BufferCount > 0) _DCRTIMP errno_t __cdecl _cgetws_s(_Out_writes_to_(_BufferCount
#define NULL
Definition: corecrt.h:158
_Check_return_opt_ _In_opt_ _locale_t const va_list _ArgList
Definition: corecrt_wconio.h:295