又来问问题了哦,关于ftp得
我写了一个ftp客户端,在局域网调试一切正常,在internet上只能连上server却不能下载,晕死我了。
void downNewSkinList() {
CFtpConnection *m_pFtpConnection;
CInternetSession m_pInetSession(AfxGetApp()->m_pszAppName,1,PRE_CONFIG_INTERNET_ACCESS);
m_pFtpConnection=m_pInetSession.GetFtpConnection("192.168.1.2","silver","silverxu",386);
m_pFtpConnection->Command("PASV");
DeleteFile("newskinlist.xml");
m_pFtpConnection->GetServerName(); if(!m_pFtpConnection->GetFile("newskinlist.xml","newskinlist.xml")){
std::cout<<"GetLastError()="+GetLastError()<< endl;
}
m_pInetSession.Close();
m_pFtpConnection->Close();}