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.

120 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1991 Microsoft Corporation
  3. Module Name:
  4. wsmain.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. terryk 10-18-1993 Remove WsErrorInitializeLogon
  13. --*/
  14. #ifndef _WSMAIN_INCLUDED_
  15. #define _WSMAIN_INCLUDED_
  16. #include <wsnames.h> // Service interface names
  17. #include <svcs.h> // SVCHOST_GLOBAL_DATA
  18. //
  19. // Time for the sender of a start or stop request to the Workstation
  20. // service to wait (in milliseconds) before checking on the
  21. // Workstation service again to see if it is done.
  22. //
  23. #define WS_WAIT_HINT_TIME 90000 // 90 seconds
  24. //
  25. // Defines to indicate how far we managed to initialize the Workstation
  26. // service before an error is encountered and the extent of clean up needed
  27. //
  28. #define WS_TERMINATE_EVENT_CREATED 0x00000001
  29. #define WS_DEVICES_INITIALIZED 0x00000002
  30. #define WS_MESSAGE_SEND_INITIALIZED 0x00000004
  31. #define WS_RPC_SERVER_STARTED 0x00000008
  32. #define WS_LOGON_INITIALIZED 0x00000010
  33. #define WS_LSA_INITIALIZED 0x00000020
  34. #define WS_DFS_THREAD_STARTED 0x00000040
  35. #define WS_CONFIG_RESOURCE_INITIALIZED 0x00000080
  36. #define WS_SECURITY_OBJECTS_CREATED 0x10000000
  37. #define WS_USE_TABLE_CREATED 0x20000000
  38. #define WS_API_STRUCTURES_CREATED (WS_SECURITY_OBJECTS_CREATED | \
  39. WS_USE_TABLE_CREATED )
  40. //
  41. // This macro is called after the redirection of print or comm device
  42. // has been paused or continued. If either the print or comm device is
  43. // paused the service is considered paused.
  44. //
  45. #define WS_RESET_PAUSE_STATE(WsStatus) { \
  46. WsStatus &= ~(SERVICE_PAUSE_STATE); \
  47. WsStatus |= (WsStatus & SERVICE_REDIR_PAUSED) ? SERVICE_PAUSED : \
  48. SERVICE_ACTIVE; \
  49. }
  50. //-------------------------------------------------------------------//
  51. // //
  52. // Type definitions //
  53. // //
  54. //-------------------------------------------------------------------//
  55. typedef enum _WS_ERROR_CONDITION {
  56. WsErrorRegisterControlHandler = 0,
  57. WsErrorCreateTerminateEvent,
  58. WsErrorNotifyServiceController,
  59. WsErrorInitLsa,
  60. WsErrorStartRedirector,
  61. WsErrorBindTransport,
  62. WsErrorAddDomains,
  63. WsErrorStartRpcServer,
  64. WsErrorInitMessageSend,
  65. WsErrorCreateApiStructures
  66. } WS_ERROR_CONDITION, *PWS_ERROR_CONDITION;
  67. typedef struct _WS_GLOBAL_DATA {
  68. //
  69. // Workstation service status
  70. //
  71. SERVICE_STATUS Status;
  72. //
  73. // Service status handle
  74. //
  75. SERVICE_STATUS_HANDLE StatusHandle;
  76. //
  77. // When the control handler is asked to stop the Workstation service,
  78. // it signals this event to notify all threads of the Workstation
  79. // service to terminate.
  80. //
  81. HANDLE TerminateNowEvent;
  82. } WS_GLOBAL_DATA, *PWS_GLOBAL_DATA;
  83. extern WS_GLOBAL_DATA WsGlobalData;
  84. extern HANDLE WsDllRefHandle;
  85. extern PSVCHOST_GLOBAL_DATA WsLmsvcsGlobalData;
  86. extern BOOL WsLUIDDeviceMapsEnabled;
  87. #endif // ifndef _WSMAIN_INCLUDED_