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.

28 lines
597 B

  1. #ifndef __PASSPORTEVENT_HPP
  2. #define __PASSPORTEVENT_HPP
  3. class PassportEvent
  4. {
  5. public:
  6. PassportEvent(BOOL bManualReset = TRUE, BOOL bInitialState = FALSE)
  7. {
  8. m_hEvent = CreateEvent(NULL, bManualReset, bInitialState, NULL);
  9. }
  10. ~PassportEvent()
  11. {
  12. CloseHandle(m_hEvent);
  13. }
  14. BOOL Pulse() {return PulseEvent(m_hEvent);}
  15. BOOL Set() {return SetEvent(m_hEvent);}
  16. BOOL Reset() {return ResetEvent(m_hEvent);}
  17. operator HANDLE() {return m_hEvent;}
  18. private:
  19. HANDLE m_hEvent;
  20. };
  21. #endif // __PASSPORTEVENT_HPP