September 1st, 2010, 05:56 AM
I need to use IBindStatusCallback interface with GetBindInfo function to pass the callback to URLDownloadToFile api..
my goal is to downloading original file from server ie: not from cache. thats why i have to use GetBindInfo function of IBindStatusCallback interface. But the code seems to be not working..
And is it necessary to declare all the functions in the IBindStatusCallback inherited class ??..
the code is here
STDMETHODIMP CBindStatusCallback::GetBindInfo (DWORD* pgrfBINDF, BINDINFO* pbindInfo)
*pgrfBINDF = BINDF_GETNEWESTVERSION | BINDF_NOWRITECACHE;
pbindInfo->cbSize = sizeof(BINDINFO);
URLDownloadToFileA (0, dwnUrl, "dwn.dat", 0, &call);
Last edited by hypheni; September 1st, 2010 at 07:59 AM.
September 1st, 2010, 04:38 PM
People say it should look like:
So you never need a callback implemented unless you download with progress.
URLDownloadToFileA (0, dwnUrl, "dwn.dat", BINDF_GETNEWESTVERSION, &call);
September 2nd, 2010, 05:35 AM
Yes just checked with this code but no use. Its downloading the cached file..
URLDownloadToFileA (0, dwnUrl, "dwn.dat", BINDF_GETNEWESTVERSION | BINDF_NOWRITECACHE, 0);
September 2nd, 2010, 05:41 AM
Just found that passing BINDF_GETNEWESTVERSION to URLDownloadToCacheFile() fails to work in this microsoft article.
But the solution stated here is downloading of a IE Sp2, but that could not be the real one. Is there any other solution ??
September 2nd, 2010, 05:47 AM
Okay URLDownloadToCacheFile() working with BINDF_GETNEWESTVERSION but why not the URLDownloadToFile()??
Click Here to Expand Forum to Full Width
This is a CodeGuru survey question.