Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. IBindStatusCallback how to tell not to download from cache

IBindStatusCallback how to tell not to download from cache

Scheduled Pinned Locked Moved C / C++ / MFC
tutorialcomhelp
3 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • Y Offline
    Y Offline
    YaronNir
    wrote on last edited by
    #1

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

    Y 1 Reply Last reply
    0
    • Y YaronNir

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

      Y Offline
      Y Offline
      YaronNir
      wrote on last edited by
      #2

      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 reply

      Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)

      Y 1 Reply Last reply
      0
      • Y YaronNir

        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 reply

        Interface basics click here : http://www.codeproject.com/com/COMBasics.asp don't forget to vote :)

        Y Offline
        Y Offline
        YaronNir
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups