I am getting a error that "The server name or address could not be
resolved". How to rectify this error. Please Help
Regds
Kiron
/*------------------------------------------------------------------------------------------------------*/
BOOL CTestInetConDlg::OnInitDialog()
{
//Common usual code statements
// TODO: Add extra initialization here
CInternetSession *cInetSession = NULL;
CHttpConnection *cHttpConn = NULL;
CHttpFile *file = NULL;
/* GetTax is the webserivce i need to use, it returns a string */
const TCHAR szHeaders[] = _T("POST /HotelService/Hotel.asmx/GetTax
HTTP/1.1\r\nHost: 192.168.0.1\r\nContent-Type:
application/x-www-form-urlencoded\r\nContent-Length: 270");
CString strObject;
cInetSession = new CInternetSession();
cHttpConn =
cInetSession->GetHttpConnection(_T("http://192.168.0.1/"),0,INTERNET_INVALID_PORT_NUMBER,NULL,NULL);
file =
cHttpConn->OpenRequest(0,strObject,NULL,1,NULL,NULL,INTERNET_FLAG_NO_AUTO_REDIRECT);
file->AddRequestHeaders(szHeaders);
file->SendRequest();
return TRUE; // return TRUE unless you set the focus to a control
}