Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

OW32::CMutex Class Reference

Wrapper for a Win32 Mutex. More...

#include <SyncObjects.h>

Inheritance diagram for OW32::CMutex:

OW32::CSyncObject List of all members.

Public Member Functions

 CMutex (BOOL bInitialOwner=FALSE, LPCTSTR lpszName=NULL, LPSECURITY_ATTRIBUTES lpSecAttr=NULL)
 Construct a new mutex object.
 CMutex (HANDLE hMutex)
 Construct a new mutex object.
CMutexoperator= (HANDLE hMutex)
 Set the encapsulated mutex handle.
virtual BOOL Lock (DWORD dwTimeout=INFINITE)
 Lock the mutex.
void Unlock ()
 Unlock the mutex.
 operator HANDLE () const
 HANDLE extractor for the mutex object.

Detailed Description

Wrapper for a Win32 Mutex.


Constructor & Destructor Documentation

OW32::CMutex::CMutex BOOL  bInitialOwner = FALSE,
LPCTSTR  lpszName = NULL,
LPSECURITY_ATTRIBUTES  lpSecAttr = NULL
[inline]
 

Construct a new mutex object.

Parameters:
bInitialOwner Set if this thead should initially own the mutex
lpszName The object's name
lpSecAttr Teh security descriptor for the object.

OW32::CMutex::CMutex HANDLE  hMutex  )  [inline]
 

Construct a new mutex object.

Parameters:
hMutex Existing mutex to encapsulate


Member Function Documentation

virtual BOOL OW32::CMutex::Lock DWORD  dwTimeout = INFINITE  )  [inline, virtual]
 

Lock the mutex.

Returns:
TRUE if successful, FALSE otherwise
Parameters:
dwTimeout The length of time to wait for lock acquisition

Implements OW32::CSyncObject.

CMutex& OW32::CMutex::operator= HANDLE  hMutex  )  [inline]
 

Set the encapsulated mutex handle.

Parameters:
hMutex the new mutex


The documentation for this class was generated from the following file:
Generated on Sun Jun 5 01:29:29 2005 for OW32 by  doxygen 1.3.9.1