ReactOS 0.4.16-dev-889-g9563c07
conio.h
Go to the documentation of this file.
1//
2// conio.h
3//
4// Copyright (c) Microsoft Corporation. All rights reserved.
5//
6// This file declares the direct console I/O functions.
7//
8#pragma once
9#ifndef _INC_CONIO // include guard for 3rd party interop
10#define _INC_CONIO
11
12#include <corecrt.h>
13#include <corecrt_wconio.h>
14
15#pragma warning(push)
16#pragma warning(disable: _UCRT_DISABLED_WARNINGS)
18
20
27 );
28
30 _Success_(return == 0)
33 _Out_ size_t*, _SizeRead
34 )
35
38 _In_z_ char const* _Buffer
39 );
40
41 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
42 //
43 // Narrow Character Formatted Output Functions (Console)
44 //
45 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
48 _In_ unsigned __int64 _Options,
52 );
53
56 _In_ unsigned __int64 _Options,
60 );
61
64 _In_ unsigned __int64 _Options,
68 );
69
75 )
76#if defined _NO_CRT_STDIO_INLINE
77;
78#else
79 {
83 }
84#endif
85
88 _In_z_ _Printf_format_string_ char const* const _Format,
90 )
91#if defined _NO_CRT_STDIO_INLINE
92;
93#else
94 {
96 }
97#endif
98
101 _In_z_ _Printf_format_string_params_(2) char const* const _Format,
104 )
105#if defined _NO_CRT_STDIO_INLINE
106;
107#else
108 {
112 }
113#endif
114
117 _In_z_ _Printf_format_string_ char const* const _Format,
119 )
120#if defined _NO_CRT_STDIO_INLINE
121;
122#else
123 {
125 }
126#endif
127
130 _In_z_ _Printf_format_string_params_(2) char const* const _Format,
133 )
134#if defined _NO_CRT_STDIO_INLINE
135;
136#else
137 {
141 }
142#endif
143
146 _In_z_ char const* const _Format,
148 )
149#if defined _NO_CRT_STDIO_INLINE
150;
151#else
152 {
154 }
155#endif
156
159 _In_z_ _Printf_format_string_params_(0) char const* const _Format,
161 ...)
162#if defined _NO_CRT_STDIO_INLINE
163;
164#else
165 {
166 int _Result;
171 return _Result;
172 }
173#endif
174
177 _In_z_ _Printf_format_string_ char const* const _Format,
178 ...)
179#if defined _NO_CRT_STDIO_INLINE
180;
181#else
182 {
183 int _Result;
188 return _Result;
189 }
190#endif
191
194 _In_z_ _Printf_format_string_params_(0) char const* const _Format,
196 ...)
197#if defined _NO_CRT_STDIO_INLINE
198;
199#else
200 {
201 int _Result;
206 return _Result;
207 }
208#endif
209
212 _In_z_ _Printf_format_string_ char const* const _Format,
213 ...)
214#if defined _NO_CRT_STDIO_INLINE
215;
216#else
217 {
218 int _Result;
223 return _Result;
224 }
225#endif
226
229 _In_z_ _Printf_format_string_params_(0) char const* const _Format,
231 ...)
232#if defined _NO_CRT_STDIO_INLINE
233;
234#else
235 {
236 int _Result;
241 return _Result;
242 }
243#endif
244
247 _In_z_ _Printf_format_string_ char const* const _Format,
248 ...)
249#if defined _NO_CRT_STDIO_INLINE
250;
251#else
252 {
253 int _Result;
258 return _Result;
259 }
260#endif
261
262
263 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
264 //
265 // Narrow Character Formatted Input Functions (Console)
266 //
267 //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
270 _In_ unsigned __int64 _Options,
274 );
275
277 _CRT_STDIO_INLINE int __CRTDECL _vcscanf_l(
278 _In_z_ _Scanf_format_string_params_(2) char const* const _Format,
281 )
282#if defined _NO_CRT_STDIO_INLINE
283;
284#else
285 {
289 }
290#endif
291
293 _CRT_STDIO_INLINE int __CRTDECL _vcscanf(
294 _In_z_ _Scanf_format_string_params_(1) char const* const _Format,
296 )
297#if defined _NO_CRT_STDIO_INLINE
298;
299#else
300 {
301 return _vcscanf_l(_Format, NULL, _ArgList);
302 }
303#endif
304
307 _In_z_ _Scanf_format_string_params_(2) char const* const _Format,
310 )
311#if defined _NO_CRT_STDIO_INLINE
312;
313#else
314 {
318 }
319#endif
320
323 _In_z_ _Scanf_format_string_params_(1) char const* const _Format,
325 )
326#if defined _NO_CRT_STDIO_INLINE
327;
328#else
329 {
331 }
332#endif
333
336 _In_z_ _Scanf_format_string_params_(0) char const* const _Format,
338 ...)
339#if defined _NO_CRT_STDIO_INLINE
340;
341#else
342 {
343 int _Result;
346
348
350 return _Result;
351 }
352#endif
353
356 _In_z_ _Scanf_format_string_ char const* const _Format,
357 ...)
358#if defined _NO_CRT_STDIO_INLINE
359;
360#else
361 {
362 int _Result;
365
366 _Result = _vcscanf_l(_Format, NULL, _ArgList);
367
369 return _Result;
370 }
371#endif
372
375 _In_z_ _Scanf_format_string_params_(0) char const* const _Format,
377 ...)
378#if defined _NO_CRT_STDIO_INLINE
379;
380#else
381 {
382 int _Result;
387 return _Result;
388 }
389#endif
390
393 _In_z_ _Scanf_format_string_ char const* const _Format,
394 ...)
395#if defined _NO_CRT_STDIO_INLINE
396;
397#else
398 {
399 int _Result;
404 return _Result;
405 }
406#endif
407
408
409 _DCRTIMP int __cdecl _kbhit(void);
410
415
420
421 #if defined(_CRT_INTERNAL_NONSTDC_NAMES) && _CRT_INTERNAL_NONSTDC_NAMES
422
423 // Suppress double-deprecation warnings:
424 #pragma warning(push)
425 #pragma warning(disable: 4141)
426
427 _Success_(return != 0)
429 _DCRTIMP char* __cdecl cgets(
430 _At_(&_Buffer[0], _In_reads_(1))
431 _At_(&_Buffer[1], _Out_writes_(1))
433 char* _Buffer
434 );
435
436 #pragma warning(pop)
437
440 _In_z_ char const* _String
441 );
442
444 _DCRTIMP int __cdecl getch(void);
445
447 _DCRTIMP int __cdecl getche(void);
448
450 _DCRTIMP int __cdecl kbhit(void);
451
454 _In_ int _Ch
455 );
456
459 _In_ int _Ch
460 );
461
464 _In_z_ _Printf_format_string_ char const* const _Format,
465 ...)
466#if defined _NO_CRT_STDIO_INLINE
467;
468#else
469 {
470 int _Result;
475 return _Result;
476 }
477#endif
478
481 _In_z_ _Scanf_format_string_ char const* const _Format,
482 ...)
483#if defined _NO_CRT_STDIO_INLINE
484;
485#else
486 {
487 int _Result;
490
491 _Result = _vcscanf_l(_Format, NULL, _ArgList);
492
494 return _Result;
495 }
496#endif
497
498 #endif // _CRT_INTERNAL_NONSTDC_NAMES
499
501
503#pragma warning(pop) // _UCRT_DISABLED_WARNINGS
504#endif // _INC_CONIO
#define __cdecl
Definition: accygwin.h:79
char * va_list
Definition: acmsvcex.h:78
#define __int64
Definition: basetyps.h:16
return
Definition: dirsup.c:529
errno_t __cdecl _cgets_s(char *const source_string, size_t const size_in_bytes, size_t *const size_read)
Definition: cgets.cpp:30
#define _CRT_STDIO_INLINE
#define _CRT_INTERNAL_SCANF_SECURECRT
#define _CRT_INTERNAL_LOCAL_SCANF_OPTIONS
#define _CRT_INTERNAL_LOCAL_PRINTF_OPTIONS
_String
#define __DEFINE_CPP_OVERLOAD_SECURE_FUNC_0_1(_ReturnType, _FuncName, _DstType, _Dst, _TType1, _TArg1)
Definition: corecrt.h:177
#define NULL
Definition: types.h:112
_In_z_ _Printf_format_string_ char const *const _Format
Definition: printf.c:19
_In_z_ _Printf_format_string_ char const *const va_list _ArgList
Definition: printf.c:23
_In_ _Pre_notnull_ _Buffer
Definition: stdlib.h:644
#define _In_reads_(s)
Definition: no_sal2.h:168
#define _Out_writes_z_(s)
Definition: no_sal2.h:180
#define _Success_(c)
Definition: no_sal2.h:84
#define _At_(t, a)
Definition: no_sal2.h:40
#define _In_z_
Definition: no_sal2.h:164
#define _Scanf_format_string_params_(x)
Definition: no_sal2.h:364
#define _Check_return_
Definition: no_sal2.h:60
#define _Post_z_
Definition: no_sal2.h:508
#define _Out_writes_(s)
Definition: no_sal2.h:176
#define _Out_
Definition: no_sal2.h:160
#define _In_
Definition: no_sal2.h:158
#define _In_opt_
Definition: no_sal2.h:212
#define _Out_writes_to_(s, c)
Definition: no_sal2.h:188
#define _Printf_format_string_params_(x)
Definition: no_sal2.h:362
#define _Scanf_format_string_
Definition: no_sal2.h:358
#define _Printf_format_string_
Definition: no_sal2.h:356
_Check_return_opt_ _CRTIMP int __cdecl _cprintf_p(_In_z_ _Printf_format_string_ const char *_Format,...)
Definition: conio.h:246
_Check_return_ _CRTIMP int __cdecl _getch(void)
Definition: getch.c:16
_Check_return_opt_ _CRTIMP int __cdecl ungetch(int _Ch)
_Check_return_ _CRTIMP int __cdecl _getche(void)
Definition: getche.c:15
_Check_return_opt_ _CRTIMP int __cdecl cprintf(_In_z_ _Printf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl _cscanf(_In_z_ _Scanf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl _vcprintf_p_l(_In_z_ _Printf_format_string_ const char *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList)
_Check_return_ _CRTIMP int __cdecl kbhit(void)
_Check_return_ _CRTIMP int __cdecl getch(void)
_CRTIMP int __cdecl _putch_nolock(_In_ int _Ch)
_CRTIMP int __cdecl _putch(_In_ int _Ch)
_Check_return_ _CRTIMP int __cdecl _getch_nolock(void)
Definition: getch.cpp:277
_Check_return_opt_ _CRTIMP int __cdecl _vcprintf_l(_In_z_ _Printf_format_string_ const char *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList)
_CRTIMP int __cdecl _kbhit(void)
Definition: kbhit.c:21
_CRTIMP int __cdecl _ungetch_nolock(_In_ int _Ch)
_Check_return_opt_ _CRTIMP int __cdecl cscanf(_In_z_ _Scanf_format_string_ const char *_Format,...)
_Check_return_opt_ _CRTIMP int __cdecl _cprintf_p_l(_In_z_ _Printf_format_string_ const char *_Format, _In_opt_ _locale_t _Locale,...)
_Check_return_opt_ _CRTIMP char *__cdecl cgets(_Out_writes_z_(_Inexpressible_(*_Buffer+2)) char *_Buffer)
_Check_return_opt_ _CRTIMP int __cdecl _cscanf_l(_In_z_ _Scanf_format_string_ const char *_Format, _In_opt_ _locale_t _Locale,...)
_Check_return_opt_ _CRTIMP int __cdecl _cputs(_In_z_ const char *_Str)
_Check_return_opt_ _CRTIMP int __cdecl _cprintf(_In_z_ _Printf_format_string_ const char *_Format,...)
Definition: conio.h:176
_Check_return_opt_ _CRTIMP int __cdecl _vcprintf(_In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
Definition: conio.h:87
_Check_return_opt_ _CRTIMP int __cdecl _cprintf_l(_In_z_ _Printf_format_string_ const char *_Format, _In_opt_ _locale_t _Locale,...)
_CRTIMP int __cdecl _ungetch(_In_ int _Ch)
_Check_return_ _CRTIMP int __cdecl _getche_nolock(void)
Definition: getch.cpp:364
_Check_return_ _CRTIMP int __cdecl getche(void)
_Check_return_opt_ _CRTIMP int __cdecl putch(int _Ch)
_Check_return_opt_ _CRTIMP int __cdecl _vcprintf_p(_In_z_ _Printf_format_string_ const char *_Format, va_list _ArgList)
_Check_return_opt_ _CRTIMP int __cdecl cputs(_In_z_ const char *_Str)
_Check_return_ wchar_t _Ch
Definition: string.h:697
_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
_Check_return_opt_ _DCRTIMP int __cdecl __conio_common_vcprintf(_In_ unsigned __int64 _Options, _In_z_ _Printf_format_string_params_(2) char const *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList)
_Check_return_opt_ _DCRTIMP int __cdecl __conio_common_vcprintf_s(_In_ unsigned __int64 _Options, _In_z_ _Printf_format_string_params_(2) char const *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList)
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcprintf_s(_In_z_ _Printf_format_string_ char const *const _Format, va_list _ArgList)
Definition: conio.h:116
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcscanf_s_l(_In_z_ _Scanf_format_string_params_(2) char const *const _Format, _In_opt_ _locale_t const _Locale, va_list _ArgList)
Definition: conio.h:306
_Check_return_opt_ _DCRTIMP int __cdecl __conio_common_vcprintf_p(_In_ unsigned __int64 _Options, _In_z_ _Printf_format_string_params_(2) char const *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList)
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cscanf_s(_In_z_ _Scanf_format_string_ char const *const _Format,...)
Definition: conio.h:392
_Result
Definition: conio.h:347
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcprintf_s_l(_In_z_ _Printf_format_string_params_(2) char const *const _Format, _In_opt_ _locale_t const _Locale, va_list _ArgList)
Definition: conio.h:100
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _vcscanf_s(_In_z_ _Scanf_format_string_params_(1) char const *const _Format, va_list _ArgList)
Definition: conio.h:322
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cprintf_s_l(_In_z_ _Printf_format_string_params_(0) char const *const _Format, _In_opt_ _locale_t const _Locale,...)
Definition: conio.h:193
__crt_va_end(_ArgList)
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cscanf_s_l(_In_z_ _Scanf_format_string_params_(0) char const *const _Format, _In_opt_ _locale_t const _Locale,...)
Definition: conio.h:374
_Check_return_opt_ _DCRTIMP int __cdecl __conio_common_vcscanf(_In_ unsigned __int64 _Options, _In_z_ _Scanf_format_string_params_(2) char const *_Format, _In_opt_ _locale_t _Locale, va_list _ArgList)
_UCRT_DISABLE_CLANG_WARNINGS _CRT_BEGIN_C_HEADER _Check_return_wat_ _In_ size_t _Out_ size_t * _SizeRead
Definition: conio.h:27
_Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL _cprintf_s(_In_z_ _Printf_format_string_ char const *const _Format,...)
Definition: conio.h:211
__crt_va_start(_ArgList, _Locale)
int errno_t
Definition: corecrt.h:615
#define _Check_return_opt_
Definition: corecrt.h:224
#define _DCRTIMP
Definition: corecrt.h:154
#define _CRT_NONSTDC_DEPRECATE(_NewName)
Definition: corecrt.h:439
#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 _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 __CRTDECL
Definition: yvals.h:17
#define const
Definition: zconf.h:233