login about faq

I have an application that downloads a large zip file via FTP and then extracts it to the local machine. I have upgraded a VS2005 project (Chilkat 2.0) to VS2013 (Chilkat 4.5). I have noticed that the ftp OnPercentDone event is not being fired for the ftp2 object. It is firing OK for the zip object. This is my code. In both instances, I am setting the EnableEvents property to True and the ftp2.Connect and the zip.OpenZip methods are returning True. Any ideas as to why the ftp2 OnPercentDone event is not firing?

asked Aug 19 '14 at 08:50

chilkat's gravatar image

chilkat ♦♦

The EnableEvents is no longer needed (and will be removed in a future version), so it's not the problem.

It's likely that the FTP server is not providing any size information in the intermediate reply for the download. Try setting the AutoGetSizeForProgress property = true so that Chilkat explicitly retrieves the remote file size prior to the download (so that it can track percentage completion).


answered Aug 19 '14 at 08:50

chilkat's gravatar image

chilkat ♦♦

Also take a good look at the parameters for your override:

void PercentDone(int pctDone, bool *abort)

I believe some time ago it used to be

void PercentDone(long pctDone, bool *abort)

so you may think you override the method but you are'nt anymore.


answered Aug 19 '14 at 09:01

Gert's gravatar image

Gert ♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: Aug 19 '14 at 08:50

Seen: 2,304 times

Last updated: Aug 19 '14 at 09:01

powered by OSQA