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.

104 lines
2.2 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. //
  29. // This routine configures the services relevant to a domain controller
  30. //
  31. DWORD
  32. DsRolepConfigureDomainControllerServices(
  33. IN DWORD Flags
  34. );
  35. //
  36. // This routine configures the services relevant to a member of a domain
  37. // (including domain controllers)
  38. //
  39. DWORD
  40. DsRolepConfigureDomainServices(
  41. IN DWORD Flags
  42. );
  43. //
  44. // Simple routines to manage netlogon running state (not
  45. //
  46. DWORD
  47. DsRolepStartNetlogon(
  48. VOID
  49. );
  50. DWORD
  51. DsRolepStopNetlogon(
  52. OUT BOOLEAN *WasRunning
  53. );
  54. //
  55. // A "low level" routine to manipulate a service directly
  56. //
  57. //
  58. // Options for controlling services (through the ServiceOptions)
  59. //
  60. #define DSROLEP_SERVICE_STOP 0x00000001
  61. #define DSROLEP_SERVICE_START 0x00000002
  62. #define DSROLEP_SERVICE_BOOTSTART 0x00000004
  63. #define DSROLEP_SERVICE_SYSTEM_START 0x00000008
  64. #define DSROLEP_SERVICE_AUTOSTART 0x00000010
  65. #define DSROLEP_SERVICE_DEMANDSTART 0x00000020
  66. #define DSROLEP_SERVICE_DISABLED 0x00000040
  67. #define DSROLEP_SERVICE_DEP_ADD 0x00000080
  68. #define DSROLEP_SERVICE_DEP_REMOVE 0x00000100
  69. #define DSROLEP_SERVICE_STOP_ISM 0x00000200
  70. DWORD
  71. DsRolepConfigureService(
  72. IN LPWSTR ServiceName,
  73. IN ULONG ServiceOptions,
  74. IN LPWSTR Dependency OPTIONAL,
  75. OUT ULONG * PreviousSettings OPTIONAL
  76. );