Source code of Windows XP (NT5)
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.

41 lines
998 B

  1. //
  2. // MODULE: MutexOwner.h
  3. //
  4. // PURPOSE: strictly a utility class so we can properly construct & destruct a static mutex.
  5. //
  6. // COMPANY: Saltmine Creative, Inc. (206)-284-7511 [email protected]
  7. //
  8. // AUTHOR: Oleg Kalosha, Joe Mabel
  9. //
  10. // ORIGINAL DATE: 11-04-98
  11. //
  12. // NOTES:
  13. //
  14. // Version Date By Comments
  15. //--------------------------------------------------------------------
  16. // V3.0 11-04-98 JM extracted from SafeTime
  17. //
  18. #if !defined(AFX_MUTEXOWNER_H__7BFC10DD_741D_11D2_961D_00C04FC22ADD__INCLUDED_)
  19. #define AFX_MUTEXOWNER_H__7BFC10DD_741D_11D2_961D_00C04FC22ADD__INCLUDED_
  20. #if _MSC_VER >= 1000
  21. #pragma once
  22. #endif // _MSC_VER >= 1000
  23. #include <windows.h>
  24. #include "apgtsstr.h"
  25. // strictly a utility class so we can properly construct & destruct a static mutex.
  26. class CMutexOwner
  27. {
  28. private:
  29. HANDLE m_hmutex;
  30. public:
  31. CMutexOwner(const CString & str);
  32. ~CMutexOwner();
  33. HANDLE & Handle();
  34. };
  35. #endif // !defined(AFX_MUTEXOWNER_H__7BFC10DD_741D_11D2_961D_00C04FC22ADD__INCLUDED_)