IBindStatusCallback how to tell not to download from cache
-
Hi all, I am using URLDownloadToFile with IBindStatusCallback i would like the OnProgress to show a real progress the problem is that i see in my output that one of the OnProgress statuses is BINDSTATUS_CACHEFILENAMEAVAILABLE how to tell the interface to d/l the file everytime...i saw in MSDN that i need to set up a flag in the GetBindInfo method...but i need an example code for that thanks in advanced
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
-
Hi all, I am using URLDownloadToFile with IBindStatusCallback i would like the OnProgress to show a real progress the problem is that i see in my output that one of the OnProgress statuses is BINDSTATUS_CACHEFILENAMEAVAILABLE how to tell the interface to d/l the file everytime...i saw in MSDN that i need to set up a flag in the GetBindInfo method...but i need an example code for that thanks in advanced
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
ok i've digging into it i've found out i can use URLDownloadToCacheFile and set the reserved flag to BINDF_GETNEWESTVERSION this works, but now i have a newer problem that when URLDownloadToCacheFile returns the HRESULT says E_OUTOFMEMORY this is the code i use
int nLen = m_sFile.GetLength()* sizeof(TCHAR); HRESULT hr = URLDownloadToCacheFile (NULL,m_sUrl,m_sFile.GetBuffer(nLen),nLen,BINDF_GETNEWESTVERSION,&c);
In MSDN it states that if the result is E_OUTOFMEMORY it means that The buffer length is invalid or there was insufficient memory to complete the operation. what am i doing wrong here? thanks for any replyInterface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
-
ok i've digging into it i've found out i can use URLDownloadToCacheFile and set the reserved flag to BINDF_GETNEWESTVERSION this works, but now i have a newer problem that when URLDownloadToCacheFile returns the HRESULT says E_OUTOFMEMORY this is the code i use
int nLen = m_sFile.GetLength()* sizeof(TCHAR); HRESULT hr = URLDownloadToCacheFile (NULL,m_sUrl,m_sFile.GetBuffer(nLen),nLen,BINDF_GETNEWESTVERSION,&c);
In MSDN it states that if the result is E_OUTOFMEMORY it means that The buffer length is invalid or there was insufficient memory to complete the operation. what am i doing wrong here? thanks for any replyInterface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)
well figured it out... it turns out the 2nd parameter is an out parameter which contains the file that was downloaded and placed in the internet temporary files... so now it works ok thanks myself i guess :)
Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)