The IXceedFtpAdviseEvents interface allows you to access the XceedFtp control's custom interface advising capabilities. It is useful in two specific situations:
Your development language does not support, or does not make it easy to handle events through the standard COM event mechanism (connection points).
You wish to optimize your code as much as possible and are willing to spend some extra time in order to reduce the overhead incurred whenever an event is triggered by the Xceed FTP Library.
For the C++ developer, it is usually simpler to implement an interface than to work with ConnectionPoints. VB or Delphi developers that are writing a project which manipulates tens of thousands of files and handles a variety of events might find that it is worth the extra effort to use custom interface advising.
Notes:
VB only supports implementing interfaces for ActiveX EXE or DLL projects, not for standard EXE projects!
The main reason why using custom interface advising is more efficient than the regular event handling mechanism is that the need to call the IDispatch interface's Invoke method is eliminated.
The first step is to write your own implementation of the IXceedFtpEvents interface. Once you have done that, you can then call the two methods provided by the IXceedFtpAdviseEvents interface:
Method | Description |
---|---|
Advise | Call this method to provide your implementation of the IXceedFtpEvents interface to the library. Pass a pointer to your implemented interface and a pointer to a long integer. Upon completion of the method call the long integer will contain a "cookie" value, which you must keep until you are ready to call the Unadvise method. Once you have called the Advise method, your implemented IXceedFtpEvents interface will begin receiving events. Note: the EventFilter property can affect which events are triggered, so you can use it to shut off unneeded events. |
Unadvise | Remove an interface from the library's list of registered event recipients. Provide the "cookie" value that you obtained when you called the Advise method so that the library can determine which implemented interface to remove. |
Declaration | |
---|---|
|