Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
FOPEN won't open COM-ports?
Message
 
 
À
12/10/2001 10:28:25
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00567588
Message ID:
00567601
Vues:
17
I don't think you can. According to FPD 2.6a help file "Ports cannot be opened with low-level file functions in FoxPro for Windows". You cann us Mscomm Activex instead. See mskb#Q139526 for sample code.

>Hi,
>
>I have tried to open a comport (VFP5, Win98), but I cant' make it work.
>
>I have tried handle = FOPEN(COM1:)
>
>and
> cPort = 'COM1:'
> handle = FOPEN(cPort)
>
>and I have tried with or withour colon, with or without COM1: in brackets or not, as well as adding modus parameter, but of course sometimes I get an error message, but all the time, without exception, the handle returned is -1, indicating no success.
>
>Furthermore, I have yet to find out how I can define the transmission speed (I won't say 'baud rate', since baud per defintion IS a rate...)
>
>Hope somebody can clear this up for me.
>
>Rolf
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform