主题:[讨论]在vc6.0下如何获取ip地址,和端口
CMy10xpcDlg::CMy10xpcDlg(CWnd* pParent /*=NULL*/)
: CDialog(CMy10xpcDlg::IDD, pParent)
, m_ipport(_T("22222"))
, m_ipaddress(_T("192.168.1.111"))
, mode(TCPIP)
, m_stoptime(-1.0)
, m_disnode1(FALSE)/////////////||||
{
//{{AFX_DATA_INIT(CMy10xpcDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
//获取ip地址和端口号
CStringA ipaddressA(m_ipaddress);
const char *pipaddress = ipaddressA.GetString(0);
CStringA ipportA(m_ipport);
const char *pipport = ipportA.GetString(0);
//这四句在2010中可用,在vc6.0中该如何修改
: CDialog(CMy10xpcDlg::IDD, pParent)
, m_ipport(_T("22222"))
, m_ipaddress(_T("192.168.1.111"))
, mode(TCPIP)
, m_stoptime(-1.0)
, m_disnode1(FALSE)/////////////||||
{
//{{AFX_DATA_INIT(CMy10xpcDlg)
// NOTE: the ClassWizard will add member initialization here
//}}AFX_DATA_INIT
// Note that LoadIcon does not require a subsequent DestroyIcon in Win32
m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
}
//获取ip地址和端口号
CStringA ipaddressA(m_ipaddress);
const char *pipaddress = ipaddressA.GetString(0);
CStringA ipportA(m_ipport);
const char *pipport = ipportA.GetString(0);
//这四句在2010中可用,在vc6.0中该如何修改