コード例 #1
0
void CNetworkMgmt::vGetNodeName(BYTE byAddress, char* acNodeName)
{
    for (int i = 0; i < m_nConMgrCnt; i++)
    {
        CNodeConManager* pNodConMgr = m_ConMgrArr[i];

        if (pNodConMgr != NULL)
        {
            if (pNodConMgr->byGetNodeAddress() == byAddress)
            {
                i = m_nConMgrCnt; //break the loop
                _tcscpy(acNodeName, pNodConMgr->m_acNodeName);
            }
        }
    }
}
コード例 #2
0
BYTE CNetworkMgmt::byGetNodeAddress(DWORD dwClient)
{
    BYTE byAddress = ADDRESS_NULL;
    for (int i = 0; i < m_nConMgrCnt; i++)
    {
        CNodeConManager* pNodConMgr = m_ConMgrArr[i];

        if (pNodConMgr != NULL)
        {
            if (pNodConMgr->m_dwClientID == dwClient)
            {
                i = m_nConMgrCnt; //break the loop
                byAddress = pNodConMgr->byGetNodeAddress();
            }
        }
    }
    return byAddress;
}