Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Sending data directly to COM port without OLE and DOS
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Sending data directly to COM port without OLE and DOS
Miscellaneous
Thread ID:
00288074
Message ID:
00288074
Views:
69
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
Next
Reply
Map
View

Click here to load this message in the networking platform