CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    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.

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    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

  3. #3
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    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);

  4. #4
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    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 ??

  5. #5
    Join Date
    Jul 2009
    Location
    India
    Posts
    835

    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
  •  





Click Here to Expand Forum to Full Width

Featured