LPCTSTR lpszText = (LPCTSTR)sHostName;struct hostent FAR *lpHostEnt = gethostbyname(LPSTR(lpszText));if (lpHostEnt == NULL){sIPAddress = _T("");return WSAGetLastError();}
CString 变量是unicode字符集吗,这种不能直接转换成char*
参考:http://blog.sina.com.cn/s/blog_58e19ae7010003jt.html