Hello,
I'm trying to write a function that connect to an FTP sever via a proxy.
I use the following code :
lgSession = InternetOpen("FTP connection", INTERNET_OPEN_TYPE_PROXY,
proxyname, vbNullString, 0)
If lgSession Then
lgInternet = InternetOpenUrl (lgSession,
"ftp://servername/filename.doc", vbNullString, 0,
INTERNET_FLAG_NO_CACHE_WRITE, 0)
If lgInternet Then
Do
inRes = InternetReadFile(lgInternet, stBuf, 1024, lgRet)
Loop While (lgRet <> 0)
End If
inRes = InternetCloseHandle(lgInternet)
But, i have always variable "inRes" equal to zero.
When I use explorer with ftp://servername/filename.doc, the file is
downloaded correctly, but when using the code, no success to read the file.
Anybody know the problem.
Many thanks!!