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