0

I want to stop the shutdown / log off API which appears when you have programs open to confirm a shutdown/logoff.

I have an application already that send a reason to the API.

I know this is bad practice but I really need to override / cancel the shutdown with out displaying the API after 5 seconds.

is there any way to hack this or run a custom shutdown script to override the shutdown.

thanks in advance


it doesnt matter about holding it for5 seconds just catching it if it is pressed once. I can do that but vista shows a API screen after 5 seconds which All i want is vista not to show that.

vista shows that because I prevent it from shutting down.

4

1 回答 1

0

你可能想看看这个: http: //msdn.microsoft.com/en-us/library/aa376871 (VS.85).aspx

当我执行此功能时,我必须在非托管 C++ 中执行所有操作,因为我在尝试使用 Interop 设置权限时遇到问题。

您需要这个标志:ExitWindowsEx 中的 EWX_FORCE。

于 2009-04-17T12:55:07.773 回答