if(m_pFtpConnection!=NULL)
{
     if(!m_pFtpConnection->GetFile(fileName,strDestName,FALSE))
     {
MessageBox("下载文件失败","错误信息",MB_OK);
     }
     else
     {
int i=m_pFtpConnection->Remove(fileName);
if(i==0)
{
    int error=::GetLastError();
}
Print();
     }
}
为什么我的这段代码能把文件下载,但不能删除,删除返回值为0,用GetLastError()得到的代码是12003,是什么原因呀。

解决方案 »

  1.   

    PRB: FTP WinInet APIs Report Error 12003
    PSS ID Number: Q168492Article Last Modified on 08-28-1999
    --------------------------------------------------------------------------------
    The information in this article applies to: Microsoft Internet Explorer (Programming) 3.0, 3.01, 3.02, 4.0, 4.01--------------------------------------------------------------------------------
    Symptoms
    Connection to a non-Microsoft FTP server with WinInet FTP APIs may fail with error 12003. Cause
    When connecting to a non-Microsoft FTP server with WinInet APIs, some WinInet FTP APIs may fail with error 12003 (ERROR_INTERNET_EXTENDED_ERROR). The InternetGetLastResponseInfo API may not retrieve any Internet specific information. This error may occur when the FTP server sends an unexpected status code to the WinInet client. Please note that this may not indicate an error, but rather the server's success message or confirmation (such as confirmation of getting a file, sending a directory listing, and so forth). In some cases the WinInet FTP APIs may not parse such messages correctly and erroneously report an error. This may happen when the WinInet FTP APIs are used to connect to certain VAX/VMS FTP servers. Resolution
    The above behavior may be avoided by not using the INTERNET_FLAG_PASSIVE flag in the InternetConnect or InternetOpenUrl API. When this flag is not used WinInet uses active semantics for the FTP connection, which avoids the return of the status code, which causes the parsing problem. References
    See FTP Protocol Specification (RFC 959) for more information. Additional query words: Keywords: kberrmsg kbIE300 kbIE400 kbie401 
    Issue Type: kbprb 
    Technology: kbIEsearch kbAudDeveloper kbSDKIESearch kbSDKIE300 kbSDKIE301 kbSDKIE302 kbSDKIE400 kbSDKIE401