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.

110 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. services.h
  5. Abstract:
  6. Routines to manage nt service configurations for promotion and demotion
  7. Author:
  8. Colin Brace ColinBr March 29, 1999.
  9. Environment:
  10. User Mode
  11. Revision History:
  12. --*/
  13. //
  14. // Control bits for the "Flags" parameter
  15. //
  16. // Not a valid flag
  17. #define DSROLEP_SERVICES_INVALID 0x0
  18. // Configure start type of services to become new role
  19. #define DSROLEP_SERVICES_ON 0x00000001
  20. // Configure start type of services to leave old role
  21. #define DSROLEP_SERVICES_OFF 0x00000002
  22. // Stop or start services -- can be used with above flags
  23. #define DSROLEP_SERVICES_STOP 0x00000004
  24. #define DSROLEP_SERVICES_START 0x00000008
  25. // Configure services back to original state -- no other flags
  26. // above are valid with this flags
  27. #define DSROLEP_SERVICES_REVERT 0x00000010
  28. // Ignores any errors that may occur
  29. #define DSROLEP_SERVICES_IGNORE_ERRORS 0x00000020
  30. //
  31. // This routine configures the services relevant to a domain controller
  32. //
  33. DWORD
  34. DsRolepConfigureDomainControllerServices(
  35. IN DWORD Flags
  36. );
  37. //
  38. // This routine configures the services relevant to a member of a domain
  39. // (including domain controllers)
  40. //
  41. DWORD
  42. DsRolepConfigureDomainServices(
  43. IN DWORD Flags
  44. );
  45. //
  46. // Simple routines to manage netlogon running state (not
  47. //
  48. DWORD
  49. DsRolepStartNetlogon(
  50. VOID
  51. );
  52. DWORD
  53. DsRolepStopNetlogon(
  54. OUT BOOLEAN *WasRunning
  55. );
  56. //
  57. // A "low level" routine to manipulate a service directly
  58. //
  59. //
  60. // Options for controlling services (through the ServiceOptions)
  61. //
  62. #define DSROLEP_SERVICE_NOOP 0x00000000
  63. #define DSROLEP_SERVICE_STOP 0x00000001
  64. #define DSROLEP_SERVICE_START 0x00000002
  65. #define DSROLEP_SERVICE_BOOTSTART 0x00000004
  66. #define DSROLEP_SERVICE_SYSTEM_START 0x00000008
  67. #define DSROLEP_SERVICE_AUTOSTART 0x00000010
  68. #define DSROLEP_SERVICE_DEMANDSTART 0x00000020
  69. #define DSROLEP_SERVICE_DISABLED 0x00000040
  70. #define DSROLEP_SERVICE_DEP_ADD 0x00000080
  71. #define DSROLEP_SERVICE_DEP_REMOVE 0x00000100
  72. #define DSROLEP_SERVICE_STOP_ISM 0x00000200
  73. #define DSROLEP_SERVICE_IGNORE_ERRORS 0x00000400
  74. DWORD
  75. DsRolepConfigureService(
  76. IN LPWSTR ServiceName,
  77. IN ULONG ServiceOptions,
  78. IN LPWSTR Dependency OPTIONAL,
  79. OUT ULONG * PreviousSettings OPTIONAL
  80. );