0

is there a way to send raw command like esc+something to print or to open cash drawer through lpt port or com port in c# .net , but the printer or cash drawer just plugged in and not installed in that computer(using win xp os) , so there is no printer name as a parameter, just lpt1 or com2 or com2 . Thanks

Thanks

Euro Micelli
  • 33,285
  • 8
  • 51
  • 70
oktober A
  • 1
  • 1
  • You'd better focus a bit on how this is going to work on your customer's machine instead of yours. You wouldn't want to write a bunch of code and then find out it is all junk. Using something like OPOS is pretty common, it already gives you access to printers and cash drawers like that. – Hans Passant Jul 21 '13 at 13:33
  • thanks, i will looking for OPOS , maybe opos is the answer, because i just heard that term for the first time – oktober A Jul 22 '13 at 05:30

1 Answers1

0

You don't have to install a driver for COM or LPT peripheral device if it has a real COM or LPT. You have to have just installed drivers for COM or LPT in your PC. If you have a USB 2 COM adapter, you have to install drivers for it. But as soon as you have a working COM alias like COM1 or COM10, COM11... you can send or recieve characters with no problem if you use a right configuration for transmission.

Check out SerialPort class. For parallel port check out this question.

Community
  • 1
  • 1
nio
  • 5,141
  • 2
  • 24
  • 35