Click here to Skip to main content
15,888,064 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
In VB6 we can use MsCom object to send outputs (MSComm1.Output ="test") to devices like printers without installing the printer. For that I give COM port number to the com object.(MSComm1.CommPort=1)

But when using the USB printer without installing, how can I give the port number as it is not the COM port.
Posted

1 solution

As you correctly mention, USB is not COM. USB does not use COM port numbers. Therefore there is no way to do what you want.

1) Install the printer driver and use .NET's PrintDocument[^] class.

2) Or, find some product-specific non-standard way to talk to the printer directly using #usblib[^]. You will have to handle usb end points and connections and stuff yourself. I highly recommend the first alternative.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900