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


CWin32Thread Class Reference

#include <Win32Thread.h>

Inheritance diagram for CWin32Thread:
Collaboration diagram for CWin32Thread:

List of all members.


Public Types

enum  _ThreadStatus { tsSuspended, tsRunning, tsStopped, tsError }
enum  _ThreadPriority {
  tpIdle = 0, tpLowest, tpBelowNormal, tpNormal,
  tpAboveNormal, tpHighest, tpTimeCritical
}
typedef GenericThreadProc LPGenericThreadProc
typedef enum
CGenericThread::_ThreadStatus 
ThreadStatus
typedef enum
CGenericThread::_ThreadPriority 
ThreadPriority
typedef DWORD(* GenericThreadProc )(LPVOID pParam)

Public Member Functions

virtual BOOL SetPriority (CGenericThread::ThreadPriority aPriority)
virtual
CGenericThread::ThreadPriority 
GetPriority () const
virtual BOOL Start (LPVOID pData)
virtual BOOL Stop ()
 CWin32Thread (LPGenericThreadProc pThreadProc)
virtual ~CWin32Thread ()
void SetBruteTermination (BOOL bBrute)
void SetAutoDelete (BOOL bAuto)
virtual DWORD GetThreadID () const
ThreadStatus GetThreadStatus () const
void SetLocalLog (CErrorLog *pLog)

Static Public Member Functions

static std::string GetCurrentDateTime ()
static std::string ErrorCodeToString (DWORD dwErrorCode)
static void SetLog (CErrorLog *pLog)

Protected Member Functions

BOOL GetBruteTermination () const
BOOL GetAutoDelete () const
LPGenericThreadProc GetThreadProc () const
void SetThreadStatus (ThreadStatus aStatus)
virtual LPVOID GetData () const
const std::string & GetClassName () const
void WriteMessage (const std::string &rMethod, const std::string &rMessage, LogPriority aPriority=lpMessage)
void WriteMessage (const std::string &rMethod, const std::string &rMessage, DWORD dwAdditionalData, LogPriority aPriority=lpMessage)
virtual void ReportError (const std::string &rMethod) const
virtual void ReportError (const std::string &rMethod, const std::string &rMessage) const
virtual void ReportError (const std::string &rMethod, const std::string &rMessage, DWORD dwAdditionalData) const
virtual void ReportError (const std::string &rMethod, int iErrorCode) const
virtual void ReportError (const std::string &rMethod, const std::string &rMessage, int iErrorCode) const
virtual void ReportErrorOS (const std::string &rMethod, const std::string &rMessage) const
void SetName (const std::string &rName) const

Static Protected Member Functions

static void WriteStaticMessage (const std::string &rClass, const std::string &rMethod, const std::string &rMessage, LogPriority aPriority=lpMessage)
static void WriteStaticMessage (const std::string &rClass, const std::string &rMethod, const std::string &rMessage, DWORD dwAdditionalData, LogPriority aPriority=lpMessage)
static void ReportStaticError (const std::string &rClass, const std::string &rMethod)
static void ReportStaticError (const std::string &rClass, const std::string &rMethod, const std::string &rMessage)
static void ReportStaticError (const std::string &rClass, const std::string &rMethod, const std::string &rMessage, DWORD dwAdditionalData)

Protected Attributes

LPGenericThreadProc m_pThreadProc
DWORD m_dwThreadID
LPVOID m_pData

Detailed Description

Definition at line 49 of file Win32Thread.h.


Member Typedef Documentation

typedef DWORD(* CGenericThread::GenericThreadProc)(LPVOID pParam) [inherited]

Definition at line 56 of file GenericThread.h.


Member Enumeration Documentation

enum CErrorHandler::_LogPriority [inherited]

Enumerator:
lpDebug 
lpMessage 
lpCritical 
lpError 

Definition at line 53 of file ErrorHandler.h.

