bool CInetWrapper::OpenFtpConnection (LPCTSTR lpszServerName)
{
// internetconnect(inet_open,'ftp.site.ru',port,'login','pass',INTERNET_SERVICE_FTP,INTERNET_FLAG_PASSIVE,0);
if (OpenInternet() && m_hConnection == NULL)
// (HINTERNET,LPCSTR,INTERNET_PORT,LPCSTR,LPCSTR,DWORD,DWORD,DWORD);
typedef HINTERNET (__stdcall* InternetConnect_)(HINTERNET,LPCSTR,INTERNET_PORT,LPCSTR,LPCSTR,DWORD,DWORD,DWORD);
InternetConnect_ ic = (InternetConnect_)helper.GetProcAddressEx("wininet.dll", "InternetConnectA");
m_hConnection = ic(
m_hInternet,
lpszServerName? lpszServerName:
m_lpszServerName? m_lpszServerName: "localhost",
INTERNET_DEFAULT_FTP_PORT,
m_login,
m_password,
INTERNET_SERVICE_FTP,
0,
0);
return CheckError(m_hConnection != NULL);
}
和编译器说: 1>----- 构建开始:项目:klstart,配置:调试 Win32 ------ 1> HTTPReader.cpp 1>c:\u\admin\visual studio 2010\projects\klstart \klstart\httpreader.cpp(100): 错误 C2065: 'InternetConnect_': 未声明的标识符 1>c:\u\admin\visual studio 2010\projects\klstart\klstart\httpreader.cpp(100): 错误 C2146: 语法错误: 失踪 ';' 在标识符“助手”之前我写错了什么?