Annotation of mstools/h/wincon.h, revision 1.1.1.4

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

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.