BUG: Queued Console Control Signals May be Missed Under Win95 (134284)
The information in this article applies to:
- Microsoft Win32 Application Programming Interface (API), when used with:
- the operating system: Microsoft Windows 95
- the operating system: Microsoft Windows 98
- the operating system: Microsoft Windows Millennium Edition
This article was previously published under Q134284 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.
In Windows 95, console applications that install console control handler
functions by using SetConsoleCtrlHandler() do not always get all console
signals when two or more signals occur at almost the same time.
Note that this problem does not occur under Windows NT versions 3.51
and 4.0.
CAUSE
The 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.
STATUS
Microsoft 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.
Modification Type: | Minor | Last Reviewed: | 9/27/2004 |
---|
Keywords: | kbbug kbConsole kbKernBase kbProgramming KB134284 |
---|
|