I have a file in my web site (URL stored in strURL) that change regularly. I'd like to read it but, after a change, it keeps giving the information in the cache, even with DeleteUrlCacheEntry saying that there is no file in cache !!!
Here is the code (with errors handling removed)
m_hInet = InternetOpen(strAgent, INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0);
m_hConnect = InternetOpenUrl(m_hInet, strURL, NULL, 0, INTERNET_FLAG_RELOAD | INTERNET_FLAG_PRAGMA_NOCACHE, NULL);
I also check the header but it does not return an error (as the file really exist in the web site !!)
BOOL bQueryResult = HttpQueryInfo(m_hConnect, HTTP_QUERY_STATUS_CODE, (LPVOID)szBuffer, &dwSize, NULL);
InternetReadFile(m_hConnect, szBuffer, 512, &dwRead);
What is wrong with this code ???? Compiled with Visual Studio 2015 in Windows 10.
Thanks for your help