56#define CON_RC_STRING_MAX_SIZE 4096
91 DWORD TotalLen =
len, dwNumBytes = 0;
95 if (!szStr ||
len == 0)
113 TotalLen =
len, dwNumBytes = 0;
126 return (
INT)TotalLen;
218 CodePage =
Stream->CodePage;
240 #error "Need to implement double conversion!"
297 return (
INT)TotalLen;
305 if (!szStr ||
len == 0)
347#define CON_STREAM_WRITE_CALL(Stream, Str, Len) \
348 (Stream)->WriteFunc((Stream), (Str), (Len))
353#define CON_STREAM_WRITE2(Stream, Str, Len, RetLen) \
355 EnterCriticalSection(&(Stream)->Lock); \
356 (RetLen) = CON_STREAM_WRITE_CALL((Stream), (Str), (Len)); \
357 LeaveCriticalSection(&(Stream)->Lock); \
360#define CON_STREAM_WRITE(Stream, Str, Len) \
362 EnterCriticalSection(&(Stream)->Lock); \
363 CON_STREAM_WRITE_CALL((Stream), (Str), (Len)); \
364 LeaveCriticalSection(&(Stream)->Lock); \
369#define CON_STREAM_WRITE2(Stream, Str, Len, RetLen) \
371 (RetLen) = CON_STREAM_WRITE_CALL((Stream), (Str), (Len)); \
374#define CON_STREAM_WRITE(Stream, Str, Len) \
375 CON_STREAM_WRITE_CALL((Stream), (Str), (Len))
483 Len = szStr - bufSrc;
854 dwFlags &= ~FORMAT_MESSAGE_ARGUMENT_ARRAY;
927 dwFlags &= ~FORMAT_MESSAGE_ARGUMENT_ARRAY;
1142 dwFlags &= ~FORMAT_MESSAGE_ARGUMENT_ARRAY;
1406 dwFlags &= ~FORMAT_MESSAGE_ARGUMENT_ARRAY;
1471 dwFlags &= ~FORMAT_MESSAGE_ARGUMENT_ARRAY;
BOOL WINAPI SetConsoleCursorPosition(IN HANDLE hConsoleOutput, IN COORD dwCursorPosition)
BOOL WINAPI GetConsoleScreenBufferInfo(IN HANDLE hConsoleOutput, OUT PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo)
#define _setmode(fd, mode)
#define ERROR_NOT_ENOUGH_MEMORY
#define HeapFree(x, y, z)
#define WideCharToMultiByte
#define MultiByteToWideChar
static DWORD DWORD * dwLength
UINT WINAPI DECLSPEC_HOTPATCH GetConsoleOutputCP(VOID)
BOOL WINAPI DECLSPEC_HOTPATCH FillConsoleOutputCharacterW(IN HANDLE hConsoleOutput, IN WCHAR cCharacter, IN DWORD nLength, IN COORD dwWriteCoord, OUT LPDWORD lpNumberOfCharsWritten)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_Check_return_opt_ _CRTIMP wint_t __cdecl fputwc(_In_ wchar_t _Ch, _Inout_ FILE *_File)
_Check_return_ _CRTIMP int __cdecl _fileno(_In_ FILE *_File)
_Check_return_opt_ _CRTIMP int __cdecl fwprintf(_Inout_ FILE *_File, _In_z_ _Printf_format_string_ const wchar_t *_Format,...)
_Check_return_opt_ _CRTIMP size_t __cdecl fwrite(_In_reads_bytes_(_Size *_Count) const void *_Str, _In_ size_t _Size, _In_ size_t _Count, _Inout_ FILE *_File)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define EXCEPTION_EXECUTE_HANDLER
INT __stdcall ConWrite(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
INT __cdecl ConPrintf(IN PCON_STREAM Stream, IN PCWSTR szStr,...)
INT ConResPuts(IN PCON_STREAM Stream, IN UINT uID)
INT __cdecl ConResMsgPrintf(IN PCON_STREAM Stream, IN DWORD dwFlags, IN UINT uID,...)
INT ConResPrintfV(IN PCON_STREAM Stream, IN UINT uID, IN va_list args)
#define CON_STREAM_WRITE2(Stream, Str, Len, RetLen)
INT ConPuts(IN PCON_STREAM Stream, IN PCWSTR szStr)
VOID ConClearLine(IN PCON_STREAM Stream)
INT ConResMsgPrintfExV(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN DWORD dwFlags, IN UINT uID, IN LANGID LanguageId, IN va_list *Arguments OPTIONAL)
INT ConMsgPuts(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId)
INT ConResPutsEx(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN UINT uID, IN LANGID LanguageId)
INT __cdecl ConResPrintfEx(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN UINT uID, IN LANGID LanguageId,...)
INT __cdecl ConMsgPrintf(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId,...)
INT ConResMsgPrintfV(IN PCON_STREAM Stream, IN DWORD dwFlags, IN UINT uID, IN va_list *Arguments OPTIONAL)
#define CON_RC_STRING_MAX_SIZE
INT __cdecl ConResMsgPrintfEx(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN DWORD dwFlags, IN UINT uID, IN LANGID LanguageId,...)
INT ConResPrintfExV(IN PCON_STREAM Stream, IN HINSTANCE hInstance OPTIONAL, IN UINT uID, IN LANGID LanguageId, IN va_list args)
INT __cdecl ConResPrintf(IN PCON_STREAM Stream, IN UINT uID,...)
INT ConMsgPrintf2V(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId, IN va_list args)
INT ConPrintfV(IN PCON_STREAM Stream, IN PCWSTR szStr, IN va_list args)
INT ConStreamWrite(IN PCON_STREAM Stream, IN PCTCH szStr, IN DWORD len)
INT ConMsgPrintfV(IN PCON_STREAM Stream, IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId, IN va_list *Arguments OPTIONAL)
#define _SEH2_EXCEPT(...)
#define IsConsoleHandle(h)
HANDLE ConStreamGetOSHandle(IN PCON_STREAM Stream)
INT WINAPI K32LoadStringExW(IN HINSTANCE hInstance OPTIONAL, IN UINT uID, IN LANGID LanguageId, OUT LPWSTR lpBuffer, IN INT nBufferMax)
BOOL IsTTYHandle(IN HANDLE hHandle)
DWORD WINAPI FormatMessageSafeW(IN DWORD dwFlags, IN LPCVOID lpSource OPTIONAL, IN DWORD dwMessageId, IN DWORD dwLanguageId, OUT LPWSTR lpBuffer, IN DWORD nSize, IN va_list *Arguments OPTIONAL)
PULONG MinorVersion OPTIONAL
STRSAFEAPI StringCchVPrintfExW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags, STRSAFE_LPCWSTR pszFormat, va_list argList)
#define FORMAT_MESSAGE_FROM_STRING
#define FORMAT_MESSAGE_IGNORE_INSERTS
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
#define FORMAT_MESSAGE_FROM_HMODULE
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags