IBindStatusCallback::GetBindInfo
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
Code:
STDMETHODIMP CBindStatusCallback::GetBindInfo (DWORD* pgrfBINDF, BINDINFO* pbindInfo)
{
*pgrfBINDF = BINDF_GETNEWESTVERSION | BINDF_NOWRITECACHE;
pbindInfo->cbSize = sizeof(BINDINFO);
return S_OK;
}
CBindStatusCallback call;
URLDownloadToFileA (0, dwnUrl, "dwn.dat", 0, &call);
Re: IBindStatusCallback::GetBindInfo
People say it should look like:
Code:
URLDownloadToFileA (0, dwnUrl, "dwn.dat", BINDF_GETNEWESTVERSION, &call);
So you never need a callback implemented unless you download with progress.
Re: IBindStatusCallback::GetBindInfo
Yes just checked with this code but no use. Its downloading the cached file..
Code:
URLDownloadToFileA (0, dwnUrl, "dwn.dat", BINDF_GETNEWESTVERSION | BINDF_NOWRITECACHE, 0);
Re: IBindStatusCallback::GetBindInfo
Just found that passing BINDF_GETNEWESTVERSION to URLDownloadToCacheFile() fails to work in this microsoft article.
http://support.microsoft.com/kb/196466
But the solution stated here is downloading of a IE Sp2, but that could not be the real one. Is there any other solution ??
Re: IBindStatusCallback::GetBindInfo
Okay URLDownloadToCacheFile() working with BINDF_GETNEWESTVERSION but why not the URLDownloadToFile()??