void CInterChatApp::GetHostInfo(CString &hostIP,CString &hostname)
{
DWORD dwsize = 255;
char username[255];
if(::GetComputerName(&username[0], &dwsize))
{
hostent *pHost;
pHost=::gethostbyname(username);
LPCSTR psz;
psz=inet_ntoa (*(struct in_addr *)pHost-> h_addr_list[0]);
hostIP = (CString)psz;
hostname = (CString)username;
}
}