Packet::Packet(PBMessage& msg, const CHAR* name) : m_rMsg(msg), m_PacketId(MyCRC(name)) { }
BOOL StrTable::Add( const CHAR* szString, VOID* pPtr ) { __ENTER_FUNCTION UINT id = MyCRC( szString ) ; uint c = (id/4)%m_Count ; for( uint i=0; i<m_Count; i++ ) { if( m_pTable[c].m_Status == STRTS_SET ) { c ++ ; if( c>= m_Count ) c = 0 ; continue ; } if( m_pTable[c].m_pString == NULL ) { m_pTable[c].m_pString = new CHAR[m_StringSize] ; } memset( m_pTable[c].m_pString, 0, sizeof(CHAR)*m_StringSize ) ; strncpy( m_pTable[c].m_pString, szString, m_StringSize-1 ) ; m_pTable[c].m_pPtr = pPtr ; m_pTable[c].m_Status = STRTS_SET ; return TRUE ; } return FALSE ; __LEAVE_FUNCTION return FALSE ; }