xfSend

#include <fte.h>

DWORD WINAPI xfSend(hConnection, lpOpen, lpDescription, lpFiles, lpTag, dwTag, dwFlags)
HCONNECTION
hConnection; /* handle of connection on which to send */
LPCSTR lpOpen; /* pointer to parameter for receiving application */
LPCSTR
lpDescription; /* pointer to friendly description of transfer */
LPCSTR
lpFiles; /* pointer to list of files to transfer */
LPCSTR
lpTag; /* pointer to arbitrary data for receiving application */
DWORD
dwTag; /* number of bytes in tag */
DWORD
dwFlags; /* flag specifying send conditions */

The xfSend function starts a transfer of file(s) on the specified connection.

Parameters

hConnection

Identifies an existing connection on which to send.

lpOpen

Indicates the filename to open after the transfer is complete. This parameter is optional, and if not used, set it to NULL. If XF_MATCHID is specified, the applications conducting the transfer determine the meaning of the string.

lpDescription

The friendly name used to describe a file transfer. For instance, this can be "Budget Update" when transferring multiple files in a budget update. This parameter is optional, and should be set to NULL if not used.

lpFiles

Identifies the file or list of files to send. It contains successive, zero-terminated strings that are the filenames to transfer. The entire list of files ends with an additional zero; that is, two zeros terminate the final filename string. This parameter is optional and should be set to NULL if not used.

lpTag

Contains additional information to send to the receiving application. It can contain arbitrary, binary information for the receiving application to interpret, and it can be sent even if no file is sent. For example, it can convey the paragraph and sentence to where a receiving word processing application moves its cursor when displaying a transferred file.

dwTag

Length of the tag to send, in bytes.

dwFlags

Specifies conditions for the send. It can be any of these values:

Value

Meaning

XF_INCLUDEPATH

Include path names along with filenames. If not specified, only filenames are sent.

XF_WAIT

Wait until the file transfer is complete before returning from the function call. If not specified, return immediately after requesting the transfer.


Return Value

The return value specifies the result of the termination request. It can be any one of the values list in section 2.2.4. File Transfer Errors.

Comments

The xfConnect function must be called to open a connection before calling this function.

Once a connection is open, the xfSend function can be called once to transfer multiple files, or it can be called multiple times and transfer one or more files each time. This versatility is useful if the full list of files to transfer is not known at the time the connection is made.

If the complete list of files is known before making the connection, and if use of the xfConnect function call is not required, the xfConnectAndSend function can be used instead of successive xfConnect, xfSend, and xfDisconnect function calls.

See Also

xfConnect, xfConnectAndSend, xfGetStatusText, xfGetStatusLong