I need some help . The CFtpConnection object in the code below seems to work well if I comment out the

"if(pFTPSite->Command..." function.

However, when the command function is not commented out, a compilation error occurs.

What is causing this error? The CFtpConnection object is obviously working for the other functions. I have included afxinet.h in the file. I've also installed the latest SDK and added wininet.lib to the project settings for the linker (something I saw in another thread).


The error is,

c:\Visual C++ Applications\UnixScriptGenerator\RunScriptWizard.cpp(929) : error C2039: 'Command' : is not a member of 'CFtpConnection'
c:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\include\afxinet.h(371) : see declaration of 'CFtpConnection'
c:\Visual C++ Applications\UnixScriptGenerator\RunScriptWizard.cpp(929) : error C2065: 'CmdRespNone' : undeclared identifier



The code is,

void CRunScriptSTDIODialog::RetrieveInputList()
{
CInternetSession sess;
CFtpConnection* pFTPSite = NULL;
CUnixScriptGeneratorDoc* pDoc = CUnixScriptGeneratorDoc::GetDocument();
ASSERT_VALID(pDoc);

UpdateData(TRUE);

try{
pFTPSite = sess.GetFtpConnection(pDoc->pDefaultCProfile->m_strFTPServerID,
pDoc->pDefaultCProfile->m_strUserID,pDoc->pDefaultCProfile->m_strUserPassword,
(INTERNET_PORT)pDoc->pDefaultCProfile->m_nPortNumber);
if(pFTPSite->SetCurrentDirectory(pDoc->newRunScript.m_strRemotePathToInputFiles)==0){
AfxMessageBox("Could not set current directory on ftp site",MB_ICONEXCLAMATION);
}
if(pFTPSite->Command("ls *.inp > UnixScriptGenTemp", CmdRespNone, FTP_TRANSFER_TYPE_ASCII, 1)==0){
AfxMessageBox("Could not perform ls command on ftp site",MB_ICONEXCLAMATION);
}

}
catch (CInternetException* pEx){
AfxGetApp()->LoadStandardCursor(IDC_ARROW);
pEx->ReportError(MB_ICONEXCLAMATION);
pFTPSite = NULL;
pEx->Delete();
}
delete pFTPSite;
}


btw, I'm running on a Windows 2000 Professional box.