在程序中用API函数据给WIN2000关机,但不能切断电源,请问大家有没有碰到过这种情况的,大家怎么解决的.

解决方案 »

  1.   

    调用关机程序则为:shell “rundll32.exe user.exe,exitwindows”
      

  2.   

    API 
    The ExitWindowsEx function either logs off the current user, shuts down the system, or shuts down and restarts the system. It sends the WM_QUERYENDSESSION message to all applications to determine if they can be terminated. BOOL ExitWindowsEx(
      UINT uFlags,       // shutdown operation
      DWORD dwReserved   // reserved
    );