00054     {
00055         lpDebug,
00056         lpMessage,
00057         lpCritical,
00058         lpError
00059     } LogPriority;

Enumerator:
tpIdle 
tpLowest 
tpBelowNormal 
tpNormal 
tpAboveNormal 
tpHighest 
tpTimeCritical 

Definition at line 68 of file GenericThread.h.

00069     {
00070         tpIdle=0,
00071         tpLowest,
00072         tpBelowNormal,
00073         tpNormal,
00074         tpAboveNormal,
00075         tpHighest,
00076         tpTimeCritical
00077     } ThreadPriority;

Enumerator:
tsSuspended 
tsRunning 
tsStopped 
tsError 

Definition at line 59 of file GenericThread.h.

00060     {
00061         tsSuspended,
00062         tsRunning,
00063         tsStopped,
00064         tsError
00065     } ThreadStatus;


Constructor & Destructor Documentation

CWin32Thread::CWin32Thread ( LPGenericThreadProc  pThreadProc  ) 

Definition at line 51 of file Win32Thread.cpp.

00051                                                           : CGenericThread(pThreadProc),
00052                                                               m_hThread(0)
00053 {
00054     try
00055     {
00056         //Set our name
00057         SetName(CWin32Thread_Class);
00058 
00059         //Create the thread
00060         if (m_pThreadProc)
00061         {
00062             //Create the thread in suspend mode
00063             m_hThread=CreateThread(NULL,
00064                                    0,
00065                                    Win32Thread,
00066                                    this,
00067                                    CREATE_SUSPENDED,
00068                                    &m_dwThreadID);
00069 
00070             //Check if created
00071             if (m_hThread)
00072                 SetThreadStatus(tsSuspended);
00073         }
00074     }
00075     ERROR_HANDLER("CWin32Thread")
00076 }

CWin32Thread::~CWin32Thread (  )  [virtual]

Definition at line 78 of file Win32Thread.cpp.

00079 {
00080     try
00081     {
00082         //Stop the thread
00083         Stop();
00084     }
00085     ERROR_HANDLER("~CWin32Thread")
00086 }


Member Function Documentation

std::string CErrorHandler::ErrorCodeToString ( DWORD  dwErrorCode  )  [static, inherited]

Definition at line 122 of file ErrorHandler.cpp.

00123 {
00124     try
00125     {
00126         //Get the error string
00127         LPVOID lpMsgBuf;
00128         FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | 
00129                       FORMAT_MESSAGE_FROM_SYSTEM | 
00130                       FORMAT_MESSAGE_IGNORE_INSERTS,
00131                       NULL,
00132                       dwErrorCode,
00133                       MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language
00134                       (LPTSTR) &lpMsgBuf,
00135                       0,
00136                       NULL);
00137 
00138         //Save it
00139         std::string sMessage;
00140         sMessage+=(char*)lpMsgBuf;
00141         
00142         //Release the buffer
00143         LocalFree(lpMsgBuf);
00144 
00145         //Done
00146         return sMessage;
00147     }
00148     catch (...)
00149     {
00150         return "Unknown";
00151     }
00152 }

BOOL CGenericThread::GetAutoDelete (  )  const [protected, inherited]

Definition at line 124 of file GenericThread.cpp.

00125 {
00126     return m_bAutoDelete;
00127 }

BOOL CGenericThread::GetBruteTermination (  )  const [protected, inherited]

Definition at line 134 of file GenericThread.cpp.

00135 {
00136     return m_bBruteTermination;
00137 }

const std::string & CErrorHandler::GetClassName (  )  const [protected, inherited]

Reimplemented in CSocketThreadManager.

Definition at line 516 of file ErrorHandler.cpp.

00517 {
00518     return m_sClassName;
00519 }

std::string CErrorHandler::GetCurrentDateTime (  )  [static, inherited]

Definition at line 521 of file ErrorHandler.cpp.

