PDA

View Full Version : Printing via USB port



Unregistered
10-20-2001, 02:12 PM
How do you send information to a printer connected via the USB port using C. I have tried
prn_ptr=fopen("LPT1","wt")
and
prn_ptr=fopen("PRN","wt")
but these don't work,( Because they're the parallel port?) , but they don't return a null either.
This is beginning to drive me crazy so any help would be VERY appreciated!
Thanks

VirtualAce
10-31-2001, 03:29 PM
I'm not positive but I think you can only acces USB ports through Windows and not DOS. This is an assumption on my part, given that you could not do this in Windows 95.

But, in programming, there is always a way (not to steal a member's slogan). Check www.programmersheaven.com.

The V.
10-31-2001, 04:19 PM
To access USB in DOS, you'd need to write your own drivers, probably. It is obviously possible, but it may take a lot of work (and a lot of assembly language) to access a USB port in DOS.

And, you can almost certainly only use it in true DOS, not DOS or emulated DOS running under Windows.