PRB:ReadConsoleInput() & PeekConsoleInput() Don't Receive DBCS

Last reviewed: February 26, 1996
Article ID: Q146448
The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK) for Windows 95

SYMPTOMS

The Windows 95 console APIs ReadConsoleInput() and PeekConsoleInput() which are used to read data from a console input buffer do not receive DBCS key codes when the IME is activated.

This behavior is different from Windows NT console support in which the ReadConsoleInput() and PeekConsoleInput() APIs are enabled to receive key event records for converted the DBCS data from the keyboard buffer similar to an IME-enabled Windows-based application. In a Windows NT console application, once the DBCS character is determined, Windows NT posts the converted character bytes to the console buffer.

CAUSE

The Window 95 console architecture is based upon the Windows 3.1 MS-DOS BOX rather than console support in DBCS versions of Windows NT. In Windows 95, the console is working on top of the MS-DOS BOX. This design is opposite to DBCS versions of Windows NT where all console character i/o is directed to the Win32 subsystem.

Specifically, the Windows 95 implementation of ReadConsoleInput() and PeekConsoleInput() hook interrupt 0x09 and return keyboard events back to the application. Because existing MS-DOS IMEs and the VIME VxD hook interrupt 0x16 rather than interrupt 0x09, ReadConsoleInput() and PeekConsoleInput() are unable to receive DBCS characters composed by IMEs.

STATUS

This behavior is by design. This architectural difference between DBCS versions of Microsoft Windows 95 and Windows NT is confirmed. The Windows 95 console-IME functionality may change in future versions to become more compatible with Windows NT. We will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: FESDK Far East
KBCategory: kbprg kbprb
KBSubcategory:


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 26, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.