00522 {
00523     try
00524     {
00525         //Our string
00526         std::string sDate;
00527 
00528         //Our tmp buf
00529         char cTmp[128];
00530 
00531         //Get date
00532         _strdate(cTmp);
00533         sDate=cTmp;
00534         sDate+=' ';
00535 
00536         //Get time
00537         _strtime(cTmp);
00538         sDate+=cTmp;
00539 
00540         //Done
00541         return sDate;
00542     }
00543     ERROR_HANDLER_STATIC_RETURN(CErrorHandler_Class,"GetCurrentDateTime","")
00544 }

LPVOID CGenericThread::GetData (  )  const [protected, virtual, inherited]

Definition at line 82 of file GenericThread.cpp.

00083 {
00084     return m_pData;
00085 }

CGenericThread::ThreadPriority CWin32Thread::GetPriority (  )  const [virtual]

Implements CGenericThread.

Definition at line 266 of file Win32Thread.cpp.

00267 {
00268     try
00269     {
00270         //Check if we have the thread
00271         if (!m_hThread)
00272             return CGenericThread::tpNormal;
00273 
00274         int iPriority;
00275 
00276         //Get the priority
00277         iPriority=GetThreadPriority(m_hThread);
00278 
00279         //And return the value
00280         switch (iPriority)
00281         {
00282         case THREAD_PRIORITY_ABOVE_NORMAL:
00283             return CGenericThread::tpAboveNormal;
00284         case THREAD_PRIORITY_BELOW_NORMAL:
00285             return CGenericThread::tpBelowNormal;
00286         case THREAD_PRIORITY_HIGHEST:
00287             return CGenericThread::tpHighest;
00288         case THREAD_PRIORITY_IDLE:
00289             return CGenericThread::tpIdle;
00290         case THREAD_PRIORITY_LOWEST:
00291             return CGenericThread::tpLowest;
00292         case THREAD_PRIORITY_NORMAL:
00293             return CGenericThread::tpNormal;
00294         case THREAD_PRIORITY_TIME_CRITICAL:
00295             return CGenericThread::tpTimeCritical;
00296         default:
00297             return CGenericThread::tpNormal;
00298         }
00299     }
00300     ERROR_HANDLER_RETURN("GetPriority",CGenericThread::tpNormal)
00301 }

DWORD CGenericThread::GetThreadID (  )  const [virtual, inherited]

Definition at line 77 of file GenericThread.cpp.

00078 {
00079     return m_dwThreadID;
00080 }

CGenericThread::LPGenericThreadProc CGenericThread::GetThreadProc (  )  const [protected, inherited]

Definition at line 114 of file GenericThread.cpp.

00115 {
00116     return m_pThreadProc;
00117 }

CGenericThread::ThreadStatus CGenericThread::GetThreadStatus (  )  const [inherited]

Definition at line 109 of file GenericThread.cpp.

00110 {
00111     return m_aThreadStatus;
00112 }

void CErrorHandler::ReportError ( const std::string &  rMethod,
const std::string &  rMessage,
int  iErrorCode 
) const [protected, virtual, inherited]

Definition at line 154 of file ErrorHandler.cpp.

00157 {
00158     if (!GetLog())
00159         return;
00160 
00161     try
00162     {
00163         //Get the log
00164         CErrorLog* pLog;
00165         pLog=GetLog();
00166 
00167         //Convert the error code
00168         char aTmp[11];
00169         sprintf(aTmp,"%d",iErrorCode);
00170 
00171         //Get the string for it
00172         std::string sError;
00173         sError=rMessage;
00174         sError+=", and Socket error: ";
00175         sError+=aTmp;
00176         sError+=", ";
00177         sError+=ErrorCodeToString(iErrorCode);
00178 
00179         //Report to the log
00180         pLog->ReportError(m_sClassName,
00181                           rMethod,
00182                           sError);
00183     }
00184     ERROR_UNKNOWN("ReportError")
00185 }

void CErrorHandler::ReportError ( const std::string &  rMethod,
int  iErrorCode 
) const [protected, virtual, inherited]

Definition at line 187 of file ErrorHandler.cpp.

00189 {
00190     if (!GetLog())
00191         return;
00192 
00193     try
00194     {
00195         //Get the log
00196         CErrorLog* pLog;
00197         pLog=GetLog();
00198 
00199         //Convert the error code
00200         char aTmp[11];
00201         sprintf(aTmp,"%d",iErrorCode);
00202 
00203         //Get the string for it
00204         std::string sError;
00205         sError="Socket error: ";
00206         sError+=aTmp;
00207         sError+=", ";
00208         sError+=ErrorCodeToString(iErrorCode);
00209 
00210         //Report to the log
00211         pLog->ReportError(m_sClassName,
00212                           rMethod,
00213                           sError);
00214     }
00215     ERROR_UNKNOWN("ReportError")
00216 }

void CErrorHandler::ReportError ( const std::string &  rMethod,
const std::string &  rMessage,
DWORD  dwAdditionalData 
) const [protected, virtual, inherited]

Definition at line 275 of file ErrorHandler.cpp.

00278 {
00279     if (!GetLog())
00280         return;
00281 
00282     try
00283     {
00284         //Get the log
00285         CErrorLog* pLog;
00286         pLog=GetLog();
00287 
00288         //Convert the number
00289         char aTmp[11];
00290         ltoa(dwAdditionalData,aTmp,10);
00291 
00292         //Create the new message
00293         std::string sNewMessage(rMessage);
00294         sNewMessage+="Additional data: ";
00295         sNewMessage+=aTmp;
00296 
00297         //Report to the log
00298         pLog->ReportError(m_sClassName,
00299                           rMethod,
00300                           sNewMessage);
00301     }
00302     ERROR_UNKNOWN("ReportError")
00303 }

void CErrorHandler::ReportError ( const std::string &  rMethod,
const std::string &  rMessage 
) const [protected, virtual, inherited]

Definition at line 218 of file ErrorHandler.cpp.

00220 {
00221     if (!GetLog())
00222         return;
00223 
00224     try
00225     {
00226         CErrorLog* pLog;
00227         pLog=GetLog();
00228 
00229         //Report to the log
00230         pLog->ReportError(m_sClassName,
00231                           rMethod,
00232                           rMessage);
00233     }
00234     ERROR_UNKNOWN("ReportError")
00235 }

void CErrorHandler::ReportError ( const std::string &  rMethod  )  const [protected, virtual, inherited]

Definition at line 311 of file ErrorHandler.cpp.

00312 {
00313     if (!GetLog())
00314         return;
00315 
00316     try
00317     {
00318 #ifdef WIN32
00319         //Get the last error
00320         DWORD dwLastError;
00321         dwLastError=GetLastError();
00322 
00323         //Report the error
00324         GetLog()->ReportError(m_sClassName,
00325                               rMethod,
00326                               ErrorCodeToString(dwLastError));
00327 
00328 #else
00329         GetLog()->ReportCatchError(m_sClassName,
00330                                    rMethod,
00331                                    "Unknown error!");
00332 #endif
00333     }
00334     ERROR_UNKNOWN("ReportError")
00335 }

void CErrorHandler::ReportErrorOS ( const std::string &  rMethod,
const std::string &  rMessage 
) const [protected, virtual, inherited]

Definition at line 237 of file ErrorHandler.cpp.

00239 {
00240     if (!GetLog())
00241         return;
00242 
00243     try
00244     {
00245         //Get the last error
00246         DWORD dwLastError;
00247         dwLastError=GetLastError();
00248 
00249         //Format the message
00250         std::string sMessage;
00251         sMessage=rMessage;
00252         sMessage+=", with error code: ";
00253 
00254         //Convert the error code
00255         char aTmp[11];
00256         itoa(dwLastError,aTmp,10);
00257 
00258         //Add it again
00259         sMessage+=aTmp;
00260         sMessage+=" ";
00261         sMessage+=ErrorCodeToString(dwLastError);
00262         
00263         //Get the log
00264         CErrorLog* pLog;
00265         pLog=GetLog();
00266 
00267         //Report to the log
00268         pLog->ReportError(m_sClassName,
00269                           rMethod,
00270                           sMessage);
00271     }
00272     ERROR_UNKNOWN("ReportErrorOS")
00273 }

