Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
COM port
Message
De
13/10/2000 20:54:57
 
 
À
13/10/2000 19:02:53
Information générale
Forum:
Visual FoxPro
Catégorie:
FoxPro 2.x
Titre:
Divers
Thread ID:
00429440
Message ID:
00429457
Vues:
12
>Does anione know how to read from COM port ?
>I'm desperat trying with fopen(), fread(), but no results !!!
>

If this is FPDOS, the low-level file functions worked; you had to rely on the DOS MODE command to set the baud rate, bit masking, and any handshaking such as XON/XOFF or RTS/CTS. The functionality is there, but very minimal, and in all likelihood will not work reliably under NT or Win2K, which limit direct access to ports from a DOS session more severely than Win9x.

FPW and VFP did not handle the COM ports via low-level I/O; you needed a third-party add-on. VFP works with the MSCOMM32.OCX ActiveX control; the docs are available in the MSDN Library (also available online at msdn.microsoft.com) but the examples are in VB. There are samples in the Files Section and FAQ here on UT that demonstrate the use of the MSCOMM32 ActiveX control.

In most cases, you're better off using one of the third-party commercial packages such as CommTools; they are well worth the cost of the package, especially if you need things like file transfer and detailed protocol handling, since none of the low-level tools implement any view of the port as anything but a stream of bytes; no files, no inherent modem handling, etc. You can find CommTools and similar commercial products for FP/VFP at www.hallogram.com or www.componentsource.com
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform