Click here to Skip to main content
15,887,083 members
Please Sign up or sign in to vote.
3.50/5 (2 votes)
See more: (untagged)
Hi,
i am developing Download manager in wpf.So when i run my project that has pause and resume.So during download process going on my application will shut down.my download need to pause.then i restatrt my application it will resume downloading.
Like Torrent downloader.
Thanks,
Prabu
Posted
Comments
Sergey Alexandrovich Kryukov 21-Nov-11 0:20am    
It would be also good to tag your language.
--SA

1 solution

You don't need to do anything special to a currently running process at shutdown to continue downloading of the same file starting from the part of the file which was downloaded before. With HTTP downloads, you can skip part of it and start to download next block appending it to the file with already downloaded data.

You can find out how to use this simple technique if you look at my application HttpDownloader I provided for CodeProject with complete source code, please see how to download a file from internet[^]. (This is C#. Too bad you did not indicate your language.)

—SA
 
Share this answer
 
v2
Comments
Amir Mahfoozi 21-Nov-11 0:26am    
+5'ed
Sergey Alexandrovich Kryukov 21-Nov-11 0:33am    
Thank you, Amir.
--SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900