void CErrorHandler::ReportStaticError ( const std::string &  rClass,
const std::string &  rMethod,
const std::string &  rMessage,
DWORD  dwAdditionalData 
) [static, protected, inherited]

Definition at line 489 of file ErrorHandler.cpp.

00493 {
00494     if (!m_pLog)
00495         return;
00496 
00497     try
00498     {
00499         //Convert the number
00500         char aTmp[11];
00501         ltoa(dwAdditionalData,aTmp,10);
00502 
00503         //Create the new message
00504         std::string sNewMessage(rMessage);
00505         sNewMessage+="Additional data: ";
00506         sNewMessage+=aTmp;
00507 
00508         //Report to the log
00509         m_pLog->ReportError(rClass,
00510                             rMethod,
00511                             sNewMessage);
00512     }
00513     ERROR_UNKNOWN("ReportStaticError")
00514 }

void CErrorHandler::ReportStaticError ( const std::string &  rClass,
const std::string &  rMethod,
const std::string &  rMessage 
) [static, protected, inherited]

Definition at line 472 of file ErrorHandler.cpp.

00475 {
00476     if (!m_pLog)
00477         return;
00478 
00479     try
00480     {
00481         //Report to the log
00482         m_pLog->ReportError(rClass,
00483                             rMethod,
00484                             rMessage);
00485     }
00486     ERROR_UNKNOWN("ReportStaticError")
00487 }

void CErrorHandler::ReportStaticError ( const std::string &  rClass,
const std::string &  rMethod 
) [static, protected, inherited]

Definition at line 446 of file ErrorHandler.cpp.

00448 {
00449     if (!m_pLog)
00450         return;
00451 
00452     try
00453     {
00454 #ifdef WIN32
00455         //Get the last error
00456         DWORD dwLastError;
00457         dwLastError=GetLastError();
00458 
00459         //Report the error
00460         m_pLog->ReportError(rClass,
00461                             rMethod,
00462                             ErrorCodeToString(dwLastError));
00463 #else
00464         m_pLog->ReportError(rClass,
00465                             rMethod,
00466                             "Unknown error!");
00467 #endif
00468     }
00469     ERROR_UNKNOWN("ReportStaticError")
00470 }

void CGenericThread::SetAutoDelete ( BOOL  bAuto  )  [inherited]

Definition at line 119 of file GenericThread.cpp.

00120 {
00121     m_bAutoDelete=bAuto;
00122 }

void CGenericThread::SetBruteTermination ( BOOL  bBrute  )  [inherited]

Definition at line 129 of file GenericThread.cpp.

00130 {
00131     m_bBruteTermination=bBrute;
00132 }

void CErrorHandler::SetLocalLog ( CErrorLog pLog  )  [inherited]

Definition at line 441 of file ErrorHandler.cpp.

00442 {
00443     m_pLocalLog=pLog;
00444 }

void CErrorHandler::SetLog ( CErrorLog pLog  )  [static, inherited]

Definition at line 305 of file ErrorHandler.cpp.

00306 {
00307     //Save the new log
00308     m_pLog=pLog;
00309 }

void CErrorHandler::SetName ( const std::string &  rName  )  const [protected, inherited]

Definition at line 116 of file ErrorHandler.cpp.

00117 {
00118     //Save the class name
00119     m_sClassName=rName;
00120 }

BOOL CWin32Thread::SetPriority ( CGenericThread::ThreadPriority  aPriority  )  [virtual]

Implements CGenericThread.

Definition at line 228 of file Win32Thread.cpp.

