Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FOPEN() on COM port under DOS
Message
De
11/04/1998 15:54:30
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Titre:
FOPEN() on COM port under DOS
Divers
Thread ID:
00091336
Message ID:
00091336
Vues:
93
Hi everybody!

I have to communicate under DOS on comports!!
So, I have the old FOX2.6DOS, but i never used this features. The two machines are installed correctly, I tested the phisical connection with Norton Commander, and the connection was good.
I used the following program schema to send a character string over the cable: (simplified)
Sender:
m.string="anything"
m.handle=fopen("COM2",12)
if (m.handle)>-1
m.count=fwrite(m.handle,m.string)
=fclose(m.handle)
endif

Acceptor:
m.handle=fopen("COM2",12)
if (m.handle)>-1
m.string=fread(m.handle)
=fclose(m.handle)
endif

I started the acceptor program first on the other machine. The port openings are always succesfull, the handle numbers are always positive. But on the sender machine at the fwrite() row, a system write error occurs, stating : Errror writing the port COM2
I issued the Mode Com2 9600,N,8,1 also all the two machines, but nothing changes.

Can someone help me?

TIA

BB
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform