我在用internetconnect时,指定了端口,发现如果端口不是21(能顺利连接),再用ftpfindfirstfile时就会没有响应,不知为何?
ftpfindfirstfile调用如下:
lFind = FtpFindFirstFile(mlConnection, sFilter, pData, 0, 0)
ftpfindfirstfile调用如下:
lFind = FtpFindFirstFile(mlConnection, sFilter, pData, 0, 0)
难道我参数给错了?谁能给我详细解释一下参数,特别是后两个的用法?
实时错误'12002'
Error looking at directory "\*.*"如果是21端口就没这个问题
12002:A handler was not defined by the filter for this operation. ERROR_FLT_NO_HANDLER_DEFINED
12003:A context is already defined for this object. ERROR_FLT_CONTEXT_ALREADY_DEFINED
就是不知怎么解决?
INTERNET_DEFAULT_FTP_PORT或者INTERNET_INVALID_PORT_NUMBER
mlConnection = InternetConnect(mlINetHandle, msHostAddress, msPort, _
msUser, msPassword, INTERNET_SERVICE_FTP, 0, 0)
msPort是从外部设置的
在本机测试时没问题,但到了internet就不行了,是否跟服务器端设置有关呢?
Fantasy来猜猜看哪里错?明天结帖~~~
至于为何21端口都没问题,我就不知道了~~~