Home  >  Q&A  >  body text

c++ - explorer.exe在windows关机期间的优先级?

explorer.exe在windows关机期间(调用ExitWindowsEx这个函数后)的优先级?是否在开始关闭系统时,explorer.exe最先被关闭?
如果是这样,查找Explorer的进程能否能判断出目前是否处于系统关闭期间?

PHP中文网PHP中文网2715 days ago667

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-17 13:29:37

    First, there is no priority to close explorer.
    Second, you can manually end explorer at any time. There is no necessary connection between explorer and shutdown.
    Third, it is not difficult to intercept the shutdown message. You can search the relevant source code by yourself.
    Fourth, if you are unable to intercept shutdown messages, you can use Group Policy to add your program to the shutdown script, and the system will automatically call it.

    Additional:
    If there is any consideration to prevent forged shutdown messages, I have an idea, I haven’t tried it yet, I don’t know if it is feasible: intercept all shutdown messages, whether they are true or false, and process them again in the message processing function Call the shutdown API, so that "the fake becomes real"...

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 13:29:37

    What you said above is right, explorer can be terminated at any time, you have to read the documentation

    reply
    0
  • Cancelreply