是否可以阻止 ExitWindows 或 ExitWindowsEx? [英] Is it possible to block ExitWindows or ExitWindowsEx?

查看:26
本文介绍了是否可以阻止 ExitWindows 或 ExitWindowsEx?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的是公司工作站,我的 IT 部门一直在未经我许可使用程序重新启动我的电脑.我已经要求他们停止,但他们不知道如何 - 典型.

I'm using a corporate workstation, and my IT department keeps using programs to restart my PC without my permission. I've asked them to stop, but they don't how how - typical.

无论如何,我认为必须有一种方法可以防止(恶意?)这样的程序重新启动我的电脑...那么如何防止 ExitWindowsExitWindowsEx 从被叫?我想这就是他们将要使用的,但我不知道如何找到.

Anyway, I figured there must be a way of preventing (malicious?) programs like these from restarting my PC... So how about preventing ExitWindows or ExitWindowsEx from being called? I assume this is what they'll be using, but I'm not sure how to find out.

这是一个好的解决方案,还是我应该搬到另一家公司?

Is this a good solution, or should I just move to another company?

只是从另一个角度考虑这个问题 - 是否可以判断哪个程序正在调用 ExitWindowsExitWindowsEx?这样我就可以记录进程名称,然后编写一个小程序将违规程序列入黑名单(即一旦出现就将其杀死).

Just thinking about this from another angle - is it possible to tell which program is making a call to ExitWindows or ExitWindowsEx? This way I can log the process name, and then write a small program to blacklist the offending program (i.e. kill it whenever it appears).

推荐答案

On

Vista,您可以在 Vista+ 上处理 WM_QUERYENDSESSION,您需要在 ShutdownBlockReasonCreate 中使用除了 WM_QUERYENDSESSION.

On < Vista, you can handle WM_QUERYENDSESSION, on Vista+, you need to use ShutdownBlockReasonCreate in addition to WM_QUERYENDSESSION.

这篇关于是否可以阻止 ExitWindows 或 ExitWindowsEx?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