Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending data directly to COM port without OLE and DOS
Message
De
06/11/1999 18:14:59
 
 
À
06/11/1999 16:09:36
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00288074
Message ID:
00288137
Vues:
21
Ed,

>CopyFile() is not byte-oriented, and does nothing as far as setting the port parameters.

Is it possible to set COM1 parameters programmatically using Windows API
and then run CopyFile() ?

> The best solution is to use an ActiveX communications control such as
the MSCOMM32 OCX

I'm using VFP version 5. How I can add MSCOMM to distribution disks
using setup wizard? I haven't find such possibility in VFP 5!

>You can use the DOS MODE command to set the port characteristics and send
stuff to the port using CopyFile() to send COMPLETE FILES to the port,

? CopyFile( 'C:\AUTOEXEC.BAT', 'COM1:', 0)

produces WinAPI error #6 "The handle is invalid." How I can use it?

> or by setting up a generic/text-only printer on the port and using ??? to send
an uninterpreted stream to the serial port.

??? 'hello' causes foxpro error

"Error accessing printer spooler"

How I can use this command?

Settings in Windows 98 control panel:

Print to the following port: COM1: (Communications Port)
Print using the following driver: Generic/text-only
Spool Settings: Print directy to the printer

Tried to change spool settings but error remains the same.
Andrus
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform