我用CFtpConnection类的Remove方法时总是返回12003错误,这是什么原因啊?

解决方案 »

  1.   

    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. 
      

  2.   

    我连接的是微软的FTP服务器,并且没有使用INTERNET_FLAG_PASSIVE这个标志。