ReactOS 0.4.15-dev-8219-ge8b88cf
instream.c
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/*
19 * Enable this define if you want to only use CRT functions to output
20 * UNICODE stream to the console, as in the way explained by
21 * http://archives.miloush.net/michkap/archive/2008/03/18/8306597.html
22 */
24// #define USE_CRT
25
26/* FIXME: Temporary HACK before we cleanly support UNICODE functions */
27#define UNICODE
28#define _UNICODE
29
30#ifdef USE_CRT
31#include <fcntl.h>
32#include <io.h>
33#endif /* USE_CRT */
34
35#include <stdlib.h> // limits.h // For MB_LEN_MAX
36
37#include <windef.h>
38#include <winbase.h>
39#include <winnls.h>
40#include <winuser.h> // MAKEINTRESOURCEW, RT_STRING
41#include <wincon.h> // Console APIs (only if kernel32 support included)
42#include <strsafe.h>
43
44/* PSEH for SEH Support */
45#include <pseh/pseh2.h>
46
47#include "conutils.h"
48#include "stream.h"
49#include "stream_private.h"
50
51
52/* EOF */
Console I/O streams.