George V. Reilly
2006-03-25 00:06:06 UTC
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)
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
/George V. Reilly Seattle, WA