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.

116 lines
1.7 KiB

  1. /*++
  2. Copyright (c) 1999 Microsoft Corporation
  3. Module Name:
  4. wpipm.hxx
  5. Abstract:
  6. Contains the WPIPM class that handles communication with
  7. the admin service. WPIPM responds to pings, and tells
  8. the process when to shut down.
  9. Author:
  10. Michael Courage (MCourage) 22-Feb-1999
  11. Revision History:
  12. --*/
  13. #ifndef _WP_IPM_HXX_
  14. #define _WP_IPM_HXX_
  15. #include "pipedata.hxx"
  16. class WP_CONTEXT;
  17. class WP_IPM
  18. : public IPM_MESSAGE_ACCEPTOR
  19. {
  20. public:
  21. WP_IPM()
  22. : m_pWpContext(NULL),
  23. m_pPipe(NULL)
  24. {}
  25. HRESULT
  26. Initialize(
  27. WP_CONTEXT * pWpContext
  28. );
  29. HRESULT
  30. Terminate(
  31. VOID
  32. );
  33. //
  34. // MESSAGE_ACCEPTOR methods
  35. //
  36. virtual
  37. VOID
  38. AcceptMessage(
  39. IN const IPM_MESSAGE * pPipeMessage
  40. );
  41. virtual
  42. VOID
  43. PipeConnected(
  44. VOID
  45. );
  46. virtual
  47. VOID
  48. PipeDisconnected(
  49. IN HRESULT hr
  50. );
  51. virtual
  52. VOID
  53. PipeMessageInvalid(
  54. VOID
  55. );
  56. //
  57. // Interface for use of worker process
  58. //
  59. HRESULT
  60. SendMsgToAdminProcess(
  61. IPM_WP_SHUTDOWN_MSG reason
  62. );
  63. HRESULT
  64. HandleCounterRequest(
  65. VOID
  66. );
  67. HRESULT
  68. SendInitCompleteMessage(
  69. HRESULT hrToSend
  70. );
  71. private:
  72. static
  73. VOID
  74. HandlePing(
  75. DWORD dwErrorCode,
  76. DWORD dwNumberOfBytesTransferred,
  77. LPOVERLAPPED lpOverlapped
  78. );
  79. HRESULT
  80. HandleShutdown(
  81. BOOL fImmediate
  82. );
  83. WP_CONTEXT * m_pWpContext;
  84. IPM_MESSAGE_PIPE * m_pPipe;
  85. };
  86. #endif // _WP_IPM_HXX_