Click here to Skip to main content
15,896,153 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Self terminating/Killing application Pin
Stephen Hewitt16-May-06 22:12
Stephen Hewitt16-May-06 22:12 
GeneralRe: Self terminating/Killing application Pin
Russell'16-May-06 22:32
Russell'16-May-06 22:32 
QuestionAfxParseURL Pin
shuchigo_jane16-May-06 20:36
shuchigo_jane16-May-06 20:36 
AnswerRe: AfxParseURL Pin
Cedric Moonen16-May-06 20:55
Cedric Moonen16-May-06 20:55 
GeneralRe: AfxParseURL Pin
shuchigo_jane16-May-06 21:05
shuchigo_jane16-May-06 21:05 
GeneralRe: AfxParseURL Pin
Cedric Moonen16-May-06 21:09
Cedric Moonen16-May-06 21:09 
GeneralRe: AfxParseURL Pin
ThatsAlok16-May-06 21:12
ThatsAlok16-May-06 21:12 
GeneralRe: AfxParseURL Pin
shuchigo_jane16-May-06 21:16
shuchigo_jane16-May-06 21:16 
will this detailed code help tracking it??

CInternetSession session("My Session");
CHttpConnection* pServer = NULL;
CString tmpstr;
char inbuff[100000];
UINT nBytesRead;
CHttpFile* pFile = NULL;
try
{
void *szBuff=NULL;
CString URL=("http://www.yahoo.com");
BOOL bParse;
CString csSvrName;
CString csObjName;
INTERNET_PORT nPort;
DWORD dwServiceType = AFX_INET_SERVICE_HTTP;
bParse=AfxParseURL( URL, dwServiceType , csSvrName, csObjName, nPort );

pServer = session.GetHttpConnection( csSvrName, nPort);
pFile = pServer->OpenRequest(CHttpConnection::HTTP_VERB_GET, url);
pFile->AddRequestHeaders(pBuf);
pFile->SendRequest();

UINT nRead = pFile->Read(szBuff, 1023);
while (nRead > 0)
{
//read file...
}
delete pFile;
delete pServer;
}
catch (CInternetException* pEx)
{
LPTSTR lpszError=NULL;
//catch errors from WinInet
pEx->GetErrorMessagelpszError,1023);
}
if(pFile==NULL)
{
AfxMessageBox("Error in openurl");
}
else
{
nBytesRead=pFile->Read(inbuff,sizeof(inbuff));
tmpstr.Format("Read %d",nBytesRead);
AfxMessageBox(tmpstr);
}// endif
session.Close();
GeneralRe: AfxParseURL Pin
Cedric Moonen16-May-06 21:20
Cedric Moonen16-May-06 21:20 
GeneralRe: AfxParseURL Pin
Mila02516-May-06 21:32
Mila02516-May-06 21:32 
GeneralRe: AfxParseURL Pin
alan top17-May-06 1:43
alan top17-May-06 1:43 
GeneralRe: AfxParseURL Pin
David Crow17-May-06 3:28
David Crow17-May-06 3:28 
QuestionBasic Code Review CheckList in C++ Pin
itkid16-May-06 20:11
itkid16-May-06 20:11 
GeneralRe: Basic Code Review CheckList in C++ Pin
Maxwell Chen16-May-06 20:27
Maxwell Chen16-May-06 20:27 
AnswerRe: Basic Code Review CheckList in C++ Pin
ThatsAlok16-May-06 21:13
ThatsAlok16-May-06 21:13 
GeneralRe: Basic Code Review CheckList in C++ Pin
itkid16-May-06 23:15
itkid16-May-06 23:15 
AnswerRe: Basic Code Review CheckList in C++ Pin
markkuk17-May-06 0:31
markkuk17-May-06 0:31 
QuestionReading USB ports Pin
satsumatable16-May-06 19:56
satsumatable16-May-06 19:56 
AnswerRe: Reading USB ports Pin
Cedric Moonen16-May-06 20:29
Cedric Moonen16-May-06 20:29 
Questionhelp me Pin
ramyasangeet16-May-06 19:52
ramyasangeet16-May-06 19:52 
GeneralRe: help me Pin
Maxwell Chen16-May-06 20:21
Maxwell Chen16-May-06 20:21 
GeneralRe: help me Pin
ramyasangeet16-May-06 21:19
ramyasangeet16-May-06 21:19 
GeneralRe: help me Pin
Maxwell Chen16-May-06 21:49
Maxwell Chen16-May-06 21:49 
AnswerRe: help me Pin
Hamid_RT17-May-06 1:37
Hamid_RT17-May-06 1:37 
Questionwindows regisrty Pin
iLL eFFect16-May-06 19:33
iLL eFFect16-May-06 19:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.