SendByYMODEM

This function is used to transmit a file by means of the YMODEM/bat protocol. Before this function is called, the OpenYMODEM function must have been called.

SYNTAX

#include "ymodem.h"

short WINAPI _export SendByYMODEM(short iPkt, short nFiles, LPSTR *sPath, BOOL bFullFileName, BOOL bFindSubDir )

short WINAPI _export SendByYMODEMforVB(short iPkt, short nFiles, LPSTR *sPath, BOOL bFullFileName, BOOL bFindSubDir )

INPUT

 

iPkt

Packet size (1024 or other)

nFiles

Number of transmitted files

FileName

Pointer to the transmitted file name array

 

File names must be specified by their full pathnames.

bFullFileName

TRUE: Use, FALSE: Not use

 

Specify whether to use the source-side full pathname as the

 

transmitted file name.

bFindSubDir

TRUE: Use recursive call, FALSE: Not use recursive call

 

When a wild card is used for the transmitted file name, files under

 

the sub-directory can be the objective of the file transmission.

 

If, for example, the transmitted file is D:￿TEST￿*.DAT,

 

a directory, D:￿TEST￿SUB￿TEST.DAT is also included in

 

the objective of transmission.

OUTPUT

 

= 0 Normal termination

= Other Refer to the error code table.

Note:

Into the transmitted file name array store the FAR addresses to the file name character strings.

LPSTR SndFil[ 100 ] = { "c: config.sys", "c: autoexec.bat", 0 };

Whether TRUE or FALSE has been defined in windows.h. If calling this library (DLL) from

￿Visual BASIC, specify True/False as TRUE/FALSE.

If using VB3 as the development language, SendByYMODEM can not be called. This is because VB3 does not permit the DLL to refer to the character string array. To solve this problem a VB3-dedicated function, SendByYMODEMforVB, is provided.

235

Page 235
Image 235
Casio IT-2000W manual SendByYMODEM, Sub-directory can be the objective of the file transmission