 |
|
 |
Being inspired by your code I built an online version of how to Download a file from a URL using C# for image manipulation. I did not use the ::URLDownloadToCacheFile() or ::URLDownloadToFile() functions. But your idea is a powerful one. My version of this article can be viewed at http://docx.us/.
modified 28 Mar '12.
|
|
|
|
 |
|
|
 |
|
 |
Instead of implementing a whole dialog box a simple download class in a seperated unit could have been better, cos its confusing what happens.
|
|
|
|
 |
|
 |
How can I delete the file after it is downloaded using code?
Thanks
Rob
|
|
|
|
 |
|
 |
::DeleteUrlCacheEntry() for a cached file
or CFile::Remove() / ::DeleteFile() for a regular file
|
|
|
|
 |
|
 |
::DeleteUrlCacheEntry(pDownloadParam->strURL);
Worked great thanks
R
|
|
|
|
 |
|
 |
Hi all!
I can't resume when i try to download this url: http://netcafe7.24h.com.vn/gamesonline/fifaonline2_install_151109.zip (must be start at beginning)
but with this link ftp://dlfptsg.ge.gate.vn/vGE_2.9.1.95794-7.bin, it's ok.
Please help me!
|
|
|
|
 |
|
 |
Hello. This example is just what i have been looking for, however i need to be able to change the directory where the file is saved. Is there a variable somewhere that i can change to save the file to say the "C" Drive somewhere?
Thanks,
Adam
|
|
|
|
 |
|
 |
As my article mentions, use the ::URLDownloadToFile() function instead which allows you to specify the full path name.
|
|
|
|
 |
|
 |
Do you know how to block IE generate temporary files?
|
|
|
|
 |
|
 |
A Chinese VC++ programmer
|
|
|
|
 |
|
 |
Hi,
Is there away to have a pause and resume download with UrlDownloadtoCacheFile, lets say I am downloading a zip file thats 500mb then i am disconnected to the internet i stopped at 200mb can i resume to that point? Or how can i resume to that point without the use of MFC?
|
|
|
|
 |
|
 |
UrlDownloadtoCacheFile() doesn't support pause and resume.
|
|
|
|
 |
|
 |
I am using URLDownloadToCacheFile to download the url.
It is working fine and it is also showing progress bar very properly.
But I want to perform this process asynchronously. URLDownloadToCacheFile function should return immediately and should execute following statement. Following statement may be another call to URLDownloadToCacheFile function to start another file for download. I want to download multiple files at a time (like multithreading)
To do so :-
- I tried handling pbindinfo parameter in GetBindInfo.
- I set grfBINDF = BINDF_ASYNCHRONOUS
- I passed BINDF_ASYNCHRONOUS argument to URLDownloadToCacheFile function.
And much more. Nothing works.
Can anyone please provide me some source code (in Visual Basic 6 or any other development language) that downloads url asynchronously ?
Thanks in advance.
Amit Joshi
|
|
|
|
 |
|
 |
As I mentioned in the article, the URLDownloadToCacheFile() function is a blocking function. To do what you want, you need to create a worker thread, which is exactly what my sample demonstrates.
|
|
|
|
 |
|
 |
how to convert powerpoint file to flash file using mfc
|
|
|
|
 |
|
 |
Is there any way to open your Downloader.exe with a commandline containing the URL I want to Download from - Appreciate your help#
Rhett Cawood
|
|
|
|
 |
|
 |
You will have to make some changes. It should be easy to do. Instead of getting the URL from the edit box, get it from the command line.
|
|
|
|
 |
|
 |
I have never programed in C however Am over last few days trying to pick up basics - Please could you give me idea in your code as to where to pick up that you apply the edit box text as the url and where the command line [VBDemo.exe / "http://www.exampleurl.com/test.zip"] would be picked up?
Rhett Cawood
|
|
|
|
 |
|
 |
Is there any way you could create a sample of this URL Downloader to be used in an Access Module
Rhett Cawood
|
|
|
|
 |
|
 |
Sorry, I have never used VB.
|
|
|
|
 |
|
 |
Hello, i tried your sample on my computer and it do not work. I use visual styudio 2003 on windows XP. I tried with several URLs, but it never worked.
This is a print screen of the error:
http://img452.imageshack.us/img452/7845/printscreen19it.th.jpg
This is hr value after the call of URLDownloadToCacheFile() function:
hr: 0x800401e4 Syntaxe incorrecte (incorrect syntax)
Thanks for help
|
|
|
|
 |
|
 |
I have code working using the URLDownloadToCacheFile method, but it seems to fail (with the super informative E_FAIL code) when I give it the URL of any site that requires basic authentication Integrated and Anonymous seem to work fine. I didn't see any UI for passing credentials so I assumed it would either prompt me or use the cached browser credentials.
Is anyone else here using this against a site that requires a login?
|
|
|
|
 |
|
 |
Weather check status system connect to the internet or not, is yes duration of connected times.
|
|
|
|
 |
|
 |
URLDownloadToFile function is very simple to use without handling progress information, but althouth it's working on my home connection, it doesn't go thru proxy in my office. Which functions should I call first to set proxy adress and user authentication ?
|
|
|
|
 |