If the method succeeds, the return value specifies the features
that were previously enabled. If the method fails, it will return
zero. Because it is possible that no features were enabled, a return
value of zero does not always indicate an error. An application
should call GetLastError to determine if an error code has
been set.
The SetFeatures method is used to enable a specific set of
features for the current session. When a client connection is first
established, all features are enabled based on the server type and
the server's response to the FEAT command. However, as the client
issues commands to the server, if the server reports that the command
is unrecognized that feature will automatically be disabled in the
client. To enable or disable a specific feature, an application can
use the EnableFeature method.
For example, the first time an application calls the
GetFileSize method to determine the size of a file, the
library will try to use the SIZE command. If the server reports that
the SIZE command is not available, that feature will be disabled and
the library will not use the command again during the session unless
it is explicitly re-enabled. This is designed to prevent the library
from repeatedly sending invalid commands to a server, which may
result in the server aborting the connection.