⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_50064.htm

📁 vc
💻 HTM
字号:
<p>
序号:50064 发表者:士大夫 发表日期:2003-08-16 18:47:20
<br>主题:请问如何执行注销命令?
<br>内容:我想在应用程序中按下按钮后WINDOWS系统执行注销,请问应该调用什么函数?NT或者2000的系统,谢谢各位高手。
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:木一 回复日期:2003-08-16 21:12:27
<br>内容:ExitWindowsEx<BR><BR>不同操作系统下参数不同<BR><BR>所有平台核心代码都是 ExitWindowsEx(UINT, DWORD) 一句。<BR>UINT 参数可选值:<BR>EWX_LOGOFF //注销<BR>EWX_POWEROFF //关机并断电<BR>EWX_REBOOT //重启<BR>EWX_SHUTDOWN //关机,不断电<BR>以上的选择其中一个。附加选项除 <BR>EWX_FORCE <BR>EWX_FORCEIFHUNG //比 EWX_FORCE 更严格<BR>同样二选一。<BR>对于 DWORD dwReason,除 XP/.net Server family 之外其它平台都是忽略的,没有作<BR><BR><BR><BR>EWX_LOGOFF Shuts down all processes running in the security context of the process that called the ExitWindowsEx function. Then it logs the user off. <BR>EWX_POWEROFF Shuts down the system and turns off the power. The system must support the power-off feature. <BR>Windows NT/2000: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. <BR> <BR>EWX_REBOOT Shuts down the system and then restarts the system. <BR>Windows NT/2000: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. <BR> <BR>EWX_SHUTDOWN Shuts down the system to a point at which it is safe to turn off the power. All file buffers have been flushed to disk, and all running processes have stopped. <BR>Windows NT/2000: The calling process must have the SE_SHUTDOWN_NAME privilege. For more information, see the following Remarks section. <BR> <BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -