Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
API calls to OpenFile, WriteFile and CloseFile
Message
De
04/05/1999 08:17:42
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00214883
Message ID:
00214924
Vues:
19
>I need some help in using API calls to OpenFile, WriteFile and CloseFile – declarations and examples of usage, especially to communicate with the modem.

If all you need is low-level file I/O, you have the necessary tools in VFP as native functions; take a look at FOPEN/FCREATE and the related low-level file I/O commands.

If you want to access serial devices, I'd look at using the MSCOMM32.OCX communications control, which provides access to serial ports through an OLE Automation interface. The MSCOMM control documentation shows examples in C and VB; the VB code is fairly easy to port to VFP. The best source of information is the MSDN documentation. I believe there are simple examples of using the MSCOMM control available for download here on UT in the Files section.

If you're going to be accessing a modem, you might do better to use one of the higher-level APIs; for example, TAPI provides high-level telephony capabilities that hide the low-level modem functionality so that you can write applications that will not be tied hard to modem/serial port functionality. If you're using it to connect to the internet, WinSock alleviates the need to know how the connection is made to the internet.
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
Répondre
Fil
Voir

Click here to load this message in the networking platform