home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / C / BC_502 / RTLWIN32.PAK / WINCON.H < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-06  |  14.5 KB  |  741 lines

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