login about faq

Hi I am very confused. I am using VS2013 MFC MDI application. The progress monitoring does not seem to be fired. I am doing it like this:

CMyFtpTransferZipProgress ftpProgress(&m_wndStatusBar, strTarget); ftp.put_HeartbeatMs(200); ftp.put_EventCallbackObject(&ftpProgress); bOK = ftp.PutFile(strTempFile, strTarget); ftp.put_EventCallbackObject(NULL);

The class used to work in VS2005. I am using 9.5 version libraries. I get no errors. The files get loaded. Even tested with a 100 mb file.


asked May 08 '14 at 14:35

Andrew's gravatar image


edited May 08 '14 at 15:25

Hi !

I see others have had issues in the past with the event callbacks not working. Have you been able to investigate this?

Thank you in advance!


(May 09 '14 at 06:22) Andrew

Andrew, some event callbacks changed in v9.5.0:

C++ event callbacks have been modified to used 64-bit integers where appropriate (CkZipProgress, and others). When using inheritance for event callbacks, such as w/ C++, check to make sure your derived class matches the method signatures that are now 64-bit. One way to ensure that your event callback classes correctly match the base class method signatures is to declare methods using the #define’s found in the Ck*Progress.h headers.

See the online reference documentation, or the Ck*Progress.h headers themselves.

If the methods in your class do not match the methods in the base class, then the methods in the base class are not overridden -- and this would cause the problem.


answered May 09 '14 at 12:47

chilkat's gravatar image

chilkat ♦♦


I have checked the headers and the declaration:


void AbortCheck(bool *abort);\
void PercentDone(int pctDone, bool *abort);\
void ProgressInfo(const wchar_t *name, const wchar_t *value);

I see it is called PercentDone instead of FtpPercentDone and passes int instead of long.

Will try!



answered May 09 '14 at 13:57

Andrew's gravatar image


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: May 08 '14 at 14:35

Seen: 1,947 times

Last updated: May 09 '14 at 15:53

powered by OSQA