电脑关机的正确步骤 怎样用代码实现快速关机?

怎样用代码实现快速关机?如果你使用系统命令,我会上几层楼说,如果是编程,然后调用存在于ntdll.dl文件中的WinAPI函数ntshutdownsystem的原型如下:ntsysapi ntstat

怎样用代码实现快速关机?

如果你使用系统命令,我会上几层楼说,如果是编程,然后调用存在于ntdll.dl文件中的WinAPI函数ntshutdownsystem的原型如下:ntsysapi ntstatus ntapi ntshutdownsystem(shutdown)uaction)结构定义:shutdownuaction typedef enumushutdownuaction{shutdownOreboot,shutdownreboot,shutdownpoweroff//这个数字需要权限才能关机快速关闭动作