Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Can VFP contact with serial port or com port ? How ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00180560
Message ID:
00219345
Vues:
15
I know this is a blast from the past, but I found this thread doing a search for using FOPEN() to open a com port. I did not really want to go to a special control just to send a chr(255) to the com port to kick open a cash drawer. THe problem I see with FOPEN("com1", x) where I have tried all 6 of the possible values of x shown in the VFP help is that I get a return value of -1 [failed] and the error invalid offseek error or some such.

However, a DISP STAT shows a positive integer handle. If I issue a FCLOSE(nHandle), I get a return value of .T. and the port is closed. I do know the FOPEN() actually worked because I issued that on my internal modem's com port then tried to connect to my ISP. I got an error that the modem was in use. I went back to VFP and issued the FCLOSE() and the modem became functional again.

I guesss I will try to tackle this gnat of a problem with an elephant rifle (ActiveX). :(

>Erik,
>The Help DOES say "you can access the file or communication port" but other threads have said that you can't access the comm ports under windows with FOpen(). Personally I'll trust UT messages before the VFP Help :-)
>
>Barbara
>
>>I only know this from VFP help, so you may very well be right, and the documentation wrong.
Mark McCasland
Midlothian, TX USA
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform