Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing data to lpt port using CreateFile(), is it possi
Message
From
17/04/1998 16:35:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
17/04/1998 14:20:08
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00092263
Message ID:
00093047
Views:
36
>>Hi Andrus,
>>If you're trying to print plain ASCII such as .prg or .txt you could use :
>>
>>set headings off
>>set console off
>>type myfile.ext to printer [prompt]
>>set console on
>
>Cetin,
>
>type replaces non-printable characters.
>How to send pure binary data dynamically (after each key pressed from keyboard) to lpt port? Converting each keypress to file and send this through DOS is too slow. "???" command seems not to work always. For com, i found opencomm()/writecomm(). Are such things available to lpt also?
I didn't do it in VFP.

??? work but spooling is problem. ie:
set print on
??? chr(27)+chr(69)+chr(27)+chr(38)+chr(108)+chr(49)+chr(79)+"Hello there"+chr(27)+chr(38)+chr(114)+chr(49)+chr(70)+chr(12)
set print off
Would print "Hello there" reversed landscape (HP LJ) but ending codes are missing. Spooler is problem. With correct codes it should print (maybe setting to a generic printer).
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform