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 }
Definition at line 67 of file Win32Mutex.cpp. 00068 : CGenericMutex(pMutexName), 00069 m_hMutex(NULL) 00070 { 00071 }
Member Function Documentation
Implements CGenericMutex. Definition at line 85 of file Win32Mutex.cpp. 00086 { 00087 DWORD dwWaitResult; 00088 00089 //Wait for the mutex 00090 dwWaitResult=WaitForSingleObject(m_hMutex, 00091 ulMSTimeout); 00092 00093 //Check why did we quit 00094 return dwWaitResult==WAIT_TIMEOUT; 00095 }
Implements CWaitableObject. Definition at line 108 of file Win32Mutex.cpp. 00109 { 00110 Release(); 00111 }
The documentation for this class was generated from the following files: |