-
September 1st, 2010, 04:56 AM
#1
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);
Last edited by hypheni; September 1st, 2010 at 06:59 AM.
-
September 1st, 2010, 03:38 PM
#2
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.
Best regards,
Igor
-
September 2nd, 2010, 04:35 AM
#3
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);
-
September 2nd, 2010, 04:41 AM
#4
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 ??
-
September 2nd, 2010, 04:47 AM
#5
Re: IBindStatusCallback::GetBindInfo
Okay URLDownloadToCacheFile() working with BINDF_GETNEWESTVERSION but why not the URLDownloadToFile()??
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|