An application must register this callback function by passing its
address to the Start method. It is used by the queue manager to
notify the application when file transfers have started and completed.
The FtpEventProc function is a placeholder for the application-defined
function name.
When the callback function is invoked, it will execute in the context
of the worker thread that is managing the queue. You must ensure that any
access to global or static variables are synchronized, otherwise the results
may be unpredictable. It is recommended that you do not declare any static
variables within the callback function itself, and you should avoid
calling any functions which could cause the thread to block. For
example, you should not attempt to establish other network connections
from within the event handler.
If your application has a graphical user interface, you should never
attempt to directly modify a UI control from within the callback
function. Controls should only be modified by the same UI thread that created
their window. One common approach to resolve this issue is to post a
user-defined message to the main window to signal that the user
interface needs to be updated. The message handler would then process
the user-defined message and update the user interface as needed.