login about faq

Hello !

I recently upgraded my CkFtp2 libraries to the latest for Microsoft Visual C++ 2005.

I am using the static libraries in 32bit and 64bit.

I decided to convert from CkFtp2 to CkFtp2W so that I could just pass my CString objects. It was all working wonderfully until I got to my PutFile2 method which uses progress monitoring in my applications status bar area.

Unless I am mistaken, there is no update for this method in the new CkFtp2W class. Can it please be implemented?

I look forward to your help in resolving this matter.

Kind Regards


asked Sep 24 '12 at 15:01

Andrew's gravatar image


The standard way of providing an event callback object for a Chilkat object is via the EventCallbackObject property. For example:

    CkFtpProgress * get_EventCallbackObject(void) const;
    void put_EventCallbackObject(CkFtpProgress * progress);

The only difference between the now-deprecated PutFile2 and PutFile is that PutFile2 includes an extra argument for the event callback object. For example:

    bool PutFile2(const char *localFilename,  const char *remoteFilename, CkFtpProgress &progress);
    bool PutFile(const char *localFilename,  const char *remoteFilename);

Instead of calling PutFile2, your app should instead set the callback object by calling put_EventCallbackObject, and then it may call PutFile.

The deprecated methods having the "Ck*Progress &progress" in the last argument still exist in the non-Unicode classes, but they are no longer publicly documented in the online reference documentation, and they are not included in the Objective-C or Unicode "W" versions of the API's.

In the "W" version of the API, do the same: Set the event callback object by calling put_EventCallbackObject, and then call PutFile. Once the event callback object is set, it applies to all method calls that have event callbacks.


answered Sep 24 '12 at 16:15

chilkat's gravatar image

chilkat ♦♦

edited Sep 24 '12 at 16:17

OK, thanks. But the online documentation reads:

CkFtpProgress *get_EventCallbackObject(void) const;
void put_EventCallbackObject(CkFtpProgress *progress);

To be documented soon...

So, if this progress class is going to be called more frequently, how do I adjust it to just show progress for PutFile actions?

I had it working just for PutFile2 to use. Thanks for clarification!


(Sep 24 '12 at 16:30) Andrew

I'll update the documentation. If you want only the PutFile calls to generate event callbacks, then set the event callback object just prior to calling PutFile, and then just after PutFile, call put_EventCallbackObject(0) to remove callbacks.

(Sep 24 '12 at 18:07) chilkat ♦♦

Thank you very much. I will do what you suggest!

(Sep 25 '12 at 00:09) Andrew
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: Sep 24 '12 at 15:01

Seen: 965 times

Last updated: Sep 25 '12 at 00:09

powered by OSQA