printing and talking with a serial pos printer, changing the port of a printer 
Author Message
 printing and talking with a serial pos printer, changing the port of a printer

Hi, my name is Andrew and I have the following situation:

I have to print at several different serial printers (a pos solution). The
special sequences for the printers are stored in a database. In fact I only use
Windows printing because of the spooler. ( I print directly like you can see it
in any store when you pay sth (for example a supermarket))

My problem is that I have to 'talk' with the printer too, and get several status
information of the printer. This would be easy since these sequences are also
stored in my database, but I can only talk to the printer via creating a dynamic
MsComm element (then it s easy). To open the the MsComm element the port of the
printer should be changed to - let s say - FILE: - talk with the printer - and
then close the MsComm element, delete it, change the printer's port to COMx: back
again and print via the windows spooler.

How can I achieve this ? Talking to the printers is only possible via special
APIs for each printer (Epson has one, Star too, HP and so on, and of course I
want a general way (which my way would be if it would work)

So the only questions is: How to change a printer's port ?
My tries went into - OpenPrinter - GetPrinter API calls direction, unfortunately
I didnt find any examples neither in msdn itself nor on the platform sdk.
(Another question I dontz understand is how to pass a structure's address to
another structure as necessary with the DEVMODE address in the PRINTER_INFO_2
structure ??)

Thank you for every kind of help !

Anthe



Sun, 09 Nov 2003 05:36:35 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Printing to COM serial Printer without using Printer Control

2. serial POS printer

3. how to change printer-port/printer

4. serial printer on serial port

5. serial printer on serial port

6. Changing Printer Port to Print to a File

7. Macro that selects printer and prints doc also changes default printer

8. printing on POS printers

9. Talking to printer port?

10. How to talk to the printer port

11. print CR report in a pos printer (epson TM L60II)

12. Printing to an POS printer

 

 
Powered by phpBB® Forum Software