L_InetFtpSendFile

#include "ltweb.h"

L_INT EXT_FUNCTION L_InetFtpSendFile(hFtp, pszLocal, pszRemote, uSendAs)

HFTP hFtp;

/* handle to an FTP connection */

L_TCHAR L_FAR *pszLocal;

/* name of the file to send */

L_TCHAR L_FAR *pszRemote;

/* name of the file to create on the FTP server */

L_UINT uSendAs;

/* flag that indicates the conditions under which the transfers occur */

Sends a file on the local system to the specified FTP server for storage.

Parameter

Description

hFtp

Valid HFTP handle to an FTP connection.

pszLocal

Character string that contains the name of the file to send from the local system. This is a NULL-terminated string.

pszRemote

Character string that contains the name of the file to create on the FTP server.

uSendAs

Flag that indicates the conditions under which the transfers occur. Possible values are:

 

Value

Meaning

 

SENDAS_ASCII

Transfers the file as ASCII

 

SENDAS_BINARY

Transfers the file as BINARY

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

Stores a file on the FTP server.

If the file specified in pszRemote already exists, this function will fail.

Required DLLs and Libraries

LTFIL
LTWEB

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application

See Also

Functions:

L_InetFtpGetFile, L_InetFtpRenameFile, L_InetFtpDeleteFile

Topics:

FTP Functions: File Manipulation and Sending Bitmaps Over an FTP Connection

 

How to Program with FTP Functions

Example

For an example, refer to L_InetFtpConnect Example