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.

138 lines
3.3 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. brmain.h
  5. Abstract:
  6. Private header file which defines the global data which is used for
  7. communication between the service control handler and the
  8. rest of the NT Workstation service.
  9. Author:
  10. Rita Wong (ritaw) 06-May-1991
  11. Revision History:
  12. --*/
  13. #ifndef _BRMAIN_INCLUDED_
  14. #define _BRMAIN_INCLUDED_
  15. #include <brnames.h> // Service interface names
  16. //
  17. // Time for the sender of a start or stop request to the Workstation
  18. // service to wait (in milliseconds) before checking on the
  19. // Workstation service again to see if it is done.
  20. //
  21. #define BR_WAIT_HINT_TIME 45000 // 45 seconds
  22. //
  23. // Defines to indicate how far we managed to initialize the Browser
  24. // service before an error is encountered and the extent of clean up needed
  25. //
  26. #define BR_TERMINATE_EVENT_CREATED 0x00000001
  27. #define BR_DEVICES_INITIALIZED 0x00000002
  28. #define BR_RPC_SERVER_STARTED 0x00000004
  29. #define BR_THREADS_STARTED 0x00000008
  30. #define BR_NETWORKS_INITIALIZED 0x00000010
  31. #define BR_BROWSER_INITIALIZED 0x00000020
  32. #define BR_CONFIG_INITIALIZED 0x00000040
  33. #define BR_NETBIOS_INITIALIZED 0x00000100
  34. #define BR_DOMAINS_INITIALIZED 0x00000200
  35. //-------------------------------------------------------------------//
  36. // //
  37. // Type definitions //
  38. // //
  39. //-------------------------------------------------------------------//
  40. typedef struct _BR_GLOBAL_DATA {
  41. //
  42. // Workstation service status
  43. //
  44. SERVICE_STATUS Status;
  45. //
  46. // Service status handle
  47. //
  48. SERVICE_STATUS_HANDLE StatusHandle;
  49. //
  50. // When the control handler is asked to stop the Workstation service,
  51. // it signals this event to notify all threads of the Workstation
  52. // service to terminate.
  53. //
  54. HANDLE TerminateNowEvent;
  55. HANDLE EventHandle;
  56. } BR_GLOBAL_DATA, *PBR_GLOBAL_DATA;
  57. extern BR_GLOBAL_DATA BrGlobalData;
  58. extern PSVCHOST_GLOBAL_DATA BrLmsvcsGlobalData;
  59. extern HANDLE BrGlobalEventlogHandle;
  60. extern
  61. ULONG
  62. BrDefaultRole;
  63. #define BROWSER_SERVICE_BITS_OF_INTEREST \
  64. ( SV_TYPE_POTENTIAL_BROWSER | \
  65. SV_TYPE_BACKUP_BROWSER | \
  66. SV_TYPE_MASTER_BROWSER | \
  67. SV_TYPE_DOMAIN_MASTER )
  68. ULONG
  69. BrGetBrowserServiceBits(
  70. IN PNETWORK Network
  71. );
  72. NET_API_STATUS
  73. BrUpdateAnnouncementBits(
  74. IN PDOMAIN_INFO DomainInfo OPTIONAL,
  75. IN ULONG Flags
  76. );
  77. //
  78. // Flags to BrUpdateNetworkAnnouncementBits
  79. //
  80. #define BR_SHUTDOWN 0x00000001
  81. #define BR_PARANOID 0x00000002
  82. NET_API_STATUS
  83. BrUpdateNetworkAnnouncementBits(
  84. IN PNETWORK Network,
  85. IN PVOID Context
  86. );
  87. NET_API_STATUS
  88. BrGiveInstallHints(
  89. DWORD NewState
  90. );
  91. NET_API_STATUS
  92. BrShutdownBrowserForNet(
  93. IN PNETWORK Network,
  94. IN PVOID Context
  95. );
  96. NET_API_STATUS
  97. BrElectMasterOnNet(
  98. IN PNETWORK Network,
  99. IN PVOID Context
  100. );
  101. #endif // ifndef _BRMAIN_INCLUDED_