═══ 1. Introduction ═══ 32-bit Unicode Console API Users' Guide. Copyright (c) 2000 Jonathan de Boyne Pollard. All rights reserved worldwide. This is the users' guide for the 32-bit Unicode Console API. Software licence This software is copyright in order to protect the good name of the author and in order to prevent other people from passing it off as their own and making money from it. The author wants this software to enjoy as wide an audience as possible, and also wants you to receive this software as it was originally released. Therefore: You may archive, store, copy, and distribute this software (which means the programs, and any accompanying electronic documentation, helptext, and message or data files) in its entire original, unmodified, form for any purpose, commercial or otherwise. In fact you are encouraged to give copies of this software to your friends so that they can enjoy it too. You may make limited modifications to the original distribution archive before passing it on to others, to convert it to another archive format (extended attributes and long filenames must be preserved, however), or to add archive comments in order to advertise BBSes and the like (a FILE_ID.DIZ description file is already supplied in the distribution archive, however). You may not pass this software off as your own, attempt to modify it, or obscure or remove the copyright notices or this software licence in any way. Nor may you attempt to make money from distributing it to others apart from media costs. You may not (and this part is especially true for those madly litigious Americans) sue the author or anybody else in respect of any supposed guarantee. You receive this software exactly "as is". There's no guarantee whatsoever. The author takes pride in his work, and naturally wants the software to behave well and do its job; but he isn't prepared (certainly not for software that you are getting entirely for free) to make any sort of guarantee of merchantability or fitness for any purpose. Bug fixes and enhancements to the software will occur entirely at the whim of the author, as and when he has spare time to write them. If you want a specific modification to the software, please remember that the author is a professional programmer. You can always pay him to write it! The source code for the software is the product of a lot of time, skill, and effort. It is not given away for free. If you need to have access to the source code, approach the author about paying for a source code licence. Technical support for the installation or use of the software consumes time and effort. If you need such support, approach the author about paying for a support contract. ═══ 2. Distributing the runtime DLLs ═══ IBM OS/2 does not contain the DLLs necessary for programs that use the 32-bit Unicode Console API. If one wishes to run such an application on IBM OS/2, the DLLs must be installed. You may bundle the necessary Console API DLLs for IBM OS/2 along with your application. If you do so, your application's installation program must ensure that it does not overwrite any DLLs with older versions. However, it is suggested that instead you instruct your users to obtain CONRT.ZIP or CONRT.RAR from a central source, such as your favourite site for OS/2 files, and install it beforehand. This will avoid both the need for bundling the DLLs with your application, and the need to worry about installing them properly when your application is installed. The CONRT package contains versions of the DLLs that are suitable for 32-bit IBM OS/2 (i.e. versions 2.0.1 upwards). Full instructions explaining to end users how to install the DLLs are supplied in the "Read Me" file that is included within the package. If your favourite site for OS/2 files does not include CONRT.ZIP or CONRT.RAR, they are provided along with the 32-bit Unicode Console API developers' toolkit so that you can upload them. They must be uploaded exactly as provided, with no modifications. ═══ 3. About the console API ═══ ═══ 3.1. Consoles and Unicode ═══ The Console API functions all operate in terms of Unicode. The text-mode screen buffer of a console buffer object comprises an array of cells. Each cell comprises an attribute value and a Unicode character. When the text-mode screen buffer is displayed on the display, the Unicode characters are converted to the display character set. The display character set is determined by the current output code page of the console buffer object. ═══ 3.2. Console modes ═══ Various behavioural aspects of the "glass TTY" (a.k.a. "high level") interface to consoles, can be controlled by setting console mode flags. Note: Console mode flags have no effect on IBM OS/2. These modes affect "high level" output: DISABLE_ANSI_CSI_SEQUENCES If this mode is unset, ANSI CSI sequences are recognised and processed. If this mode is set, ANSI CSI sequences are not recognised, and are displayed as a sequence of appropriate glyphs instead. DISABLE_ANSI_CONTROL_CHARS If this mode is unset, the ANSI control characters BS, TAB, FF, LF, CR, and VT will cause the appropriate cursor motions and screen changes. If this mode is set, those ANSI control characters will not be treated specially, and will display the appropriate glyphs. DISABLE_WRAP_AT_EOL If this mode is unset, output will wrap around to the next line on the screen once it reaches the end of a line, scrolling the screen up one line if it reaches the last line on the screen, and the BS ANSI control character (if DISABLE_ANSI_CONTROL_CHARS is not set) will wrap around to the previous line on the screen if the cursor is at the beginning of a line. ENABLE_UTF8_OUTPUT If this mode is unset, characters written to the output are treated as single-byte characters and translated to Unicode using the process' current code page. If this mode is set, characters written to the output are expected to form multi-byte UTF8 sequences that map onto Unicode characters, and the process' current code page is ignored. These modes affect "high level" input: DISABLE_EDITING_KEYS If this mode is unset, editing keys such as BACKSPACE will cause the appropriate actions in the line buffer. If this mode is set, editing keys will be treated no differently to all other keys. If line input is being echoed and this mode is unset, then ANSI control characters will be displayed in order to display the editing operation, and it is recommended that the output console buffer thus not have DISABLE_ANSI_CONTROL_CHARS set. DISABLE_LINE_INPUT If this mode is unset, a call to read the console will not return until the ENTER key is pressed, and the caller's supplied buffer will be filled with characters from the input line. If this mode is set, the call will return when no more keypresses are immediately available, and the ENTER key will not be treated specially. DISABLE_LINE_INPUT_ECHO If this mode is unset, line input (which itself will only happen if DISABLE_LINE_INPUT is unset) will be echoed to the output console buffer. If this mode is set, line input will not be echoed. ═══ 4. Console API Reference ═══ ═══ 4.1. Functions ═══ All of the Console API functions are declared when the macro INCL_CONSOLE is defined prior to the first inclusion of the header. Defining the INCL_BASE macro will implicitly cause the INCL_CONSOLE macro to be defined. To link an application that uses the Console API, use the CONCALLS.LIB import library. ═══ 4.1.1. DosWriteConsoleOutputCellStr ═══ C++ language function declaration APIRET APIENTRY DosWriteConsoleOutputCellStr ( HFILE Handle, const CONSOLE_CELL * PtrCellStr, size_t Cells, size_t Row, size_t Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 PtrCellStr A pointer to an array of character/attribute cells. Cells The number of cells to modify. Row The starting row position. Col The starting column position. Return value An OS/2 system error code. Remarks ═══ 4.1.2. DosWriteConsoleOutputCharStr ═══ C++ language function declaration APIRET APIENTRY DosWriteConsoleOutputCharStr ( HFILE Handle, const CONSOLE_UNICHAR * PtrCharStr, size_t Chars, size_t Row, size_t Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 PtrCharStr A pointer to an array of characters. Chars The number of characters to modify. Row The starting row position. Col The starting column position. Return value An OS/2 system error code. Remarks ═══ 4.1.3. DosWriteConsoleOutputAttrStr ═══ C++ language function declaration APIRET APIENTRY DosWriteConsoleOutputAttrStr ( HFILE Handle, const unsigned short * PtrAttrStr, size_t Attrs, size_t Row, size_t Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 PtrAttrStr A pointer to an array of attributes. Attrs The number of attributes to modify. Row The starting row position. Col The starting column position. Return value An OS/2 system error code. Remarks ═══ 4.1.4. DosWriteConsoleOutputCharStrAttr ═══ C++ language function declaration APIRET APIENTRY DosWriteConsoleOutputCharStrAttr ( HFILE Handle, const CONSOLE_UNICHAR * PtrCharStr, size_t Chars, size_t Row, size_t Col, unsigned char Attr ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 PtrCharStr A pointer to an array of characters. Chars The number of characters to modify. Row The starting row position. Col The starting column position. Attr The attribute to use for all characters. Return value An OS/2 system error code. Remarks ═══ 4.1.5. DosWriteConsoleOutputNCell ═══ C++ language function declaration APIRET APIENTRY DosWriteConsoleOutputNCell ( HFILE Handle, const CONSOLE_CELL & Cell, size_t Cells, size_t Row, size_t Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Cell The character/attribute cell to write. Cells The number of cells to modify. Row The starting row position. Col The starting column position. Return value An OS/2 system error code. Remarks ═══ 4.1.6. DosWriteConsoleOutputNChar ═══ C++ language function declaration APIRET APIENTRY DosWriteConsoleOutputNChar ( HFILE Handle, CONSOLE_UNICHAR Char, size_t Chars, size_t Row, size_t Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Char The character to write. Chars The number of characters to modify. Row The starting row position. Col The starting column position. Return value An OS/2 system error code. Remarks ═══ 4.1.7. DosWriteConsoleOutputNAttr ═══ C++ language function declaration APIRET APIENTRY DosWriteConsoleOutputNAttr ( HFILE Handle, unsigned char Attr, size_t Attrs, size_t Row, size_t Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Attr The attribute to write. Attrs The number of attributes to modify. Row The starting row position. Col The starting column position. Return value An OS/2 system error code. Remarks ═══ 4.1.8. DosReadConsoleOutputCellStr ═══ C++ language function declaration APIRET APIENTRY DosReadConsoleOutputCellStr ( HFILE Handle, CONSOLE_CELL * PtrCellStr, size_t Cells, size_t Row, size_t Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 PtrCellStr A pointer to an array of character/attribute cells. Cells The number of cells to query. Row The starting row position. Col The starting column position. Return value An OS/2 system error code. Remarks ═══ 4.1.9. DosReadConsoleOutputCharStr ═══ C++ language function declaration APIRET APIENTRY DosReadConsoleOutputCharStr ( HFILE Handle, CONSOLE_UNICHAR * PtrCharStr, size_t Chars, size_t Row, size_t Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 PtrCharStr A pointer to an array of characters. Chars The number of characters to query. Row The starting row position. Col The starting column position. Return value An OS/2 system error code. Remarks ═══ 4.1.10. DosReadConsoleOutputAttrStr ═══ C++ language function declaration APIRET APIENTRY DosReadConsoleOutputAttrStr ( HFILE Handle, unsigned short * PtrAttrStr, size_t Attrs, size_t Row, size_t Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 PtrAttrStr A pointer to an array of attributes. Attrs The number of attributes to query. Row The starting row position. Col The starting column position. Return value An OS/2 system error code. Remarks ═══ 4.1.11. DosSetConsoleCursorPos ═══ C++ language function declaration APIRET APIENTRY DosSetConsoleCursorPos ( HFILE Handle, size_t Row, size_t Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Row The new cursor row position. Col The new cursor column position. Return value An OS/2 system error code. Remarks Use DosSetConsoleCursorSize to make the cursor invisible. ═══ 4.1.12. DosQueryConsoleCursorPos ═══ C++ language function declaration APIRET APIENTRY DosQueryConsoleCursorPos ( HFILE Handle, size_t & Row, size_t & Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Row A reference to a variable wherein is stored the current cursor row position. Col A reference to a variable wherein is stored the current cursor column position. Return value An OS/2 system error code. Remarks ═══ 4.1.13. DosSetConsoleSize ═══ C++ language function declaration APIRET APIENTRY DosSetConsoleSize ( HFILE Handle, size_t Rows, size_t Cols ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Rows The new size in rows. Cols The new size in columns. Return value An OS/2 system error code. Remarks ═══ 4.1.14. DosQueryConsoleSize ═══ C++ language function declaration APIRET APIENTRY DosQueryConsoleSize ( HFILE Handle, size_t & Row, size_t & Col ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Rows A reference to a variable wherein is stored the current size in rows. Cols A reference to a variable wherein is stored the current size in columns. Return value An OS/2 system error code. Remarks On IBM OS/2, the available full-screen console sizes are determined by the currently configured Base Video Handler (which can be found by inspecting the value of the VIDEO_DEVICES environment variable). The range of available console sizes will vary from driver to driver. Most drivers will support 12, 24, 25, 28, 30, 40, 48, 50, or 60 rows; and 40 or 80 columns. ═══ 4.1.15. DosSetConsoleInputFocus ═══ C++ language function declaration APIRET APIENTRY DosSetConsoleInputFocus ( HFILE Handle ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 0 on IBM OS/2 Return value An OS/2 system error code. Note: This call returns a "not implemented" error on IBM OS/2. Remarks ═══ 4.1.16. DosSetConsoleOutputFocus ═══ C++ language function declaration APIRET APIENTRY DosSetConsoleOutputFocus ( HFILE Handle ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Return value An OS/2 system error code. Note: This call returns a "not implemented" error on IBM OS/2. Remarks ═══ 4.1.17. DosSetConsoleMode ═══ C++ language function declaration APIRET APIENTRY DosSetConsoleMode ( HFILE Handle, ULONG Flags ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Flags The new mode flags. Return value An OS/2 system error code. Remarks ═══ 4.1.18. DosQueryConsoleMode ═══ C++ language function declaration APIRET APIENTRY DosQueryConsoleMode ( HFILE Handle, ULONG & Flags ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Flags A reference to a variable wherein is stored the current mode flags. Return value An OS/2 system error code. Remarks ═══ 4.1.19. DosSetConsoleOutputAttr ═══ C++ language function declaration APIRET APIENTRY DosSetConsoleOutputAttr ( HFILE Handle, unsigned char OutputAttr, unsigned char ScrollAttr ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 OutputAttr The attribute to use for any printable characters generated during tty-style text output. ScrollAttr The attribute to use for any scrolling that occurs during tty-style text output. Return value An OS/2 system error code. Remarks ═══ 4.1.20. DosScrollConsoleDown ═══ C++ language function declaration APIRET APIENTRY DosScrollConsoleDown ( HFILE Handle, size_t Top, size_t Left, size_t Height, size_t Width, size_t Delta, const CONSOLE_CELL & Space ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Top The topmost row of the scrolled rectangle. Left The leftmost column of the scrolled rectangle. Height The height of the scrolled rectangle in characters. Width The width of the scrolled rectangle in characters. Delta The number of rows to scroll. Space The character/attribute value to fill empty cells with. Return value An OS/2 system error code. Remarks The scrolled rectangle is silently limited to the actual size of the screen. This allows -1UL to be used for the width and height parameters to mean "to the end of the screen". ═══ 4.1.21. DosScrollConsoleUp ═══ C++ language function declaration APIRET APIENTRY DosScrollConsoleUp ( HFILE Handle, size_t Top, size_t Left, size_t Height, size_t Width, size_t Delta, const CONSOLE_CELL & Space ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Top The topmost row of the scrolled rectangle. Left The leftmost column of the scrolled rectangle. Height The height of the scrolled rectangle in characters. Width The width of the scrolled rectangle in characters. Delta The number of rows to scroll. Space The character/attribute value to fill empty cells with. Return value An OS/2 system error code. Remarks The scrolled rectangle is silently limited to the actual size of the screen. This allows -1UL to be used for the width and height parameters to mean "to the end of the screen". ═══ 4.1.22. DosScrollConsoleLeft ═══ C++ language function declaration APIRET APIENTRY DosScrollConsoleLeft ( HFILE Handle, size_t Top, size_t Left, size_t Height, size_t Width, size_t Delta, const CONSOLE_CELL & Space ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Top The topmost row of the scrolled rectangle. Left The leftmost column of the scrolled rectangle. Height The height of the scrolled rectangle in characters. Width The width of the scrolled rectangle in characters. Delta The number of columns to scroll. Space The character/attribute value to fill empty cells with. Return value An OS/2 system error code. Remarks The scrolled rectangle is silently limited to the actual size of the screen. This allows -1UL to be used for the width and height parameters to mean "to the end of the screen". ═══ 4.1.23. DosScrollConsoleRight ═══ C++ language function declaration APIRET APIENTRY DosScrollConsoleRight ( HFILE Handle, size_t Top, size_t Left, size_t Height, size_t Width, size_t Delta, const CONSOLE_CELL & Space ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Top The topmost row of the scrolled rectangle. Left The leftmost column of the scrolled rectangle. Height The height of the scrolled rectangle in characters. Width The width of the scrolled rectangle in characters. Delta The number of columns to scroll. Space The character/attribute value to fill empty cells with. Return value An OS/2 system error code. Remarks The scrolled rectangle is silently limited to the actual size of the screen. This allows -1UL to be used for the width and height parameters to mean "to the end of the screen". ═══ 4.1.24. DosSetConsoleCursorSize ═══ C++ language function declaration APIRET APIENTRY DosSetConsoleCursorSize ( HFILE Handle, unsigned int PercentStart, unsigned int PercentEnd, BOOL Visible ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 PercentStart The percentage of the cell height of the cursor start line. PercentEnd The percentage of the cell height of the cursor end line. Visible The new cursor visibility status. Return value An OS/2 system error code. Remarks ═══ 4.1.25. DosQueryConsoleCursorSize ═══ C++ language function declaration APIRET APIENTRY DosQueryConsoleCursorSize ( HFILE Handle, unsigned int & PercentStart, unsigned int & PercentEnd, BOOL & Visible ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 PercentStart A reference to a variable wherein is stored the percentage of the cell height of the cursor start line. PercentEnd A reference to a variable wherein is stored the percentage of the cell height of the cursor end line. Visible A reference to a variable wherein is stored the current cursor visibility status. Return value An OS/2 system error code. Remarks ═══ 4.1.26. DosSetConsoleShiftState ═══ C++ language function declaration APIRET APIENTRY DosSetConsoleShiftState ( HFILE Handle, ULONG ShiftState ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 0 on IBM OS/2 ShiftState The new console keyboard shift state. Return value An OS/2 system error code. Remarks IBM OS/2 will ignore attempts to set the shift state flags for the "Windows" keys or the "fake CTRL" key to the pressed state. IBM OS/2 will also ignore attempts to modify the shift state in a windowed console. ═══ 4.1.27. DosQueryConsoleShiftState ═══ C++ language function declaration APIRET APIENTRY DosQueryConsoleShiftState ( HFILE Handle, ULONG & ShiftState ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 0 on IBM OS/2 ShiftState A reference to a variable wherein is stored the current keyboard shift state. Return value An OS/2 system error code. Remarks IBM OS/2 does not support the shift state flags for the "Windows" keys or the "fake CTRL" key, and will always report them as not depressed. ═══ 4.1.28. DosQueryMaximumConsoleSize ═══ C++ language function declaration APIRET APIENTRY DosQueryMaximumConsoleSize ( HFILE Handle, size_t & Rows, size_t & Cols ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 Rows A reference to a variable wherein is stored the maximum number of rows that the console may have. Cols A reference to a variable wherein is stored the maximum number of columns that the console may have. Return value An OS/2 system error code. Remarks On IBM OS/2, the range of available full-screen console sizes is not available from the Base Video Handler, so fixed values are returned. ═══ 4.1.29. DosSetConsoleOutputCodePage ═══ C++ language function declaration APIRET APIENTRY DosSetConsoleOutputCodePage ( HFILE Handle, unsigned int CodePage ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 CodePage The new code page to use for console output. Return value An OS/2 system error code. Remarks The output code page determines what subset of Unicode the console can actually display. Different code pages represent different subsets. Unicode characters not in the currently displayable subset will be displayed as a "default" character. ═══ 4.1.30. DosQueryConsoleOutputCodePage ═══ C++ language function declaration APIRET APIENTRY DosQueryConsoleOutputCodePage ( HFILE Handle, unsigned int & CodePage ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 1 on IBM OS/2 CodePage A reference to a variable wherein is stored the current console output code page. Return value An OS/2 system error code. Remarks ═══ 4.1.31. DosSetConsoleInputCodePage ═══ C++ language function declaration APIRET APIENTRY DosSetConsoleInputCodePage ( HFILE Handle, unsigned int CodePage ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 0 on IBM OS/2 CodePage The new input code page. Return value An OS/2 system error code. Remarks ═══ 4.1.32. DosQueryConsoleInputCodePage ═══ C++ language function declaration APIRET APIENTRY DosQueryConsoleInputCodePage ( HFILE Handle, unsigned int & CodePage ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 0 on IBM OS/2 CodePage A reference to a variable wherein is stored the current console input code page. Return value An OS/2 system error code. Remarks ═══ 4.1.33. DosReadConsoleInputEvent ═══ C++ language function declaration APIRET APIENTRY DosReadConsoleInputEvent ( HFILE Handle, CONSOLE_INPUT_EVENT * Events, size_t MaxEvents, size_t & NumEvents, BOOL remove ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 0 on IBM OS/2 Events A pointer to an array of CONSOLE_INPUT_EVENT stuctures. MaxEvents The maximum number of array elements that can be stored. NumEvents A reference to a variable wherein is stored the actual number of array elements that have been stored by the call. Remove A flag indicating whether or not to remove the input events from the queue. Return value An OS/2 system error code. Remarks This call blocks until one or more input events are available, and returns up to MaxEvents event structures in the array provided, indicating in NumEvents how many structures were actually filled. At least one event will be returned. (A MaxEvents value less than 1 is an error.) Note: The virtual key numbers in a keyboard event are the CON_KBD_KEY_XXX constants, not the VK_XXXX constants defined by the Presentation Manager API. A key event may have a virtual key code without having a character code, and vice versa. The recommended practice is to first recognise non-character key events by their virtual key codes, and then to process all other key events that have character codes according to their character codes. IBM OS/2 does not generate console window size, menu, or focus events. ═══ 4.1.34. DosFlushConsoleInputEvents ═══ C++ language function declaration APIRET APIENTRY DosFlushConsoleInputEvents ( HFILE Handle ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 0 on IBM OS/2 Return value An OS/2 system error code. Remarks All input events currently queued for the console will be deleted. ═══ 4.1.35. DosQueryConsoleNumberOfMouseButtons ═══ C++ language function declaration APIRET APIENTRY DosQueryConsoleNumberOfMouseButtons ( HFILE Handle, size_t & Buttons ) ; Parameters Handle The file handle of the console buffer or CON device. The handle should be 0 on IBM OS/2 Buttons A reference to a variable wherein is stored the number of mouse buttons on the mouse. Return value An OS/2 system error code. Remarks The number of mouse buttons is determined in software. The number of buttons supported by the mouse device driver may not match the number of buttons that the physical mouse actually has. ═══ 5. Acknowledgements ═══ The following people helped with the pre-release testing: ═══ ═══ The handle parameter to this call is ignored on IBM OS/2 but 0, the handle for standard input, should be used for upward compatibility with other implementations. ═══ ═══ The handle parameter to this call is ignored on IBM OS/2 but 1, the handle for standard output, should be used for upward compatibility with other implementations.