Retail products


Traffic interception SDK

Control every TCP/IP network connection

  • Route connections via proxy
  • Redirect connections and modify the data
  • Block connections and applications
SSL interception SDK

View SSL in plaintext and modify it

  • View the SSL stream decrypted in plaintext
  • Redirect SSL connection and modify decrypted data
  • Browser shows "SSL lock" without warnings

Documentation


CWin32Mutex Class Reference

#include <Win32Mutex.h>

Inheritance diagram for CWin32Mutex:
Collaboration diagram for CWin32Mutex:

List of all members.


Public Member Functions

virtual void ReleaseObject ()
virtual BOOL Aquire (unsigned long ulMSTimeout=INFINITE)
virtual BOOL Release ()
 CWin32Mutex (const char *pMutexName=NULL)
virtual ~CWin32Mutex ()
virtual BOOL IsFirst () const

Protected Member Functions

virtual HANDLE GetHandle () const
void SetFirst ()

Detailed Description

Definition at line 47 of file Win32Mutex.h.


Constructor & Destructor Documentation

KOMODIA_NAMESPACE_START CWin32Mutex::CWin32Mutex ( const char *  pMutexName = NULL  ) 

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 }

CWin32Mutex::~CWin32Mutex (  )  [virtual]

Definition at line 67 of file Win32Mutex.cpp.

00068 {
00069     //Delete the mutex
00070     if (m_hMutex)
00071         CloseHandle(m_hMutex);
00072 }


Member Function Documentation

BOOL CWin32Mutex::Aquire ( unsigned long  ulMSTimeout = INFINITE  )  [virtual]

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 }

HANDLE CWin32Mutex::GetHandle (  )  const [protected, virtual]

Implements CWaitableObject.

Definition at line 92 of file Win32Mutex.cpp.

00093 {
00094     return m_hMutex;
00095 }

BOOL CWaitableObject::IsFirst (  )  const [virtual, inherited]

Definition at line 54 of file WaitableObject.cpp.

00055 {
00056     return m_bFirst;
00057 }

BOOL CWin32Mutex::Release (  )  [virtual]

Implements CGenericMutex.

Definition at line 86 of file Win32Mutex.cpp.

00087 {
00088     //Release the mutex
00089     return ReleaseMutex(m_hMutex)!=0;
00090 }

void CWin32Mutex::ReleaseObject (  )  [virtual]

Implements CWaitableObject.

Definition at line 97 of file Win32Mutex.cpp.

00098 {
00099     Release();
00100 }

void CWaitableObject::SetFirst (  )  [protected, inherited]

Definition at line 49 of file WaitableObject.cpp.

00050 {
00051     m_bFirst=TRUE;
00052 }


The documentation for this class was generated from the following files: