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

    URLDownloadToFile API downloading Older files not updated/latest Files

    Hey,

    I am using URLDownloadToFile API for downloading files from website to which i updated, but this API is retrieving the older files even after i upload a latest version of the file. I used a fake parameters along with the url but in fail.
    szFileName = "C:/somename.zip"
    surl ="http://www.sitename.com/foldername/filename.zip?FakeParam=" & int Where int will change every time when downloading.

    DownloadFileFromNet = URLDownloadToFile(0, sURL, szFileName, 0, 0) = ERROR_SUCCESS

    Please also let me know whether this API works in Windows VISTA Operating System.

    Please help to solve this problem

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: URLDownloadToFile API downloading Older files not updated/latest Files

    It's not going to let you write to a root folder, or even create a root folder. For Vista, create your own folder in \ProgramData (which is hidden by default)

    From there, you can read and write files
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

Tags for this Thread

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