Example

This is an example of using the DoFlinkForVB function to transmit the "C:￿test￿temp.c"

file on the source side so that it overwrites the "C:￿check￿" directory on the destination side .

/* Code

in VB */

Dim sht

As Integer

Dim hWnd1

As Long

Dim hInst

As Long

ReDim Strz(3) As String

hInst =

GetModuleHandle("flink.exe")

sht = InitFLink(Form1.hWnd, hInst)

Strz(0)

=

"fl"

Strz(1)

=

"/s"

Strz(2)

=

"c: test￿temp.c"

Strz(3)

=

"c:￿check￿"

sht = DoFLinkForVB(4, Strz())

Commands and options specified by the input parameters

The following is a list of commands to be passed to the DoFLink function as parameters. Basically, only one command can be sent at a time. However, any command can be added with the IrDA or RS-232C communication parameters.

 

 

 

 

Command

 

Options that can be specified

 

File transmission

 

 

/S

 

O, R, Q, H, D

 

 

File reception

 

 

/R

 

O, R, Q, H, D

 

 

File append

 

 

/A

 

Q, S, H, D

 

 

File deletion

 

 

/D

 

------------------------------------

 

 

File move

 

 

 

/N

 

-----------------------------------

 

 

Idle start

 

 

 

None

 

-----------------------------------

 

 

IrDA communication setup

 

/L={,,,,,,}

 

-----------------------------------

 

 

RS-232C communication setup

/Y={,,,,,,}

 

-----------------------------------

 

 

Example

 

 

 

 

 

 

 

 

Input￿

parameter setup examples

 

 

 

 

 

 

File transmission

 

 

 

 

 

 

 

int

argc

= 4;

 

 

 

 

 

 

￿char*

argv[] = { “fl”, “/sr”, “c:

src1.dat”, “c:

dstn_dir

” }

File append

 

 

 

 

 

 

 

int

argc

= 4;

 

 

 

 

 

 

char*

argv[] = {“fl”, “/ao”, “c:

src.dat”,

 

 

 

 

 

 

 

 

“c:

dstn_dir

dstn.dat” }

242

Page 242
Image 242
Casio IT-2000W manual Commands and options specified by the input parameters, File transmission, File append