The information in this article applies to:
SYMPTOMS
Console applications call SetConsoleCtrlHandler() to install or remove
application-defined callback functions to handle console control signals.
Typically a console window with keyboard focus receives the CTRL_C_EVENT
and CTRL_BREAK_EVENT signals when the CTRL+C and CTRL+BREAK keys are
pressed or if they are generated using the GenerateConsoleCtrlEvent()
function. But the system generates CTRL_CLOSE_EVENT, CTRL_LOGOFF_EVENT,
and CTRL_SHUTDOWN_EVENT signals when the user closes the console, logs
off, or shuts down the system so that the console process has an
opportunity to clean up before termination.
CAUSEThe Windows 95 console system does not queue up console control signals or events. If multiple events occur rapidly in succession, events received later overwrite those received earlier, resulting in the earlier events being lost. The number of events that the console application receives depends on when the events actually arrive; the shorter the interval between the events, the more likely that one or more will be lost. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONThe following code demonstrates the problem. It should receive five CTRL_C_EVENT and five CTRL_BREAK_EVENT events, and print a line for each. However, because events are not queued, it will print less than five of each event type, and may print only the last CTRL_BREAK_EVENT. Sample Code to Demonstrate Problem
Additional query words: Windows win95
Keywords : kbprg kbConsole kbKernBase kbGrpKernBase |
Last Reviewed: January 14, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |