CWin32Mutex Class Reference#include <Win32Mutex.h>
Inheritance diagram for CWin32Mutex:
![]()
Collaboration diagram for CWin32Mutex:
![]()
Detailed DescriptionDefinition at line 47 of file Win32Mutex.h. Constructor & Destructor Documentation
Definition at line 49 of file Win32Mutex.cpp. 00049 : CGenericMutex(pMutexName), 00050 m_hMutex(NULL) 00051 { 00052 //Try to create the mutex 00053 m_hMutex=CreateMutex(NULL, 00054 FALSE, 00055 pMutexName); 00056 00057 //Did we create the mutex? 00058 if (!m_hMutex) 00059 throw std::string("Failed to create mutex!"); 00060 00061 //Check if we are the owners 00062 if (pMutexName && 00063 GetLastError()!=ERROR_ALREADY_EXISTS) 00064 SetFirst(); 00065 }
Member Function Documentation
Implements CGenericMutex. Definition at line 74 of file Win32Mutex.cpp. 00075 { 00076 DWORD dwWaitResult; 00077 00078 //Wait for the mutex 00079 dwWaitResult=WaitForSingleObject(m_hMutex, 00080 ulMSTimeout); 00081 00082 //Check why did we quit 00083 return dwWaitResult==WAIT_TIMEOUT; 00084 }
Implements CWaitableObject. Definition at line 97 of file Win32Mutex.cpp. 00098 { 00099 Release(); 00100 }
The documentation for this class was generated from the following files: |