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

00047                                                : CGenericMutex(pMutexName),
00048                                                    m_hMutex(NULL)
00049 {
00050     //Try to create the mutex
00051     m_hMutex=CreateMutex(NULL,
00052                          FALSE,
00053                          pMutexName);
00054 
00055     //Check if we are the owners
00056     if (pMutexName && 
00057         GetLastError()!=ERROR_ALREADY_EXISTS)
00058         SetFirst();
00059 }

CWin32Mutex::~CWin32Mutex (  )  [virtual]

Definition at line 61 of file Win32Mutex.cpp.

00062 {
00063     //Delete the mutex
00064     if (m_hMutex)
00065         CloseHandle(m_hMutex);
00066 }


Member Function Documentation

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

Implements CGenericMutex.

Definition at line 68 of file Win32Mutex.cpp.

00069 {
00070     DWORD dwWaitResult;
00071 
00072     //Wait for the mutex
00073     dwWaitResult=WaitForSingleObject(m_hMutex,ulMSTimeout);
00074 
00075     //Check why did we quit
00076     return dwWaitResult==WAIT_TIMEOUT;
00077 }

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

Implements CWaitableObject.

Definition at line 85 of file Win32Mutex.cpp.

00086 {
00087     return m_hMutex;
00088 }

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

00080 {
00081     //Release the mutex
00082     return ReleaseMutex(m_hMutex)!=0;
00083 }

void CWin32Mutex::ReleaseObject (  )  [virtual]

Implements CWaitableObject.

Definition at line 90 of file Win32Mutex.cpp.

00091 {
00092     Release();
00093 }

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: