im using the wininet library to download files from the net--web cam pics to be precise and the problem is, after downloading a pic once i always get the same pic in later trys. seems to have to do with windows internal buffering. while the pic of the webcam obviously changes all the time, the InternetReadFile() only gives me the pic which is already in the buffer.
i've tried to close and reopen the whole session with InternetOpen() and InternetCloseHandle() but same result. only way is restarting the program.
is there any way to clear that damn cache??
At a guess, the webcam is using a streaming protocol, and you need a different API.
AFAIK, InternetReadFile() is for content whose size can be determined in advance.
You could try one of the cache flags in your call to InternetOpenUrl or HttpOpenRequest: INTERNET_FLAG_RELOAD or INTERNET_FLAG_PRAGMA_NOCACHE.
Not true, i use InternetReadFile() to GET streaming video and it works just fine. I believe you want to use
Originally Posted by Salem
INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_PRAGMA_NOCACHE
for streaming content though.
hRequest = HttpOpenRequest( hConnection , NULL , (char *)&szFile , NULL , NULL , (const char **)lpMIME , INTERNET_FLAG_KEEP_CONNECTION | INTERNET_FLAG_PRAGMA_NOCACHE , 0 );