Hitachi

JP1 Version 12 for Windows Systems JP1/File Transmission Server/FTP Description, Reference and Operator's Guide


fts_ftp_asyn_request_ex() - register transmission requests (asynchronous)

Organization of this page

Format

#include <winsock2.h>
#include <apihead.h>
 
BOOL  fts_ftp_asyn_request_ex( SOCKET sock,
                     const char *cardname,
                     FTS_FTP_API_DATA_EX *data,
                     unsigned long *trno,
                     int get_return_flag )

Function

This function registers a transmission request to JP1/FTP, but does not wait for the transmission to terminate. You must use fts_ftp_event_ex()to obtain the termination result. You can define the transmission request by specifying a transmission information structure or the name of a registered transmission card. You can determine whether the transmission was successful by checking the trans_status member of the transmission-end information structure that is obtained by fts_ftp_event_ex().

Arguments

sock

Specifies the return value of fts_ftp_open_ex().

cardname

Specifies the name of a registered transmission card. The file transmission request is registered in accordance with the information on the transmission card.

data

Specifies the address of a transmission information structure.

If NULL is specified in cardname, the file transmission request is registered according to the information specified in data.

If the name of a registered transmission card is specified in cardname, the information on the transmission card is registered.

trno

Specifies the address at which the transmission number is stored.

This matches the transmission number in the transmission-end information that is obtained from log information or by fts_ftp_event_ex().

get_return_flag

If you have specified FTS_GET_RETURN, you can obtain the transmission-end information by calling fts_ftp_event_ex().

If you have specified FTS_UNGET_RETURN, the transmission-end information cannot be obtained.

Notes

Return values

TRUE

Normal

FALSE

Abnormal.

Registration of transmission request failed.

To obtain extended error information, call the WSAGetLastError function. The table below lists and describes the return values for the extended error information. For details about other errors, see the MSDN documentation.

Return value of extended error information

(hexadecimal, decimal)

Description

Can be retried?

FTS_API_ERROR_NOTSTARTUP

(0x2FFFFF00, 805306112)

WSAStartup() has not been called.

No

FTS_API_ERROR_DISCONNECT

(0x2FFFFF05, 805306117)

A connection with the JP1/File Transmission Server/FTP Client service was released. To register the transmission request again, you must issue fts_ftp_close() and start the process over from fts_ftp_open_ex().

No

FTS_API_ERROR_NOTREADCARD

(0x2FFFFF06, 805306118)

The specified card name cannot be referenced.

The card might not have been registered correctly.

No

FTS_API_ERROR_BADFORMAT

(0x2FFFFF07, 805306119)

An address with an invalid data type was specified in an argument.

No

FTS_API_ERROR_MAXPALTRANS

(0x2FFFFF08, 805306120)

The maximum number of concurrent transmissions has been reached.

Register the transmission request after another transmission is finished.

Yes

FTS_API_ERROR_MEMORY

(0x2FFFFF0B, 805306123)

Memory allocation failed.

No

FTS_API_ERROR_NOTSOCK

(0x2FFFFF0D, 805306125)

The return value of fts_ftp_open_ex() might not have been set in the first argument.

No

FTS_API_ERROR_FTSMISS

(0x2FFFFF0E, 805306126)

An error occurred in the JP1/File Transmission Server/FTP Client service.

No

FTS_API_ERROR_LOGIC

(0x2FFFFF10, 805306128)

A logical conflict error occurred in API.

No