# InetFTPSetPassiveMode

int InetFTPSetPassiveMode (int FTPHandle, int passiveMode);

## Purpose

Sets the manner in which the FTP data connection is established. If you turn on passive mode, the FTP client initiates the data connection to the FTP server. If you turn off passive mode, the FTP server initiates the data connection to the FTP client.

You generally need to use passive mode when the FTP client machine is behind a firewall.

Call this function immediately after calling InetFTPLogin or InetFTPLoginEx.

## Parameters

Input
Name | Type | Description
FTPHandle | integer | A handle returned by the InetFTPLogin or InetFTPLoginEx function. The handle identifies an active FTP connection.
passiveMode | integer | Pass a nonzero value to use a passive mode data connection. Pass 0 to use an active mode data connection. You generally need to use passive mode when the FTP client machine is behind a firewall.

## Return Value

Name | Type | Description
result | integer | Return value indicating whether the function was successful. A negative number indicates that an error occurred.