CString strIP="192.168.1.184";   

DWORD dwAddress= ntohl( inet_addr(strIP));   

m_IPAddr.SetAddress(dwAddress);
//---------------------------------------

DWORD dwMainServerIP;  
m_MainServerIPCtrl.GetAddress(dwMainServerIP);  
strMainServerIP.Format(_T("%d.%d.%d.%d"),   
(dwMainServerIP>>24)&0xff,   
(dwMainServerIP>>16)&0xff,   
(dwMainServerIP>>8)&0xff,   
dwMainServerIP&0xff ) ;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2021-12-25
  • 2022-02-08
  • 2022-12-23
猜你喜欢
  • 2022-02-08
  • 2021-09-07
  • 2022-12-23
  • 2021-05-31
  • 2021-12-06
  • 2022-12-23
  • 2021-12-18
相关资源
相似解决方案