Xceed FTP Library Documentation
IXceedFtpAdviseEvents interface
XceedFtp control reference > Optional objects and interfaces > IXceedFtpAdviseEvents interface

VB example

The IXceedFtpAdviseEvents interface allows you to access the XceedFtp control's custom interface advising capabilities. It is useful in two specific situations:

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:

How to use the IXceedFtpAdviseEvents interface

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  

HRESULT Advise( [in] IXceedFtpEvents* piEvents, [out] long* plCookie ); 

HRESULT Unadvise( [in] long lCookie );