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.

128 lines
2.2 KiB

  1. /*++
  2. Copyright (C) 1996-2001 Microsoft Corporation
  3. Module Name:
  4. ProvFact.h
  5. Abstract:
  6. History:
  7. --*/
  8. #ifndef _StrobeThread_H
  9. #define _StrobeThread_H
  10. #include <Thread.h>
  11. class StrobeThread : public EventHandler
  12. {
  13. private:
  14. WmiAllocator &m_Allocator ;
  15. DWORD timeout_;
  16. public:
  17. StrobeThread ( WmiAllocator & a_Allocator , DWORD timeout) ;
  18. ~StrobeThread () ;
  19. int handleTimeout (void) ;
  20. ULONG GetTimeout () { return timeout_; }
  21. void SetTimeout ( DWORD timeout )
  22. {
  23. timeout_ = ( timeout_ < timeout ) ? timeout_ : timeout ;
  24. Dispatcher::changeTimer( *this, timeout_ ) ;
  25. }
  26. };
  27. class Task_ProcessTermination : public EventHandler
  28. {
  29. DWORD m_ProcessIdentifier ;
  30. HANDLE processHandle_;
  31. public:
  32. Task_ProcessTermination(WmiAllocator & a_Allocator , HANDLE a_Process , DWORD a_ProcessIdentifier );
  33. ~Task_ProcessTermination(void);
  34. int handleEvent(void);
  35. HANDLE getHandle(void);
  36. };
  37. #if 0
  38. /******************************************************************************
  39. *
  40. * Name:
  41. *
  42. *
  43. * Description:
  44. *
  45. *
  46. *****************************************************************************/
  47. class StrobeThread : public WmiThread < ULONG >
  48. {
  49. private:
  50. WmiAllocator &m_Allocator ;
  51. protected:
  52. public: // Internal
  53. StrobeThread (
  54. WmiAllocator & a_Allocator ,
  55. const ULONG &a_Timeout
  56. ) ;
  57. ~StrobeThread () ;
  58. WmiStatusCode Initialize_Callback () ;
  59. WmiStatusCode UnInitialize_Callback () ;
  60. WmiStatusCode TimedOut () ;
  61. WmiStatusCode Shutdown () ;
  62. };
  63. /******************************************************************************
  64. *
  65. * Name:
  66. *
  67. *
  68. * Description:
  69. *
  70. *
  71. *****************************************************************************/
  72. class Task_ProcessTermination : public WmiTask < ULONG >
  73. {
  74. private:
  75. DWORD m_ProcessIdentifier ;
  76. protected:
  77. public: // Internal
  78. Task_ProcessTermination (
  79. WmiAllocator & a_Allocator ,
  80. HANDLE a_Process ,
  81. DWORD a_ProcessIdentifier
  82. ) ;
  83. ~Task_ProcessTermination () ;
  84. WmiStatusCode Process ( WmiThread <ULONG> &a_Thread ) ;
  85. };
  86. #endif
  87. #endif // _StrobeThread_H