ReactOS 0.4.15-dev-7842-g558ab78
outstream.h
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS Console Utilities Library
3 * LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
4 * PURPOSE: Provides basic abstraction wrappers around CRT streams or
5 * Win32 console API I/O functions, to deal with i18n + Unicode
6 * related problems.
7 * COPYRIGHT: Copyright 2017-2018 ReactOS Team
8 * Copyright 2017-2018 Hermes Belusca-Maito
9 */
10
18#ifndef __OUTSTREAM_H__
19#define __OUTSTREAM_H__
20
21#pragma once
22
23/*
24 * Enable this define if you want to only use CRT functions to output
25 * UNICODE stream to the console, as in the way explained by
26 * http://archives.miloush.net/michkap/archive/2008/03/18/8306597.html
27 */
29// #define USE_CRT
30
31#ifndef _UNICODE
32#error The ConUtils library at the moment only supports compilation with _UNICODE defined!
33#endif
34
35#ifdef __cplusplus
36extern "C" {
37#endif
38
39// Shadow type, implementation-specific
41
42// typedef INT (__stdcall *CON_READ_FUNC)(
43 // IN PCON_STREAM Stream,
44 // OUT PTCHAR szStr,
45 // IN OUT PDWORD len);
46
49 IN PCTCH szStr,
50 IN DWORD len);
51
52
53INT
57 IN PCTCH szStr,
58 IN DWORD len);
59
60INT
63 IN PCTCH szStr,
64 IN DWORD len);
65
66INT
69 IN PCWSTR szStr);
70
71INT
74 IN PCWSTR szStr,
76
77INT
81 IN PCWSTR szStr,
82 ...);
83
84INT
88 IN UINT uID,
89 IN LANGID LanguageId);
90
91INT
94 IN UINT uID);
95
96INT
100 IN UINT uID,
101 IN LANGID LanguageId,
102 IN va_list args);
103
104INT
107 IN UINT uID,
108 IN va_list args);
109
110INT
115 IN UINT uID,
116 IN LANGID LanguageId,
117 ...);
118
119INT
123 IN UINT uID,
124 ...);
125
126INT
130 IN LPCVOID lpSource OPTIONAL,
131 IN DWORD dwMessageId,
132 IN DWORD dwLanguageId);
133
134INT
138 IN LPCVOID lpSource OPTIONAL,
139 IN DWORD dwMessageId,
140 IN DWORD dwLanguageId,
141 IN va_list args);
142
143INT
147 IN LPCVOID lpSource OPTIONAL,
148 IN DWORD dwMessageId,
149 IN DWORD dwLanguageId,
150 IN va_list *Arguments OPTIONAL);
151
152INT
157 IN LPCVOID lpSource OPTIONAL,
158 IN DWORD dwMessageId,
159 IN DWORD dwLanguageId,
160 ...);
161
162INT
167 IN UINT uID,
168 IN LANGID LanguageId,
169 IN va_list *Arguments OPTIONAL);
170
171INT
175 IN UINT uID,
176 IN va_list *Arguments OPTIONAL);
177
178INT
184 IN UINT uID,
185 IN LANGID LanguageId,
186 ...);
187
188INT
193 IN UINT uID,
194 ...);
195
196
197
198VOID
200
201
202#ifdef __cplusplus
203}
204#endif
205
206#endif /* __OUTSTREAM_H__ */
207
208/* EOF */
#define __cdecl
Definition: accygwin.h:79
char * va_list
Definition: acmsvcex.h:78
HINSTANCE hInstance
Definition: charmap.c:19
unsigned long DWORD
Definition: ntddk_ex.h:95
GLenum GLsizei len
Definition: glext.h:6722
USHORT LANGID
Definition: mui.h:9
static IStream Stream
Definition: htmldoc.c:1115
unsigned int UINT
Definition: ndis.h:50
LPCCH PCTCH
Definition: ntbasedef.h:486
INT __stdcall ConWrite(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
Definition: outstream.c:85
INT __cdecl ConPrintf(IN PCON_STREAM Stream, IN PCWSTR szStr,...)
Definition: outstream.c:520
INT ConResPuts(IN PCON_STREAM Stream, IN UINT uID)
Definition: outstream.c:610
INT __cdecl ConResMsgPrintf(IN PCON_STREAM Stream, IN DWORD dwFlags, IN UINT uID,...)
Definition: outstream.c:1461
INT ConResPrintfV(IN PCON_STREAM Stream, IN UINT uID, IN va_list args)
Definition: outstream.c:695
INT ConPuts(IN PCON_STREAM Stream, IN PCWSTR szStr)
Definition: outstream.c:427
VOID ConClearLine(IN PCON_STREAM Stream)
Definition: outstream.c:1483
INT ConResMsgPrintfExV(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN DWORD dwFlags, IN UINT uID, IN LANGID LanguageId, IN va_list *Arguments OPTIONAL)
Definition: outstream.c:1218
INT ConMsgPuts(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId)
Definition: outstream.c:837
INT ConResPutsEx(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN UINT uID, IN LANGID LanguageId)
Definition: outstream.c:569
INT __cdecl ConResPrintfEx(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN UINT uID, IN LANGID LanguageId,...)
Definition: outstream.c:740
INT __cdecl ConMsgPrintf(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId,...)
Definition: outstream.c:1130
INT ConResMsgPrintfV(IN PCON_STREAM Stream, IN DWORD dwFlags, IN UINT uID, IN va_list *Arguments OPTIONAL)
Definition: outstream.c:1329
struct _CON_STREAM * PCON_STREAM
Definition: outstream.h:40
INT __cdecl ConResMsgPrintfEx(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN DWORD dwFlags, IN UINT uID, IN LANGID LanguageId,...)
Definition: outstream.c:1394
INT(__stdcall * CON_WRITE_FUNC)(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
Definition: outstream.h:47
INT ConResPrintfExV(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN UINT uID, IN LANGID LanguageId, IN va_list args)
Definition: outstream.c:653
INT __cdecl ConResPrintf(IN PCON_STREAM Stream, IN UINT uID,...)
Definition: outstream.c:781
INT ConMsgPrintf2V(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId, IN va_list args)
Definition: outstream.c:909
INT ConPrintfV(IN PCON_STREAM Stream, IN PCWSTR szStr, IN va_list args)
Definition: outstream.c:466
INT ConStreamWrite(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
Definition: outstream.c:398
INT ConMsgPrintfV(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId, IN va_list *Arguments OPTIONAL)
Definition: outstream.c:1030
#define INT
Definition: polytest.cpp:20
PULONG MinorVersion OPTIONAL
Definition: CrossNt.h:68
Definition: match.c:390
const uint16_t * PCWSTR
Definition: typedefs.h:57
int32_t INT
Definition: typedefs.h:58
#define __stdcall
Definition: typedefs.h:25
#define IN
Definition: typedefs.h:39
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
CONST void * LPCVOID
Definition: windef.h:191