Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.7 KiB

  1. /*---------------------------------------------------------------------------
  2. File: RebootUtils.h
  3. Comments: Utility functions used to reboot a computer
  4. (c) Copyright 1999, Mission Critical Software, Inc., All Rights Reserved
  5. Proprietary and confidential to Mission Critical Software, Inc.
  6. REVISION LOG ENTRY
  7. Revision By: Christy Boles
  8. Revised on 02/15/99 11:24:47
  9. ---------------------------------------------------------------------------
  10. */
  11. // ===========================================================================
  12. /* Function : GetPrivilege
  13. Description : This function enables the requested privilege on the requested
  14. computer.
  15. */
  16. // ===========================================================================
  17. BOOL // ret-TRUE if successful.
  18. GetPrivilege(
  19. WCHAR const * sMachineW, // in -NULL or machine name
  20. LPCWSTR pPrivilege // in -privilege name such as SE_SHUTDOWN_NAME
  21. );
  22. // ===========================================================================
  23. /* Function : ComputerShutDown
  24. Description : This function shutsdown/restarts the given computer.
  25. */
  26. // ===========================================================================
  27. DWORD
  28. ComputerShutDown(
  29. WCHAR const * pComputerName, // in - computer name to shut down
  30. WCHAR const * pMessage, // in - message to display in NT shutdown dialog
  31. DWORD delay, // in - delay, in seconds
  32. DWORD bRestart, // in - flag, whether to reboot
  33. BOOL bNoChange // in - flag, whether to really do it
  34. );