Important:
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.
A version of this page is also available for
4/8/2010

The application establishes an FTP session by calling InternetConnecton a handle created by InternetOpen. InternetConnectneeds the server name, FTP port number, user name, password, and service type, which must be set to INTERNET_SERVICE_FTP. For passive FTP semantics, the application must also set the INTERNET_FLAG_PASSIVE flag.

The INTERNET_DEFAULT_FTP_PORT and INTERNET_INVALID_PORT_NUMBER values can be used for the FTP port number. INTERNET_DEFAULT_FTP_PORT uses the default FTP port, but the service type still must be set. INTERNET_INVALID_PORT_NUMBER uses the default value for the indicated service type.

The values for the user name and password can be set to NULL. If both values are set to NULL, InternetConnectuses anonymous for the user name and the user's e-mail address for the password. If only the password is set to NULL, the user name passed to InternetConnectis used for the user name, and an empty string is used for the password. If neither value is NULL, the user name and password given to InternetConnectare used.

See Also

Concepts

FTP Sessions