CFtpClient::EnableFeature Method  
 
BOOL EnableFeature(
  DWORD dwFeature,  
  BOOL bEnable  
);

The EnableFeature method enables or disables a specific server feature available to the client.

Parameters

dwFeature
An unsigned integer which specifies the feature to be enabled to disabled for the current client session. Refer to the documentation for the GetFeatures method for a list of available features.
bEnabled
A boolean flag which specifies if the feature should be enabled or disabled. If the value is non-zero, the library will attempt to use that feature on the server. If the value is zero, the feature is disabled. If an application calls a method which requires a specific feature and that feature is disabled, the method will fail with an error indicating the feature is not supported.

Return Value

If the method succeeds, the return value is non-zero. If the method fails, it will return a value of zero. To get extended error information, call the GetLastError method.

Remarks

The EnableFeature method is used to enable or disable a specific feature for the current session. When a client connection is first established, 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. An application can use the EnableFeature method to control what commands will be sent to the server, or re-enable a command that was previously disabled.

Requirements

Minimum Desktop Platform: Windows 7 Service Pack 1
Minimum Server Platform: Windows Server 2008 R2 Service Pack 1
Header File: cstools11.h
Import Library: csftpv11.lib

See Also

GetFeatures, SetFeatures