68static int ConToCRTMode[] =
87#define CON_STREAM_SET_MODE(Stream, Mode, CacheCodePage) \
89 fflush((Stream)->fStream); \
90 if ((Mode) < ARRAYSIZE(ConToCRTMode)) \
91 _setmode(_fileno((Stream)->fStream), ConToCRTMode[(Mode)]); \
93 _setmode(_fileno((Stream)->fStream), _O_TEXT); \
111#define CON_STREAM_SET_MODE(Stream, Mode, CacheCodePage) \
113 (Stream)->Mode = (Mode); \
115 if ((Mode) == AnsiText) \
116 (Stream)->CodePage = CacheCodePage; \
117 else if ((Mode) == UTF8Text) \
118 (Stream)->CodePage = CP_UTF8; \
120 (Stream)->CodePage = INVALID_CP; \
164 if (!
Stream->IsInitialized)
221#warning The ConStreamSetCacheCodePage function does not make much sense with the CRT!
282 *
Stream->fStream = *fpOut;
#define INVALID_HANDLE_VALUE
BOOL WINAPI FlushFileBuffers(IN HANDLE hFile)
int CDECL _open_osfhandle(intptr_t handle, int oflags)
FILE *CDECL _fdopen(int fd, const char *mode)
intptr_t CDECL _get_osfhandle(int fd)
int CDECL _fileno(FILE *file)
INT __stdcall ConWrite(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
INT(__stdcall * CON_WRITE_FUNC)(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
static const PCON_STREAM StdStreams[]
#define IsConsoleHandle(h)
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)
#define CON_STREAM_SET_MODE(Stream, Mode, 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)
HANDLE ConStreamGetOSHandle(IN PCON_STREAM Stream)
enum _CON_STREAM_MODE CON_STREAM_MODE
PULONG MinorVersion OPTIONAL
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)