WIN2000下的关机问题?请高手们想想办法!
在电源选项中-》高级-》选择当按下电源按钮时-》关闭系统后,
当按下主机开关时,应用程序不能收到WM_QUERYENDSESSION消息。
(关机对话框中没有正在保存信息的字样)
我如何让我的程序在按下电源按键时得到这个WM_QUERYENDSESSION消息?
(在98中就没有这个问题)
另外,我在MSDN中查到以下资料:
Power Button on ACPI Computer May Force an Emergency Shutdown
PSS ID Number: Q297150
Article Last Modified on 05-13-2002
--------------------------------------------------------------------------------
The information in this article applies to:
Microsoft Windows 2000, 2000 SP1 Server
Microsoft Windows 2000, 2000 SP1 Advanced Server
Microsoft Windows 2000, 2000 SP1 Professional
--------------------------------------------------------------------------------
Symptoms
If you install Windows 2000 on a computer whose BIOS is ACPI-compliant, when you press the power button on the computer, Windows performs an emergency shutdown and you do not have a chance to save your data before the computer shuts down.
Cause
When you press the power button, Windows performs an emergency shutdown, which means that Windows does not send the WM_QUERYENDSESSION and WM_ENDSESSION messages to the running programs. The programs therefore cannot notify the user to save data and quit gracefully.
Workaround
Status
This behavior is by design.
难道说这个问题无法解决?请高手们想想办法!