Http Connectivity
-
Hello Friends Help is required from anybody who has done coding for http connectivity using VC++ 6.0 using MFC. Following is the scenario wherein i am trying to connect the site by authenticating the proxy server. Following are the steps which i am following, if i am work pls guide me out. CInternetSession *pSession; CHttpConnection *pConnection; CHttpFile *pFile; CString strObject; CString szAuthLine; BOOL bResult; DWORD dwRet; pSession= new CInternetSession (NULL,1,INTERNET_OPEN_TYPE_PRECONFIG,NULL,NULL,0); pConnection=pSession->GetHttpConnection (_T("http://www.codeproject.com"),1,808,"girish","girish2005"); pFile=pConnection->OpenRequest(NULL,strObject, NULL,1,NULL,NULL,NULL); szAuthLine="girish:girish2005"; pFile->AddRequestHeaders(szAuthLine, HTTP_ADDREQ_FLAG_ADD,strlen(szAuthLine)); bResult=pFile->SendRequest(szAuthLine,NULL,0); Following mentioned above is the code pls help me out. With Rgds Girish Software Developer