There are no modern printers that do printing over COM port, even most older printers use SPP or EPP parallel (Centronics) ports. The only COM printers I recall were of "terminal" types, with daisy-type heads, or IBM typewriters, 40-some years ago. Maybe some POS thermal receipt printers still use this interface though.
So, if you say it "prints on a COM port", it means likely a very simple ASCII character stream, strings/lines terminated with CR-LF characters. While all USB-based bitmap printers use some high-level language (PCL or PostScript) to control the printer. Even if you map your output to virtual COM/USB port, the resulting data stream will be the ASCII-CR-LF, and no USB printers can understand this.
What you likely can do is to hook-up your COM output somehow virtually to a Windows "terminal" application, and then use the generated bitmap as an image to print (including printers with USB interface). This looks ugly, but the COM-port printing is a blast from deep past.
Have you looked at USB to Serial Port adapters? Have used them in past with good results Something like this from Startech https://www.startech.com/ca/Cards-Adapters/Serial-Cards-Adapters/Professional-USB-to-RS-232-Serial-Adapter~ICUSB2321X Believe they have resellers in many countries
– Dave M – 2018-07-03T16:27:03.960I need USB for printing. I can't use adapters. I am looking for a software solution – Daniele – 2018-07-03T16:30:08.057
2Not happening. If it requires a serial port then it probably needs low-level hardware access. It can't get this from a network share. – Ignacio Vazquez-Abrams – 2018-07-03T16:39:49.570
did you look for
– phuclv – 2018-07-03T17:02:33.290system error 67
? it means The network name cannot be found, https://serverfault.com/q/663724/343888, https://stackoverflow.com/q/39856389/995714Are you using the correct sharename? And why use COM66? I'm not sure whether that is allowed in Windows – hdhondt – 2018-07-04T06:14:23.457
@hdhondt tried different COM numbers, it was just an example – Daniele – 2018-07-04T07:20:24.937
1In that case something must be wrong with the server_name or printer share_name you used. Note you need to use the share_name, not the printer_name. – hdhondt – 2018-07-04T23:09:45.383