home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / wincon.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  16KB  |  745 lines

  1. /*++ BUILD Version: 0002    // Increment this if a change has global effects
  2.  
  3. Copyright (c) 1989-1997  Microsoft Corporation
  4.  
  5. Module Name:
  6.  
  7.     wincon.h
  8.  
  9. Abstract:
  10.  
  11.     This module contains the public data structures, data types,
  12.     and procedures exported by the NT console subsystem.
  13.  
  14. Created:
  15.  
  16.     26-Oct-1990
  17.  
  18. Revision History:
  19.  
  20. --*/
  21.  
  22. #ifndef _WINCON_
  23. #define _WINCON_
  24.  
  25. #ifdef __cplusplus
  26. extern "C" {
  27. #endif
  28.  
  29. typedef struct _COORD {
  30.     SHORT X;
  31.     SHORT Y;
  32. } COORD, *PCOORD;
  33.  
  34. typedef struct _SMALL_RECT {
  35.     SHORT Left;
  36.     SHORT Top;
  37.     SHORT Right;
  38.     SHORT Bottom;
  39. } SMALL_RECT, *PSMALL_RECT;
  40.  
  41. typedef struct _KEY_EVENT_RECORD {
  42.     BOOL bKeyDown;
  43.     WORD wRepeatCount;
  44.     WORD wVirtualKeyCode;
  45.     WORD wVirtualScanCode;
  46.     union {
  47.         WCHAR UnicodeChar;
  48.         CHAR   AsciiChar;
  49.     } uChar;
  50.     DWORD dwControlKeyState;
  51. } KEY_EVENT_RECORD, *PKEY_EVENT_RECORD;
  52.  
  53. //
  54. // ControlKeyState flags
  55. //
  56.  
  57. #define RIGHT_ALT_PRESSED     0x0001 // the right alt key is pressed.
  58. #define LEFT_ALT_PRESSED      0x0002 // the left alt key is pressed.
  59. #define RIGHT_CTRL_PRESSED    0x0004 // the right ctrl key is pressed.
  60. #define LEFT_CTRL_PRESSED     0x0008 // the left ctrl key is pressed.
  61. #define SHIFT_PRESSED         0x0010 // the shift key is pressed.
  62. #define NUMLOCK_ON            0x0020 // the numlock light is on.
  63. #define SCROLLLOCK_ON         0x0040 // the scrolllock light is on.
  64. #define CAPSLOCK_ON           0x0080 // the capslock light is on.
  65. #define ENHANCED_KEY          0x0100 // the key is enhanced.
  66. #define NLS_DBCSCHAR          0x00010000 // DBCS for JPN: SBCS/DBCS mode.
  67. #define NLS_ALPHANUMERIC      0x00000000 // DBCS for JPN: Alphanumeric mode.
  68. #define NLS_KATAKANA          0x00020000 // DBCS for JPN: Katakana mode.
  69. #define NLS_HIRAGANA          0x00040000 // DBCS for JPN: Hiragana mode.
  70. #define NLS_ROMAN             0x00400000 // DBCS for JPN: Roman/Noroman mode.
  71. #define NLS_IME_CONVERSION    0x00800000 // DBCS for JPN: IME conversion.
  72. #define NLS_IME_DISABLE       0x20000000 // DBCS for JPN: IME enable/disable.
  73.  
  74. typedef struct _MOUSE_EVENT_RECORD {
  75.     COORD dwMousePosition;
  76.     DWORD dwButtonState;
  77.     DWORD dwControlKeyState;
  78.     DWORD dwEventFlags;
  79. } MOUSE_EVENT_RECORD, *PMOUSE_EVENT_RECORD;
  80.  
  81. //
  82. // ButtonState flags
  83. //
  84.  
  85. #define FROM_LEFT_1ST_BUTTON_PRESSED    0x0001
  86. #define RIGHTMOST_BUTTON_PRESSED        0x0002
  87. #define FROM_LEFT_2ND_BUTTON_PRESSED    0x0004
  88. #define FROM_LEFT_3RD_BUTTON_PRESSED    0x0008
  89. #define FROM_LEFT_4TH_BUTTON_PRESSED    0x0010
  90.  
  91. //
  92. // EventFlags
  93. //
  94.  
  95. #define MOUSE_MOVED   0x0001
  96. #define DOUBLE_CLICK  0x0002
  97. #define MOUSE_WHEELED 0x0004
  98.  
  99. typedef struct _WINDOW_BUFFER_SIZE_RECORD {
  100.     COORD dwSize;
  101. } WINDOW_BUFFER_SIZE_RECORD, *PWINDOW_BUFFER_SIZE_RECORD;
  102.  
  103. typedef struct _MENU_EVENT_RECORD {
  104.     UINT dwCommandId;
  105. } MENU_EVENT_RECORD, *PMENU_EVENT_RECORD;
  106.  
  107. typedef struct _FOCUS_EVENT_RECORD {
  108.     BOOL bSetFocus;
  109. } FOCUS_EVENT_RECORD, *PFOCUS_EVENT_RECORD;
  110.  
  111. typedef struct _INPUT_RECORD {
  112.     WORD EventType;
  113.     union {
  114.         KEY_EVENT_RECORD KeyEvent;
  115.         MOUSE_EVENT_RECORD MouseEvent;
  116.         WINDOW_BUFFER_SIZE_RECORD WindowBufferSizeEvent;
  117.         MENU_EVENT_RECORD MenuEvent;
  118.         FOCUS_EVENT_RECORD FocusEvent;
  119.     } Event;
  120. } INPUT_RECORD, *PINPUT_RECORD;
  121.  
  122. //
  123. //  EventType flags:
  124. //
  125.  
  126. #define KEY_EVENT         0x0001 // Event contains key event record
  127. #define MOUSE_EVENT       0x0002 // Event contains mouse event record
  128. #define WINDOW_BUFFER_SIZE_EVENT 0x0004 // Event contains window change event record
  129. #define MENU_EVENT 0x0008 // Event contains menu event record
  130. #define FOCUS_EVENT 0x0010 // event contains focus change
  131.  
  132. typedef struct _CHAR_INFO {
  133.     union {
  134.         WCHAR UnicodeChar;
  135.         CHAR   AsciiChar;
  136.     } Char;
  137.     WORD Attributes;
  138. } CHAR_INFO, *PCHAR_INFO;
  139.  
  140. //
  141. // Attributes flags:
  142. //
  143.  
  144. #define FOREGROUND_BLUE      0x0001 // text color contains blue.
  145. #define FOREGROUND_GREEN     0x0002 // text color contains green.
  146. #define FOREGROUND_RED       0x0004 // text color contains red.
  147. #define FOREGROUND_INTENSITY 0x0008 // text color is intensified.
  148. #define BACKGROUND_BLUE      0x0010 // background color contains blue.
  149. #define BACKGROUND_GREEN     0x0020 // background color contains green.
  150. #define BACKGROUND_RED       0x0040 // background color contains red.
  151. #define BACKGROUND_INTENSITY 0x0080 // background color is intensified.
  152. #define COMMON_LVB_LEADING_BYTE    0x0100 // Leading Byte of DBCS
  153. #define COMMON_LVB_TRAILING_BYTE   0x0200 // Trailing Byte of DBCS
  154. #define COMMON_LVB_GRID_HORIZONTAL 0x0400 // DBCS: Grid attribute: top horizontal.
  155. #define COMMON_LVB_GRID_LVERTICAL  0x0800 // DBCS: Grid attribute: left vertical.
  156. #define COMMON_LVB_GRID_RVERTICAL  0x1000 // DBCS: Grid attribute: right vertical.
  157. #define COMMON_LVB_REVERSE_VIDEO   0x4000 // DBCS: Reverse fore/back ground attribute.
  158. #define COMMON_LVB_UNDERSCORE      0x8000 // DBCS: Underscore.
  159.  
  160. #define COMMON_LVB_SBCSDBCS        0x0300 // SBCS or DBCS flag.
  161.  
  162.  
  163. typedef struct _CONSOLE_SCREEN_BUFFER_INFO {
  164.     COORD dwSize;
  165.     COORD dwCursorPosition;
  166.     WORD  wAttributes;
  167.     SMALL_RECT srWindow;
  168.     COORD dwMaximumWindowSize;
  169. } CONSOLE_SCREEN_BUFFER_INFO, *PCONSOLE_SCREEN_BUFFER_INFO;
  170.  
  171. typedef struct _CONSOLE_CURSOR_INFO {
  172.     DWORD  dwSize;
  173.     BOOL   bVisible;
  174. } CONSOLE_CURSOR_INFO, *PCONSOLE_CURSOR_INFO;
  175.  
  176. //
  177. // typedef for ctrl-c handler routines
  178. //
  179.  
  180. typedef
  181. BOOL
  182. (WINAPI *PHANDLER_ROUTINE)(
  183.     DWORD CtrlType
  184.     );
  185.  
  186. #define CTRL_C_EVENT        0
  187. #define CTRL_BREAK_EVENT    1
  188. #define CTRL_CLOSE_EVENT    2
  189. // 3 is reserved!
  190. // 4 is reserved!
  191. #define CTRL_LOGOFF_EVENT   5
  192. #define CTRL_SHUTDOWN_EVENT 6
  193.  
  194. //
  195. //  Input Mode flags:
  196. //
  197.  
  198. #define ENABLE_PROCESSED_INPUT 0x0001
  199. #define ENABLE_LINE_INPUT      0x0002
  200. #define ENABLE_ECHO_INPUT      0x0004
  201. #define ENABLE_WINDOW_INPUT    0x0008
  202. #define ENABLE_MOUSE_INPUT     0x0010
  203.  
  204. //
  205. // Output Mode flags:
  206. //
  207.  
  208. #define ENABLE_PROCESSED_OUTPUT    0x0001
  209. #define ENABLE_WRAP_AT_EOL_OUTPUT  0x0002
  210.  
  211. //
  212. // direct API definitions.
  213. //
  214.  
  215. WINBASEAPI
  216. BOOL
  217. WINAPI
  218. PeekConsoleInputA(
  219.     HANDLE hConsoleInput,
  220.     PINPUT_RECORD lpBuffer,
  221.     DWORD nLength,
  222.     LPDWORD lpNumberOfEventsRead
  223.     );
  224. WINBASEAPI
  225. BOOL
  226. WINAPI
  227. PeekConsoleInputW(
  228.     HANDLE hConsoleInput,
  229.     PINPUT_RECORD lpBuffer,
  230.     DWORD nLength,
  231.     LPDWORD lpNumberOfEventsRead
  232.     );
  233. #ifdef UNICODE
  234. #define PeekConsoleInput  PeekConsoleInputW
  235. #else
  236. #define PeekConsoleInput  PeekConsoleInputA
  237. #endif // !UNICODE
  238.  
  239. WINBASEAPI
  240. BOOL
  241. WINAPI
  242. ReadConsoleInputA(
  243.     HANDLE hConsoleInput,
  244.     PINPUT_RECORD lpBuffer,
  245.     DWORD nLength,
  246.     LPDWORD lpNumberOfEventsRead
  247.     );
  248. WINBASEAPI
  249. BOOL
  250. WINAPI
  251. ReadConsoleInputW(
  252.     HANDLE hConsoleInput,
  253.     PINPUT_RECORD lpBuffer,
  254.     DWORD nLength,
  255.     LPDWORD lpNumberOfEventsRead
  256.     );
  257. #ifdef UNICODE
  258. #define ReadConsoleInput  ReadConsoleInputW
  259. #else
  260. #define ReadConsoleInput  ReadConsoleInputA
  261. #endif // !UNICODE
  262.  
  263. WINBASEAPI
  264. BOOL
  265. WINAPI
  266. WriteConsoleInputA(
  267.     HANDLE hConsoleInput,
  268.     CONST INPUT_RECORD *lpBuffer,
  269.     DWORD nLength,
  270.     LPDWORD lpNumberOfEventsWritten
  271.     );
  272. WINBASEAPI
  273. BOOL
  274. WINAPI
  275. WriteConsoleInputW(
  276.     HANDLE hConsoleInput,
  277.     CONST INPUT_RECORD *lpBuffer,
  278.     DWORD nLength,
  279.     LPDWORD lpNumberOfEventsWritten
  280.     );
  281. #ifdef UNICODE
  282. #define WriteConsoleInput  WriteConsoleInputW
  283. #else
  284. #define WriteConsoleInput  WriteConsoleInputA
  285. #endif // !UNICODE
  286.  
  287. WINBASEAPI
  288. BOOL
  289. WINAPI
  290. ReadConsoleOutputA(
  291.     HANDLE hConsoleOutput,
  292.     PCHAR_INFO lpBuffer,
  293.     COORD dwBufferSize,
  294.     COORD dwBufferCoord,
  295.     PSMALL_RECT lpReadRegion
  296.     );
  297. WINBASEAPI
  298. BOOL
  299. WINAPI
  300. ReadConsoleOutputW(
  301.     HANDLE hConsoleOutput,
  302.     PCHAR_INFO lpBuffer,
  303.     COORD dwBufferSize,
  304.     COORD dwBufferCoord,
  305.     PSMALL_RECT lpReadRegion
  306.     );
  307. #ifdef UNICODE
  308. #define ReadConsoleOutput  ReadConsoleOutputW
  309. #else
  310. #define ReadConsoleOutput  ReadConsoleOutputA
  311. #endif // !UNICODE
  312.  
  313. WINBASEAPI
  314. BOOL
  315. WINAPI
  316. WriteConsoleOutputA(
  317.     HANDLE hConsoleOutput,
  318.     CONST CHAR_INFO *lpBuffer,
  319.     COORD dwBufferSize,
  320.     COORD dwBufferCoord,
  321.     PSMALL_RECT lpWriteRegion
  322.     );
  323. WINBASEAPI
  324. BOOL
  325. WINAPI
  326. WriteConsoleOutputW(
  327.     HANDLE hConsoleOutput,
  328.     CONST CHAR_INFO *lpBuffer,
  329.     COORD dwBufferSize,
  330.     COORD dwBufferCoord,
  331.     PSMALL_RECT lpWriteRegion
  332.     );
  333. #ifdef UNICODE
  334. #define WriteConsoleOutput  WriteConsoleOutputW
  335. #else
  336. #define WriteConsoleOutput  WriteConsoleOutputA
  337. #endif // !UNICODE
  338.  
  339. WINBASEAPI
  340. BOOL
  341. WINAPI
  342. ReadConsoleOutputCharacterA(
  343.     HANDLE hConsoleOutput,
  344.     LPSTR lpCharacter,
  345.     DWORD nLength,
  346.     COORD dwReadCoord,
  347.     LPDWORD lpNumberOfCharsRead
  348.     );
  349. WINBASEAPI
  350. BOOL
  351. WINAPI
  352. ReadConsoleOutputCharacterW(
  353.     HANDLE hConsoleOutput,
  354.     LPWSTR lpCharacter,
  355.     DWORD nLength,
  356.     COORD dwReadCoord,
  357.     LPDWORD lpNumberOfCharsRead
  358.     );
  359. #ifdef UNICODE
  360. #define ReadConsoleOutputCharacter  ReadConsoleOutputCharacterW
  361. #else
  362. #define ReadConsoleOutputCharacter  ReadConsoleOutputCharacterA
  363. #endif // !UNICODE
  364.  
  365. WINBASEAPI
  366. BOOL
  367. WINAPI
  368. ReadConsoleOutputAttribute(
  369.     HANDLE hConsoleOutput,
  370.     LPWORD lpAttribute,
  371.     DWORD nLength,
  372.     COORD dwReadCoord,
  373.     LPDWORD lpNumberOfAttrsRead
  374.     );
  375.  
  376. WINBASEAPI
  377. BOOL
  378. WINAPI
  379. WriteConsoleOutputCharacterA(
  380.     HANDLE hConsoleOutput,
  381.     LPCSTR lpCharacter,
  382.     DWORD nLength,
  383.     COORD dwWriteCoord,
  384.     LPDWORD lpNumberOfCharsWritten
  385.     );
  386. WINBASEAPI
  387. BOOL
  388. WINAPI
  389. WriteConsoleOutputCharacterW(
  390.     HANDLE hConsoleOutput,
  391.     LPCWSTR lpCharacter,
  392.     DWORD nLength,
  393.     COORD dwWriteCoord,
  394.     LPDWORD lpNumberOfCharsWritten
  395.     );
  396. #ifdef UNICODE
  397. #define WriteConsoleOutputCharacter  WriteConsoleOutputCharacterW
  398. #else
  399. #define WriteConsoleOutputCharacter  WriteConsoleOutputCharacterA
  400. #endif // !UNICODE
  401.  
  402. WINBASEAPI
  403. BOOL
  404. WINAPI
  405. WriteConsoleOutputAttribute(
  406.     HANDLE hConsoleOutput,
  407.     CONST WORD *lpAttribute,
  408.     DWORD nLength,
  409.     COORD dwWriteCoord,
  410.     LPDWORD lpNumberOfAttrsWritten
  411.     );
  412.  
  413. WINBASEAPI
  414. BOOL
  415. WINAPI
  416. FillConsoleOutputCharacterA(
  417.     HANDLE hConsoleOutput,
  418.     CHAR  cCharacter,
  419.     DWORD  nLength,
  420.     COORD  dwWriteCoord,
  421.     LPDWORD lpNumberOfCharsWritten
  422.     );
  423. WINBASEAPI
  424. BOOL
  425. WINAPI
  426. FillConsoleOutputCharacterW(
  427.     HANDLE hConsoleOutput,
  428.     WCHAR  cCharacter,
  429.     DWORD  nLength,
  430.     COORD  dwWriteCoord,
  431.     LPDWORD lpNumberOfCharsWritten
  432.     );
  433. #ifdef UNICODE
  434. #define FillConsoleOutputCharacter  FillConsoleOutputCharacterW
  435. #else
  436. #define FillConsoleOutputCharacter  FillConsoleOutputCharacterA
  437. #endif // !UNICODE
  438.  
  439. WINBASEAPI
  440. BOOL
  441. WINAPI
  442. FillConsoleOutputAttribute(
  443.     HANDLE hConsoleOutput,
  444.     WORD   wAttribute,
  445.     DWORD  nLength,
  446.     COORD  dwWriteCoord,
  447.     LPDWORD lpNumberOfAttrsWritten
  448.     );
  449.  
  450. WINBASEAPI
  451. BOOL
  452. WINAPI
  453. GetConsoleMode(
  454.     HANDLE hConsoleHandle,
  455.     LPDWORD lpMode
  456.     );
  457.  
  458. WINBASEAPI
  459. BOOL
  460. WINAPI
  461. GetNumberOfConsoleInputEvents(
  462.     HANDLE hConsoleInput,
  463.     LPDWORD lpNumberOfEvents
  464.     );
  465.  
  466. WINBASEAPI
  467. BOOL
  468. WINAPI
  469. GetConsoleScreenBufferInfo(
  470.     HANDLE hConsoleOutput,
  471.     PCONSOLE_SCREEN_BUFFER_INFO lpConsoleScreenBufferInfo
  472.     );
  473.  
  474. WINBASEAPI
  475. COORD
  476. WINAPI
  477. GetLargestConsoleWindowSize(
  478.     HANDLE hConsoleOutput
  479.     );
  480.  
  481. WINBASEAPI
  482. BOOL
  483. WINAPI
  484. GetConsoleCursorInfo(
  485.     HANDLE hConsoleOutput,
  486.     PCONSOLE_CURSOR_INFO lpConsoleCursorInfo
  487.     );
  488.  
  489. WINBASEAPI
  490. BOOL
  491. WINAPI
  492. GetNumberOfConsoleMouseButtons(
  493.     LPDWORD lpNumberOfMouseButtons
  494.     );
  495.  
  496. WINBASEAPI
  497. BOOL
  498. WINAPI
  499. SetConsoleMode(
  500.     HANDLE hConsoleHandle,
  501.     DWORD dwMode
  502.     );
  503.  
  504. WINBASEAPI
  505. BOOL
  506. WINAPI
  507. SetConsoleActiveScreenBuffer(
  508.     HANDLE hConsoleOutput
  509.     );
  510.  
  511. WINBASEAPI
  512. BOOL
  513. WINAPI
  514. FlushConsoleInputBuffer(
  515.     HANDLE hConsoleInput
  516.     );
  517.  
  518. WINBASEAPI
  519. BOOL
  520. WINAPI
  521. SetConsoleScreenBufferSize(
  522.     HANDLE hConsoleOutput,
  523.     COORD dwSize
  524.     );
  525.  
  526. WINBASEAPI
  527. BOOL
  528. WINAPI
  529. SetConsoleCursorPosition(
  530.     HANDLE hConsoleOutput,
  531.     COORD dwCursorPosition
  532.     );
  533.  
  534. WINBASEAPI
  535. BOOL
  536. WINAPI
  537. SetConsoleCursorInfo(
  538.     HANDLE hConsoleOutput,
  539.     CONST CONSOLE_CURSOR_INFO *lpConsoleCursorInfo
  540.     );
  541.  
  542. WINBASEAPI
  543. BOOL
  544. WINAPI
  545. ScrollConsoleScreenBufferA(
  546.     HANDLE hConsoleOutput,
  547.     CONST SMALL_RECT *lpScrollRectangle,
  548.     CONST SMALL_RECT *lpClipRectangle,
  549.     COORD dwDestinationOrigin,
  550.     CONST CHAR_INFO *lpFill
  551.     );
  552. WINBASEAPI
  553. BOOL
  554. WINAPI
  555. ScrollConsoleScreenBufferW(
  556.     HANDLE hConsoleOutput,
  557.     CONST SMALL_RECT *lpScrollRectangle,
  558.     CONST SMALL_RECT *lpClipRectangle,
  559.     COORD dwDestinationOrigin,
  560.     CONST CHAR_INFO *lpFill
  561.     );
  562. #ifdef UNICODE
  563. #define ScrollConsoleScreenBuffer  ScrollConsoleScreenBufferW
  564. #else
  565. #define ScrollConsoleScreenBuffer  ScrollConsoleScreenBufferA
  566. #endif // !UNICODE
  567.  
  568. WINBASEAPI
  569. BOOL
  570. WINAPI
  571. SetConsoleWindowInfo(
  572.     HANDLE hConsoleOutput,
  573.     BOOL bAbsolute,
  574.     CONST SMALL_RECT *lpConsoleWindow
  575.     );
  576.  
  577. WINBASEAPI
  578. BOOL
  579. WINAPI
  580. SetConsoleTextAttribute(
  581.     HANDLE hConsoleOutput,
  582.     WORD wAttributes
  583.     );
  584.  
  585. WINBASEAPI
  586. BOOL
  587. WINAPI
  588. SetConsoleCtrlHandler(
  589.     PHANDLER_ROUTINE HandlerRoutine,
  590.     BOOL Add
  591.     );
  592.  
  593. WINBASEAPI
  594. BOOL
  595. WINAPI
  596. GenerateConsoleCtrlEvent(
  597.     DWORD dwCtrlEvent,
  598.     DWORD dwProcessGroupId
  599.     );
  600.  
  601. WINBASEAPI
  602. BOOL
  603. WINAPI
  604. AllocConsole( VOID );
  605.  
  606. WINBASEAPI
  607. BOOL
  608. WINAPI
  609. FreeConsole( VOID );
  610.  
  611.  
  612. WINBASEAPI
  613. DWORD
  614. WINAPI
  615. GetConsoleTitleA(
  616.     LPSTR lpConsoleTitle,
  617.     DWORD nSize
  618.     );
  619. WINBASEAPI
  620. DWORD
  621. WINAPI
  622. GetConsoleTitleW(
  623.     LPWSTR lpConsoleTitle,
  624.     DWORD nSize
  625.     );
  626. #ifdef UNICODE
  627. #define GetConsoleTitle  GetConsoleTitleW
  628. #else
  629. #define GetConsoleTitle  GetConsoleTitleA
  630. #endif // !UNICODE
  631.  
  632. WINBASEAPI
  633. BOOL
  634. WINAPI
  635. SetConsoleTitleA(
  636.     LPCSTR lpConsoleTitle
  637.     );
  638. WINBASEAPI
  639. BOOL
  640. WINAPI
  641. SetConsoleTitleW(
  642.     LPCWSTR lpConsoleTitle
  643.     );
  644. #ifdef UNICODE
  645. #define SetConsoleTitle  SetConsoleTitleW
  646. #else
  647. #define SetConsoleTitle  SetConsoleTitleA
  648. #endif // !UNICODE
  649.  
  650. WINBASEAPI
  651. BOOL
  652. WINAPI
  653. ReadConsoleA(
  654.     HANDLE hConsoleInput,
  655.     LPVOID lpBuffer,
  656.     DWORD nNumberOfCharsToRead,
  657.     LPDWORD lpNumberOfCharsRead,
  658.     LPVOID lpReserved
  659.     );
  660. WINBASEAPI
  661. BOOL
  662. WINAPI
  663. ReadConsoleW(
  664.     HANDLE hConsoleInput,
  665.     LPVOID lpBuffer,
  666.     DWORD nNumberOfCharsToRead,
  667.     LPDWORD lpNumberOfCharsRead,
  668.     LPVOID lpReserved
  669.     );
  670. #ifdef UNICODE
  671. #define ReadConsole  ReadConsoleW
  672. #else
  673. #define ReadConsole  ReadConsoleA
  674. #endif // !UNICODE
  675.  
  676. WINBASEAPI
  677. BOOL
  678. WINAPI
  679. WriteConsoleA(
  680.     HANDLE hConsoleOutput,
  681.     CONST VOID *lpBuffer,
  682.     DWORD nNumberOfCharsToWrite,
  683.     LPDWORD lpNumberOfCharsWritten,
  684.     LPVOID lpReserved
  685.     );
  686. WINBASEAPI
  687. BOOL
  688. WINAPI
  689. WriteConsoleW(
  690.     HANDLE hConsoleOutput,
  691.     CONST VOID *lpBuffer,
  692.     DWORD nNumberOfCharsToWrite,
  693.     LPDWORD lpNumberOfCharsWritten,
  694.     LPVOID lpReserved
  695.     );
  696. #ifdef UNICODE
  697. #define WriteConsole  WriteConsoleW
  698. #else
  699. #define WriteConsole  WriteConsoleA
  700. #endif // !UNICODE
  701.  
  702. #define CONSOLE_TEXTMODE_BUFFER  1
  703.  
  704. WINBASEAPI
  705. HANDLE
  706. WINAPI
  707. CreateConsoleScreenBuffer(
  708.     DWORD dwDesiredAccess,
  709.     DWORD dwShareMode,
  710.     CONST SECURITY_ATTRIBUTES *lpSecurityAttributes,
  711.     DWORD dwFlags,
  712.     LPVOID lpScreenBufferData
  713.     );
  714.  
  715. WINBASEAPI
  716. UINT
  717. WINAPI
  718. GetConsoleCP( VOID );
  719.  
  720. WINBASEAPI
  721. BOOL
  722. WINAPI
  723. SetConsoleCP(
  724.     UINT wCodePageID
  725.     );
  726.  
  727. WINBASEAPI
  728. UINT
  729. WINAPI
  730. GetConsoleOutputCP( VOID );
  731.  
  732. WINBASEAPI
  733. BOOL
  734. WINAPI
  735. SetConsoleOutputCP(
  736.     UINT wCodePageID
  737.     );
  738.  
  739. #ifdef __cplusplus
  740. }
  741. #endif
  742.  
  743. #endif // _WINCON_
  744.  
  745.