Printing to something besides LPT1 in GW Basic

1.7k views Asked by At

I have a piece of software written in GWBASIC that currently is set up to just print locally to LPT1. It's been requested to have this piece of software instead print to some network printer.

I have no experience with GWBASIC (but some experience with other BASIC dialects), but I'm thinking I might be able to spoof a network printer as LPT1, so the GW application can stay the same and I just have to write the external piece.

How might this be accomplished (preferrably in C#)?

Or, better still, how can do a print job to a non local printer in GWBASIC?

1

There are 1 answers

0
kmarks2 On

I was looking for some way to do this in GWBASIC, but instead the following will be done:

  • the GWBASIC app will write a text file instead of writing to LPT1
  • the GWBASIC app will then use the SHELL command to invoke a C# application that can do a network print job, and it will take as its argument the text file constructed in the previous step