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.

29 lines
400 B

  1. #ifndef __WMIGUARD_H__
  2. #define __WMIGUARD_H__
  3. /*
  4. * Class:
  5. *
  6. * WmiGuard
  7. *
  8. */
  9. class WmiGuard
  10. {
  11. private:
  12. CCriticalSection* m_pCS ;
  13. public:
  14. HRESULT TryEnter () ;
  15. HRESULT Enter () ;
  16. HRESULT Leave () ;
  17. WmiGuard () ;
  18. ~WmiGuard () ;
  19. BOOL Init ( CCriticalSection* pCS ) { return ( pCS == NULL ) ? FALSE : ( m_pCS = pCS ), TRUE; } ;
  20. } ;
  21. #endif __WMIGUARD_H__