Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Sending data directly to COM port without OLE and DOS
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Sending data directly to COM port without OLE and DOS
Divers
Thread ID:
00288074
Message ID:
00288074
Vues:
68
I have a POS printer in COM1 port.
I want to send control codes to it without using OLE or
DOS commands. I read Ed Rauh article in KB about sending data to printer.
I ran the following program according to this article.
However, this sends incorrect data, probably baud rate is wrong. Print test
page works correctly.

Why? How to send control codes to COM1: port directly from VFP?

DECLARE INTEGER CopyFile IN KERNEL32.DLL ;
STRING @SourceFileName, ;
STRING @DestFileName, ;
INTEGER bFailIfExists

? CopyFile( 'C:\AUTOEXEC.BAT', 'COM1:', 1)
Andrus
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform