Newsgroups : Microsoft : microsoft.public.inetsdk.programming.wininet : 2006 Mar : FtpFindFirstFile/NextFile returns stale directory listings

www.cryer.info
Managed Newsgroup Archive

FtpFindFirstFile/NextFile returns stale directory listings

Subject:FtpFindFirstFile/NextFile returns stale directory listings
Posted by:"George V. Reilly" (george.v.reil..@gmail.com)
Date:24 Mar 2006 16:06:06

I'm enumerating a directory with FtpFindFirstFile +
InternetFindNextFile. If I directly add a new file to the remote
directory, then re-enumerate it, I see the original files; I do not see
the new file. If I directly remove a file from the remote directory,
then re-enumerate it; again, I still see the original list of files.

I'm guessing that WinInet is maintaining a cache. Am I right? I'm
closing both the hConnect and the hInternet after each directory
enumeration.

hInternet = InternetOpen(.., OPEN_TYPE_DIRECT, ...)
hConnect = InternetConnect(hInternet, ..., FTP_SERVICE,
INTERNET_FLAG_PASSIVE...
hFind = FtpFindFirstFile();
  loop using InternetFindNextFile and GetLastError
InternetCloseHandle(hConnect)
InternetCloseHandle(hInternet)
--
/George V. Reilly  Seattle, WA

Replies:

www.cryer.info
Managed Newsgroup Archive