00229 {
00230     try
00231     {
00232         static const int iThreadPriority[]={THREAD_PRIORITY_IDLE,
00233                                             THREAD_PRIORITY_LOWEST,
00234                                             THREAD_PRIORITY_BELOW_NORMAL,
00235                                             THREAD_PRIORITY_NORMAL,
00236                                             THREAD_PRIORITY_ABOVE_NORMAL,
00237                                             THREAD_PRIORITY_HIGHEST,
00238                                             THREAD_PRIORITY_TIME_CRITICAL};
00239 
00240         //Do we have a thread
00241         if (GetThreadStatus()==tsStopped)
00242         {
00243             //Recreate the thread
00244             //Create the thread in suspend mode
00245             m_hThread=CreateThread(NULL,
00246                                    0,
00247                                    Win32Thread,
00248                                    this,
00249                                    CREATE_SUSPENDED,
00250                                    &m_dwThreadID);
00251 
00252             //Check if created
00253             if (m_hThread)
00254                 SetThreadStatus(tsSuspended);
00255             else
00256                 //Can't run
00257                 return FALSE;
00258         }
00259 
00260         //Now we can set the priority
00261         return SetThreadPriority(m_hThread,iThreadPriority[aPriority]);
00262     }
00263     ERROR_HANDLER_RETURN("SetPriority",FALSE)
00264 }

void CGenericThread::SetThreadStatus ( ThreadStatus  aStatus  )  [protected, inherited]

Definition at line 96 of file GenericThread.cpp.

00097 {
00098     try
00099     {
00100         //Enter the CS
00101         CCriticalAutoRelease aRelease(m_pCSection);
00102 
00103         //Set it
00104         m_aThreadStatus=aStatus;
00105     }
00106     ERROR_HANDLER("SetThreadStatus")
00107 }

BOOL CWin32Thread::Start ( LPVOID  pData  )  [virtual]

Reimplemented from CGenericThread.

Definition at line 88 of file Win32Thread.cpp.

00089 {
00090     try
00091     {
00092         if (GetThreadStatus()==tsStopped)
00093         {
00094             //Recreate the thread
00095             //Create the thread in suspend mode
00096             m_hThread=CreateThread(NULL,
00097                                    0,
00098                                    Win32Thread,
00099                                    this,
00100                                    CREATE_SUSPENDED,
00101                                    &m_dwThreadID);
00102 
00103             //Check if created
00104             if (m_hThread)
00105                 SetThreadStatus(tsSuspended);
00106             else
00107                 //Can't run
00108                 return FALSE;
00109         }
00110         else if (GetThreadStatus()!=tsSuspended)
00111             return FALSE;
00112 
00113         //Start the thread
00114         CGenericThread::Start(pData);
00115 
00116         //Resume the thread
00117         if (m_hThread)
00118             if (ResumeThread(m_hThread)!=-1)
00119                 //We are running
00120                 return TRUE;
00121 
00122         return FALSE;
00123     }
00124     ERROR_HANDLER_RETURN("Start",FALSE)
00125 }

BOOL CWin32Thread::Stop (  )  [virtual]

Implements CGenericThread.

Definition at line 127 of file Win32Thread.cpp.

00128 {
00129     try
00130     {
00131         //Only if suspened or running
00132         //Do we have the thread ?
00133         if (m_hThread)
00134         {
00135             //What status are we
00136             if (GetThreadStatus()==tsRunning &&
00137                 GetBruteTermination())
00138                 //First try to close it
00139                 if (!TerminateThread(m_hThread,THREAD_DO_NOTHING_EXIT_VALUE))
00140                     return FALSE;
00141 
00142             if (GetThreadStatus()==tsSuspended ||
00143                 GetThreadStatus()==tsRunning)
00144                 if (CloseHandle(m_hThread))
00145                 {
00146                     //Close the handle
00147                     m_hThread=NULL;
00148 
00149                     //Stopped
00150                     SetThreadStatus(tsStopped);
00151 
00152                     //Exit
00153                     return TRUE;
00154                 }
00155                 else
00156                     return FALSE;
00157             else
00158             {
00159                 //Just close the handle
00160                 if (!CloseHandle(m_hThread))
00161                     m_hThread=NULL;
00162 
00163                 //Exit
00164                 return FALSE;
00165             }
00166         }
00167         else
00168             return FALSE;
00169     }
00170     ERROR_HANDLER_RETURN("Stop",FALSE)
00171 }

