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
 CWin32Mutex (const char *pMutexName, bool bLater)
void SetHandle (HANDLE hMutex)
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 73 of file Win32Mutex.cpp.

00074 {
00075     //Delete the mutex
00076     if (m_hMutex)
00077         CloseHandle(m_hMutex);
00078 }

CWin32Mutex::CWin32Mutex ( const char *  pMutexName,
bool  bLater 
) [protected]

Definition at line 67 of file Win32Mutex.cpp.

00068                                       : CGenericMutex(pMutexName),
00069                                         m_hMutex(NULL)
00070 {
00071 }


Member Function Documentation

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

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 }

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

Implements CWaitableObject.

Definition at line 103 of file Win32Mutex.cpp.

00104 {
00105     return m_hMutex;
00106 }

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 97 of file Win32Mutex.cpp.

00098 {
00099     //Release the mutex
00100     return ReleaseMutex(m_hMutex)!=0;
00101 }

void CWin32Mutex::ReleaseObject (  )  [virtual]

Implements CWaitableObject.

Definition at line 108 of file Win32Mutex.cpp.

00109 {
00110     Release();
00111 }

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

Definition at line 49 of file WaitableObject.cpp.

00050 {
00051     m_bFirst=TRUE;
00052 }

void CWin32Mutex::SetHandle ( HANDLE  hMutex  )  [protected]

Definition at line 80 of file Win32Mutex.cpp.

00081 {
00082     m_hMutex=hMutex;
00083 }


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