To print a receipt under Linux system I'm using this code:
char *buff
fd = open("/dev/usb/lp0", O_RDWR);
if(!write(fd, buff, len)) return 0;
Ever device under Linux system is a file, we can open it and write data without problem.
My question is about windows system using c++ language.