zoukankan      html  css  js  c++  java
  • SetProcessShutdownParameters

    1. msdn介绍:

    http://msdn.microsoft.com/en-us/library/ms686227(v=vs.85).aspx

    Sets shutdown parameters for the currently calling process. This function sets a shutdown order for a process relative to the other processes in the system.

    Syntax

    BOOL WINAPI SetProcessShutdownParameters(
    __in DWORD dwLevel,
    __in DWORD dwFlags
    );

    dwLevel [in]

    The shutdown priority for a process relative to other processes in the system. The system shuts down processes from high dwLevel values to low. The highest and lowest shutdown priorities are reserved for system components. This parameter must be in the following range of values.

    All processes start at shutdown level 0x280.

    ValueMeaning
    000-0FF

    System reserved last shutdown range.

    100-1FF

    Application reserved last shutdown range.

    200-2FF

    Application reserved "in between" shutdown range.

    300-3FF

    Application reserved first shutdown range.

    400-4FF

    System reserved first shutdown range.

    dwFlags [in]

    This parameter can be the following value.

    ValueMeaning
    SHUTDOWN_NORETRY
    0x00000001

    The system terminates the process without displaying a retry dialog box for the user.

    ——————————————————————————————————————————————————————————————

    2. 个人理解

     该函数设置了进程相对于其它进程的关闭优先级。 系统关闭进程时会从dwLevel值高的开始,按从高到低的顺序关闭。最高和最低的关闭优先级留给了系统组件,dwLevel值必须在制定的范围内取值。

    所有进程启动时默认的关闭优先级为0x280.

    SHUTDOWN_NORETRY  设置了系统关闭进程时对用户不显示retry的重试窗口。

    如果在进程A中调用该函数,则可以设置该进程的退出优先级。,所以可以如果该进程中执行了关机等命令,从而可以影响到其他进程的退出。


     

  • 相关阅读:
    Pods
    CentOS 7中firewall防火墙详解和配置以及切换为iptables防火墙
    windows IIS安装php服务及配置
    Linux最常用命令
    kubernetes 基本概念和资源对象汇总
    mysql集群压测
    mysql碰到的问题总结
    python字符串常用内建函数总结
    kubeadm常见报错和解决方法
    ubuntu部署kubeadm1.13.1高可用
  • 原文地址:https://www.cnblogs.com/rainduck/p/2160523.html
Copyright © 2011-2022 走看看