void CErrorHandler::WriteMessage ( const std::string &  rMethod,
const std::string &  rMessage,
DWORD  dwAdditionalData,
LogPriority  aPriority = lpMessage 
) [protected, inherited]

Definition at line 355 of file ErrorHandler.cpp.

00359 {
00360     if (!GetLog())
00361         return;
00362 
00363     try
00364     {
00365         //Convert the number
00366         char aTmp[11];
00367         ltoa(dwAdditionalData,aTmp,10);
00368 
00369         //Create the new message
00370         std::string sNewMessage(rMessage);
00371         sNewMessage+="Additional data: ";
00372         sNewMessage+=aTmp;
00373 
00374         //Delegate the call
00375         GetLog()->WriteMessage(m_sClassName,
00376                                rMethod,
00377                                sNewMessage,
00378                                aPriority);
00379     }
00380     ERROR_UNKNOWN("WriteMessage")
00381 }

void CErrorHandler::WriteMessage ( const std::string &  rMethod,
const std::string &  rMessage,
LogPriority  aPriority = lpMessage 
) [protected, inherited]

Definition at line 337 of file ErrorHandler.cpp.

00340 {
00341     if (!GetLog())
00342         return;
00343 
00344     try
00345     {
00346         //Delegate the call
00347         GetLog()->WriteMessage(m_sClassName,
00348                                rMethod,
00349                                rMessage,
00350                                aPriority);
00351     }
00352     ERROR_UNKNOWN("WriteMessage")
00353 }

void CErrorHandler::WriteStaticMessage ( const std::string &  rClass,
const std::string &  rMethod,
const std::string &  rMessage,
DWORD  dwAdditionalData,
LogPriority  aPriority = lpMessage 
) [static, protected, inherited]

Definition at line 403 of file ErrorHandler.cpp.

00408 {
00409     if (!m_pLog)
00410         return;
00411 
00412     try
00413     {
00414         //Convert the number
00415         char aTmp[11];
00416         ltoa(dwAdditionalData,aTmp,10);
00417 
00418         //Create the new message
00419         std::string sNewMessage(rMessage);
00420         sNewMessage+="Additional data: ";
00421         sNewMessage+=aTmp;
00422 
00423         //Delegate the call
00424         m_pLog->WriteMessage(rClass,
00425                              rMethod,
00426                              sNewMessage,
00427                              aPriority);
00428     }
00429     ERROR_UNKNOWN("WriteStaticMessage")
00430 }

void CErrorHandler::WriteStaticMessage ( const std::string &  rClass,
const std::string &  rMethod,
const std::string &  rMessage,
LogPriority  aPriority = lpMessage 
) [static, protected, inherited]

Definition at line 383 of file ErrorHandler.cpp.

00388 {
00389     if (!m_pLog)
00390         return;
00391 
00392     try
00393     {
00394         //Delegate the call
00395         m_pLog->WriteMessage(rClass,
00396                              rMethod,
00397                              rMessage,
00398                              aPriority);
00399     }
00400     ERROR_UNKNOWN("WriteStaticMessage")
00401 }


Member Data Documentation

DWORD CGenericThread::m_dwThreadID [protected, inherited]

Definition at line 133 of file GenericThread.h.

LPVOID CGenericThread::m_pData [protected, inherited]

Definition at line 136 of file GenericThread.h.

Definition at line 130 of file GenericThread.h.


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