mirror of
https://github.com/reactos/reactos.git
synced 2025-04-28 01:11:35 +00:00
[CONSRV] Fix the definitions of the Console[Input|Output]UnicodeToAnsiChar() and Console[Input|Output]AnsiToUnicodeChar() macros.
This commit is contained in:
parent
07f8b9fe09
commit
d9cbe7dc64
4 changed files with 30 additions and 14 deletions
|
@ -25,12 +25,16 @@
|
|||
* ERROR_INVALID_PARAMETER."
|
||||
*/
|
||||
#define ConsoleOutputUnicodeToAnsiChar(Console, dChar, sWChar) \
|
||||
ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \
|
||||
WideCharToMultiByte((Console)->OutputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL)
|
||||
do { \
|
||||
ASSERT((ULONG_PTR)(dChar) != (ULONG_PTR)(sWChar)); \
|
||||
WideCharToMultiByte((Console)->OutputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL); \
|
||||
} while (0)
|
||||
|
||||
#define ConsoleOutputAnsiToUnicodeChar(Console, dWChar, sChar) \
|
||||
ASSERT((ULONG_PTR)dWChar != (ULONG_PTR)sChar); \
|
||||
MultiByteToWideChar((Console)->OutputCodePage, 0, (sChar), 1, (dWChar), 1)
|
||||
do { \
|
||||
ASSERT((ULONG_PTR)(dWChar) != (ULONG_PTR)(sChar)); \
|
||||
MultiByteToWideChar((Console)->OutputCodePage, 0, (sChar), 1, (dWChar), 1); \
|
||||
} while (0)
|
||||
|
||||
/* PRIVATE FUNCTIONS **********************************************************/
|
||||
|
||||
|
|
|
@ -19,9 +19,11 @@
|
|||
#define ConSrvGetInputBuffer(ProcessData, Handle, Ptr, Access, LockConsole) \
|
||||
ConSrvGetObject((ProcessData), (Handle), (PCONSOLE_IO_OBJECT*)(Ptr), NULL, \
|
||||
(Access), (LockConsole), INPUT_BUFFER)
|
||||
|
||||
#define ConSrvGetInputBufferAndHandleEntry(ProcessData, Handle, Ptr, Entry, Access, LockConsole) \
|
||||
ConSrvGetObject((ProcessData), (Handle), (PCONSOLE_IO_OBJECT*)(Ptr), (Entry), \
|
||||
(Access), (LockConsole), INPUT_BUFFER)
|
||||
|
||||
#define ConSrvReleaseInputBuffer(Buff, IsConsoleLocked) \
|
||||
ConSrvReleaseObject(&(Buff)->Header, (IsConsoleLocked))
|
||||
|
||||
|
@ -33,12 +35,16 @@
|
|||
* ERROR_INVALID_PARAMETER."
|
||||
*/
|
||||
#define ConsoleInputUnicodeToAnsiChar(Console, dChar, sWChar) \
|
||||
ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \
|
||||
WideCharToMultiByte((Console)->InputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL)
|
||||
do { \
|
||||
ASSERT((ULONG_PTR)(dChar) != (ULONG_PTR)(sWChar)); \
|
||||
WideCharToMultiByte((Console)->InputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL); \
|
||||
} while (0)
|
||||
|
||||
#define ConsoleInputAnsiToUnicodeChar(Console, dWChar, sChar) \
|
||||
ASSERT((ULONG_PTR)dWChar != (ULONG_PTR)sChar); \
|
||||
MultiByteToWideChar((Console)->InputCodePage, 0, (sChar), 1, (dWChar), 1)
|
||||
do { \
|
||||
ASSERT((ULONG_PTR)(dWChar) != (ULONG_PTR)(sChar)); \
|
||||
MultiByteToWideChar((Console)->InputCodePage, 0, (sChar), 1, (dWChar), 1); \
|
||||
} while (0)
|
||||
|
||||
|
||||
typedef struct _GET_INPUT_INFO
|
||||
|
|
|
@ -34,12 +34,16 @@
|
|||
* ERROR_INVALID_PARAMETER."
|
||||
*/
|
||||
#define ConsoleInputUnicodeCharToAnsiChar(Console, dChar, sWChar) \
|
||||
ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \
|
||||
WideCharToMultiByte((Console)->InputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL)
|
||||
do { \
|
||||
ASSERT((ULONG_PTR)(dChar) != (ULONG_PTR)(sWChar)); \
|
||||
WideCharToMultiByte((Console)->InputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL); \
|
||||
} while (0)
|
||||
|
||||
#define ConsoleInputAnsiCharToUnicodeChar(Console, dWChar, sChar) \
|
||||
ASSERT((ULONG_PTR)dWChar != (ULONG_PTR)sChar); \
|
||||
MultiByteToWideChar((Console)->InputCodePage, 0, (sChar), 1, (dWChar), 1)
|
||||
do { \
|
||||
ASSERT((ULONG_PTR)(dWChar) != (ULONG_PTR)(sChar)); \
|
||||
MultiByteToWideChar((Console)->InputCodePage, 0, (sChar), 1, (dWChar), 1); \
|
||||
} while (0)
|
||||
|
||||
/* PRIVATE FUNCTIONS **********************************************************/
|
||||
|
||||
|
|
|
@ -29,8 +29,10 @@
|
|||
/* GLOBALS ********************************************************************/
|
||||
|
||||
#define ConsoleOutputUnicodeToAnsiChar(Console, dChar, sWChar) \
|
||||
ASSERT((ULONG_PTR)dChar != (ULONG_PTR)sWChar); \
|
||||
WideCharToMultiByte((Console)->OutputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL)
|
||||
do { \
|
||||
ASSERT((ULONG_PTR)(dChar) != (ULONG_PTR)(sWChar)); \
|
||||
WideCharToMultiByte((Console)->OutputCodePage, 0, (sWChar), 1, (dChar), 1, NULL, NULL); \
|
||||
} while (0)
|
||||
|
||||
/* TUI Console Window Class name */
|
||||
#define TUI_CONSOLE_WINDOW_CLASS L"TuiConsoleWindowClass"
|
||||
|
|
Loading…
Reference in a new issue