Leaked source code of windows server 2003
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.

57 lines
2.4 KiB

  1. //#pragma title( "BkupRstr.hpp - Get backup and restore privileges" )
  2. /*
  3. Copyright (c) 1995-1998, Mission Critical Software, Inc. All rights reserved.
  4. ===============================================================================
  5. Module - BkupRstr.hpp
  6. System - Common
  7. Author - Rich Denham
  8. Created - 1997-05-30
  9. Description - Get backup and restore privileges
  10. Updates -
  11. ===============================================================================
  12. */
  13. #include "ealen.hpp"
  14. #ifndef MCSINC_BkupRstr_hpp
  15. #define MCSINC_BkupRstr_hpp
  16. // Get backup and restore privileges using WCHAR machine name.
  17. BOOL // ret-TRUE if successful.
  18. GetBkupRstrPriv(
  19. WCHAR const * sMachineW, // in -NULL or machine name
  20. BOOL fOn = TRUE // in - indicates whether the privileges should be turned on or not
  21. );
  22. // ===========================================================================
  23. /* Function : GetPrivilege
  24. Description : This function enables the requested privilege on the requested
  25. computer.
  26. */
  27. // ===========================================================================
  28. BOOL // ret-TRUE if successful.
  29. GetPrivilege(
  30. WCHAR const * sMachineW, // in -NULL or machine name
  31. LPCWSTR pPrivilege, // in -privilege name such as SE_SHUTDOWN_NAME
  32. BOOL fOn = TRUE // in - indicates whether the privilege should be turned on or not
  33. );
  34. // ===========================================================================
  35. /* Function : ComputerShutDown
  36. Description : This function shutsdown/restarts the given computer.
  37. */
  38. // ===========================================================================
  39. DWORD
  40. ComputerShutDown(
  41. WCHAR const * pComputerName, // in - computer name to shut down
  42. WCHAR const * pMessage, // in - message to display in NT shutdown dialog
  43. DWORD delay, // in - delay, in seconds
  44. DWORD bRestart, // in - flag, whether to reboot
  45. BOOL bNoChange // in - flag, whether to really do it
  46. );
  47. #endif MCSINC_BkupRstr_hpp
  48. // BkupRstr.hpp - end of file