Is there any DOS command to reboot computer ?
登录 | 论坛导航 -> 华新鲜事 -> 技术の宅 | 本帖共有 15 楼,当前显示第 14 楼 : 从楼主开始阅读 : 本帖树形列表 : 返回上一页
作者:kelvin (等级:3 - 略知一二,发帖:763) 发表:2004-06-16 17:17:56  14楼 
my code:Const EWX_LOGOFF = 0 Const EWX_SHUTDOWN = 1 Const EWX_REBOOT = 2 Const EWX_FORCE = 4 Private Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As Long, ByVal dwReserved As Long) As Long Private Sub Form_Load() msg = MsgBox("This program is going to reboot your computer. Press OK to continue or Cancel to stop.", vbCritical + vbOKCancel + 256, App.Title) If msg = vbCancel Then End 'reboot the computer ret& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT, 0) Unload Me End Sub what is SE_SHUTDOWN_NAME privilege? blur~
cool...but
What is the point of returning a variable if your windows is shutting down? ;)

ret& = ExitWindowsEx(EWX_FORCE Or EWX_REBOOT, 0)

欢迎来到华新中文网,踊跃发帖是支持我们的最好方法!原文 / 传统版 / WAP版只看此人从这里展开收起列表

本帖共有 15 楼,当前显示第 14 楼,本文还有 N-1 层楼,要不你试试看:点击此处阅读更多 >>



请登录后回复:帐号   密码