#include <windef.h>
#include <winbase.h>
#include <winnls.h>
#include <wincon.h>
#include <strsafe.h>
#include "conutils.h"
#include "stream.h"
#include "stream_private.h"
Go to the source code of this file.
|
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 | ConStreamInit (OUT PCON_STREAM Stream, IN PVOID Handle, IN CON_STREAM_MODE Mode, IN UINT CacheCodePage OPTIONAL) |
|
BOOL | ConStreamSetMode (IN PCON_STREAM Stream, IN CON_STREAM_MODE Mode, IN UINT CacheCodePage OPTIONAL) |
|
BOOL | ConStreamSetCacheCodePage (IN PCON_STREAM Stream, IN UINT CacheCodePage) |
|
HANDLE | ConStreamGetOSHandle (IN PCON_STREAM Stream) |
|
BOOL | ConStreamSetOSHandle (IN PCON_STREAM Stream, IN HANDLE Handle) |
|
◆ _UNICODE
◆ CON_STREAM_SET_MODE
Value:do { \
(
Stream)->CodePage = CacheCodePage; \
else \
} while(0)
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
Definition at line 111 of file stream.c.
◆ UNICODE
NOTE: Experimental! Don't use USE_CRT yet because output to console is a bit broken
Definition at line 27 of file stream.c.
◆ ConStreamGetOSHandle()
Definition at line 240 of file stream.c.
#define INVALID_HANDLE_VALUE
_CRTIMP intptr_t __cdecl _get_osfhandle(_In_ int _FileHandle)
_Check_return_ _CRTIMP int __cdecl _fileno(_In_ FILE *_File)
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
Referenced by _tmain(), BreakHandler(), Cleanup(), cmd_beep(), cmd_start(), CommandColor(), ConClearLine(), ConClearScreen(), ConGetScreenInfo(), Execute(), GetHandle(), Initialize(), InputWait(), and PagePrompt().
◆ ConStreamInit()
Definition at line 185 of file stream.c.
BOOL ConStreamInitEx(OUT PCON_STREAM Stream, IN PVOID Handle, IN CON_STREAM_MODE Mode, IN UINT CacheCodePage OPTIONAL, IN CON_WRITE_FUNC WriteFunc OPTIONAL)
INT __stdcall ConWrite(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
Referenced by _tmain(), and wmain().
◆ ConStreamInitEx()
Definition at line 127 of file stream.c.
164 if (!
Stream->IsInitialized)
#define INVALID_HANDLE_VALUE
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
#define IsConsoleHandle(h)
INT __stdcall ConWrite(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
#define CON_STREAM_SET_MODE(Stream, Mode, CacheCodePage)
Referenced by ConStreamInit().
◆ ConStreamSetCacheCodePage()
Definition at line 215 of file stream.c.
221 #warning The ConStreamSetCacheCodePage function does not make much sense with the CRT!
enum _CON_STREAM_MODE CON_STREAM_MODE
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
#define CON_STREAM_SET_MODE(Stream, Mode, CacheCodePage)
◆ ConStreamSetMode()
Definition at line 195 of file stream.c.
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
#define CON_STREAM_SET_MODE(Stream, Mode, CacheCodePage)
Referenced by Initialize().
◆ ConStreamSetOSHandle()
Definition at line 263 of file stream.c.
282 *
Stream->fStream = *fpOut;
_Check_return_ _CRTIMP FILE *__cdecl _fdopen(_In_ int _FileHandle, _In_z_ const char *_Mode)
#define INVALID_HANDLE_VALUE
BOOL WINAPI FlushFileBuffers(IN HANDLE hFile)
#define IsConsoleHandle(h)
_CRTIMP int __cdecl _open_osfhandle(_In_ intptr_t _OSFileHandle, _In_ int _Flags)
_Inout_opt_ PUNICODE_STRING _Inout_opt_ PUNICODE_STRING Stream
Referenced by SetHandle(), and wmain().
◆ csStdErr
◆ csStdIn
◆ csStdOut