32#error The ConUtils library at the moment only supports compilation with _UNICODE defined!
53#define INVALID_CP ((UINT)-1)
74#define StdIn (&StdStreams[0])
75#define StdOut (&StdStreams[1])
76#define StdErr (&StdStreams[2])
81#define StdIn (&csStdIn )
82#define StdOut (&csStdOut)
83#define StdErr (&csStdErr)
107#define ConInitStdStreamsAndMode(Mode, CacheCodePage) \
109 ConStreamInit(StdIn , stdin , (Mode), (CacheCodePage)); \
110 ConStreamInit(StdOut, stdout, (Mode), (CacheCodePage)); \
111 ConStreamInit(StdErr, stderr, (Mode), (CacheCodePage)); \
114#define ConInitStdStreamsAndMode(Mode, CacheCodePage) \
116 ConStreamInit(StdIn , GetStdHandle(STD_INPUT_HANDLE) , (Mode), (CacheCodePage)); \
117 ConStreamInit(StdOut, GetStdHandle(STD_OUTPUT_HANDLE), (Mode), (CacheCodePage)); \
118 ConStreamInit(StdErr, GetStdHandle(STD_ERROR_HANDLE) , (Mode), (CacheCodePage)); \
128#define ConInitStdStreams() \
129 ConInitStdStreamsAndMode(AnsiText, INVALID_CP)
141#warning The ConStreamSetCacheCodePage function does not make much sense with the CRT!
143#define ConStdStreamsSetCacheCodePage(InputCodePage, OutputCodePage) NOTHING
152#define ConStdStreamsSetCacheCodePage(InputCodePage, OutputCodePage) \
154 ConStreamSetCacheCodePage(StdIn , (InputCodePage )); \
155 ConStreamSetCacheCodePage(StdOut, (OutputCodePage)); \
156 ConStreamSetCacheCodePage(StdErr, (OutputCodePage)); \
static const PCON_STREAM StdStreams[]
enum _CON_STREAM_MODE CON_STREAM_MODE
BOOL ConStreamInitEx(OUT PCON_STREAM Stream, IN PVOID Handle, IN CON_STREAM_MODE Mode, IN UINT CacheCodePage OPTIONAL, IN CON_WRITE_FUNC WriteFunc OPTIONAL)
BOOL ConStreamSetOSHandle(IN PCON_STREAM Stream, IN HANDLE Handle)
BOOL ConStreamSetCacheCodePage(IN PCON_STREAM Stream, IN UINT CacheCodePage)
BOOL ConStreamSetMode(IN PCON_STREAM Stream, IN CON_STREAM_MODE Mode, IN UINT CacheCodePage OPTIONAL)
BOOL ConStreamInit(OUT PCON_STREAM Stream, IN PVOID Handle, IN CON_STREAM_MODE Mode, IN UINT CacheCodePage OPTIONAL)
struct _CON_STREAM * PCON_STREAM
INT(__stdcall * CON_WRITE_FUNC)(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
enum _CON_STREAM_MODE * PCON_STREAM_MODE
HANDLE ConStreamGetOSHandle(IN PCON_STREAM Stream)
PULONG MinorVersion OPTIONAL