ReactOS 0.4.15-dev-7958-gcd0bb1a
stream_private.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
11#ifndef __STREAM_PRIVATE_H__
12#define __STREAM_PRIVATE_H__
13
14#pragma once
15
16/*
17 * Console I/O streams
18 */
19
20#if 0
21// Shadow type, implementation-specific
22typedef struct _CON_STREAM CON_STREAM, *PCON_STREAM;
23#endif
24
25typedef struct _CON_STREAM
26{
28
29#ifdef USE_CRT
30 FILE* fStream;
31#else
34
36
37 /*
38 * TRUE if 'hHandle' refers to a console, in which case I/O UTF-16
39 * is directly used. If 'hHandle' refers to a file or a pipe, the
40 * 'Mode' flag is used.
41 */
43
44 /*
45 * The 'Mode' flag is used to know the translation mode
46 * when 'hHandle' refers to a file or a pipe.
47 */
49 UINT CodePage; // Used to convert UTF-16 text to some ANSI code page.
50#endif /* defined(USE_CRT) */
52
53#endif /* __STREAM_PRIVATE_H__ */
54
55/* EOF */
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned int UINT
Definition: ndis.h:50
INT(__stdcall * CON_WRITE_FUNC)(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
Definition: outstream.h:47
enum _CON_STREAM_MODE CON_STREAM_MODE
struct _CON_STREAM CON_STREAM
struct _CON_STREAM * PCON_STREAM
CON_STREAM_MODE Mode
HANDLE hHandle
CON_WRITE_FUNC WriteFunc
CRITICAL_SECTION Lock
BOOL IsInitialized