Quantcast
Channel: SCN : All Content - PowerBuilder Developer Center
Viewing all articles
Browse latest Browse all 2935

Trying to modernize my take on printing to ports

$
0
0

After all those permission things, cmd anomalies, VirtualStores etc in the 64bit Microsoft OSes, I am trying to get less depended from "traditional recipes".

 

My application among other things, prints fiscal receipts on thermal printers

 

I treat the printouts as follows:

1)I create a text file inside the application folder

2)I append data (lines containing billing, bussines info, payment method infos etc)

3)I close the file

4)I sent the file to the printer or a COM/LPT port like

this:

Choose Case env.ostype

   Case Windows!

       ls_command = 'command.com /c '

   Case WindowsNT!

       ls_command = 'cmd.exe /c '

   Case else

       ls_command = 'cmd.exe /c '

End Choose

//gs_printer can be a network printer, a COM port, an LPT port

ls_command = ls_command + ' copy receipt.asc' + ' ' + gs_printer

       

RunWait(ls_command,0)

 

I want a way to get out of it!

I do not want to be depended by Windows permissions, lazy ITs, OS

new "features", cmd.exe and Runwait.dll peculiarities any more!

 

Any advice for something alternative is welcome guys!

 

Thanx!


Viewing all articles
Browse latest Browse all 2935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>