CFtpConnection::PutFile 需要设置代理才能上传 [所有相关帖子]
怎么用代码设置??我不想用wingate
但是好像GetFile能够使用proxy,就是FILE_ATTRIBUTE_TEMPORARY,不过我也不知道怎么用。大虾请教啊!!!怎样设置代理??
#include <afxinet.h>
CInternetSession *m_pInetSession;
CFtpConnection *m_pFtpConnection;
m_pInetSession = new CInternetSession(AfxGetAppName(),1,PRE_CONFIG_INTERNET_ACCESS);
m_pFtpConnection = m_pInetSession->GetFtpConnection("10.10.1.208", "haha", "haha");
if (m_pFtpConnection)
{
if (m_pFtpConnection->PutFile("d:\\新四军军歌.asf" ,"新四军军歌.asf"))
{
AfxMessageBox("OK, Success in Copy File(成功拷贝文件).");
}
else
{
AfxMessageBox("OK, Fail in Copy File(拷贝文件失败).");
}
}
m_pFtpConnection->Close();
m_pInetSession->Close();
delete m_pFtpConnection;
delete m_pInetSession;
怎么用代码设置??我不想用wingate
但是好像GetFile能够使用proxy,就是FILE_ATTRIBUTE_TEMPORARY,不过我也不知道怎么用。大虾请教啊!!!怎样设置代理??
#include <afxinet.h>
CInternetSession *m_pInetSession;
CFtpConnection *m_pFtpConnection;
m_pInetSession = new CInternetSession(AfxGetAppName(),1,PRE_CONFIG_INTERNET_ACCESS);
m_pFtpConnection = m_pInetSession->GetFtpConnection("10.10.1.208", "haha", "haha");
if (m_pFtpConnection)
{
if (m_pFtpConnection->PutFile("d:\\新四军军歌.asf" ,"新四军军歌.asf"))
{
AfxMessageBox("OK, Success in Copy File(成功拷贝文件).");
}
else
{
AfxMessageBox("OK, Fail in Copy File(拷贝文件失败).");
}
}
m_pFtpConnection->Close();
m_pInetSession->Close();
delete m_pFtpConnection;
delete m_pInetSession;
http://www.tiexue.net/bbs/dispbbs.asp?boardID=12&ID=38283
InternetOpen里可以设置代理
也可以用InternetSetOption设置代理.