Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
USING rEADCOMM() WINDOWS API FUCNTION TO READ A COMM PORT IN
Message
From
18/11/1996 10:14:09
Nájera Juan Carlos
Diginet de Costa Rica S.A.
San José, Costa Rica
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Title:
USING rEADCOMM() WINDOWS API FUCNTION TO READ A COMM PORT IN
Miscellaneous
Thread ID:
00012614
Message ID:
00012614
Views:
103
Hi,

I'm new to the universal Thread.

I have one problem reading comm ports in fpw26a, i can write but no read, i've tryed with this test program
but, obviously i'm doning it bad.

can any body help me please, i'm in a hurry!,

thanks and best regards.

clear
set library to sys(2004)+"foxtools.fll" additive
opencomm = RegFn("OpenComm", "CII", "I")
readcomm = RegFn("ReadComm", "ICI", "I")
closecomm = RegFn("CloseComm", "I", "I")
com2 = CallFn(opencomm, "COM2:", 128, 128)
set step on
s = ""
x = space(128)
on key label f10 m.siga = .f.
m.siga = .t.
do while m.siga

s=CallFn(readcomm, com2, x, 128)
wait window '' timeout .1
? s, '-', x

enddo
=CallFn(closecomm, com2)
release library sys(2004)+"foxtools.fll"

My e-mail is: jcnajera@icr.co.cr
Reply
Map
View

Click here to load this message in the networking platform