Admin Production ni-theme
Current Publication

InetFTPSetPassiveMode

LabWindows/CVI

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 int A handle returned by the InetFTPLogin or InetFTPLoginEx function. The handle identifies an active FTP connection.
passiveMode int Specify a nonzero value or select Use Passive Mode in the function panel to use a passive mode data connection.

Specify 0 or select Use Active Mode in the function panel 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 int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

Additional Information

Library: Internet Library

Include file: cvintwrk.h

LabWindows/CVI compatibility: LabWindows/CVI 7.1 and later

Example

Refer to internet\ftpclnt\ftpclnt.cws for an example of using the InetFTPSetPassiveMode function.