Hi, in my app I'm trying to establish a FTP connection using:
theApp.m_pConn = m_Session.GetFtpConnection(ip, usr, pwd, INTERNET_INVALID_PORT_NUMBER, FALSE );
In debug mode I track down the line where it crashes:
ASSERT_KINDOF(CInternetSession, pSession);
Any help would be really appreciated.
[edit]replaced <code> tags with <pre> tags for readability[/edit]
Here is the code snippet:
try { theApp.m_pConn = m_Session.GetFtpConnection(ip, usr, pwd, INTERNET_INVALID_PORT_NUMBER, FALSE );
}
catch (CInternetException* pEx) { TCHAR szErr[1024];
if (pEx->GetErrorMessage(szErr, 1024))
{
AfxMessageBox(szErr);
pEx->Delete();
theApp.m_pConn = NULL;
return;
}
else
{
str.Format(CTXT_CONN_ERROR,"%s",name);
ShowMsg(str);
}
pEx->Delete();
theApp.m_pConn = NULL;
}