Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to send binary data to lpt1?
Message
From
09/03/1998 10:18:39
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
07/03/1998 13:01:25
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00081203
Message ID:
00083389
Views:
37
>>Well, I missed the beginning of this thread, so I can't find the original content, but as for the thread title...you can send a binary file (such as a pcl file) by using : 'copy lpt1 /b'.
>
>I need two separate command: to cut paper and open cash drawer for
>POS system.
>
>Thus, for each buyer in shop, the DOS window flashes
>two times? It also slows down printing which is already slow!!
>
>If shop owner sees this, it will
>throw my program away immediately!!!!

For calling DOS routines, I use this:

Proc DosCall
Lpara cmdl
* UINT WinExec(
* LPCSTR lpszCmdLine, // address of command line
* UINT fuCmdShow // window style for new application
* )

Declare long WinExec in kernel32.dll string lpszCmdLine, integer fuCmdShow

if type("cmdl")#"C"
cmdl="Echo nothing>nul"
endif

ret=WinExec(@cmdl, 0)
return ret

Now window, nothing, just if it gives you back a number less than 32, it's an error; it usually gives you above 2000 or more, which is OK.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform