If the constructor fails to validate the runtime license,
subsequent methods in this class will fail. If the product is
installed with an evaluation license, then the application will only
function on the development system and cannot be redistributed.
The constructor calls the FtpInitialize function
to initialize the library, which dynamically loads other system libraries and
allocates thread local storage. If you are using this class within another
DLL, it is important that you do not create or destroy an instance of
the class from within the DllMain function
because it can result in deadlocks or access violation errors. You
should not declare static or global instances of this class within
another DLL if it is linked with the C runtime library (CRT) because
it will automatically call the constructors and destructors for static
and global C++ objects and has the same restrictions.
The instance of this class is initially attached to the thread which
created it and only the owning thread may invoke methods in that instance.
The ownership of the class instance may be transferred from one thread
to another using the AttachThread method.
To enable any thread to invoke class methods regardless of
ownership, specify the FTP_OPTION_FREETHREAD option when calling the
Connect or ConnectUrl method. It is important to note
this option disables certain internal safety checks which are
performed by the class and may result in unexpected behavior unless
access to the instance is synchronized. If one thread invokes a
method, it must ensure no other thread will invoke another method at
the same time for the same instance.