Discussion Locked

USB Printer and VB 3.0 compatibility

0 helpful
7 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I need to know if an application using Visual Basic 3.0 can print to a Universal Serial Bus (USB) printer. What I mean by that is, is USB recognized as a potential printer by the 16-bit VB printer subsystem, or is printing to USB printers only supported via 32-bit applications? Our application will crash with "Illegal Operation" in 16-bit, but in 32-bit (same program, same database, same report, same printer) will print fine. We are trying to find the cause of the printing issue in the 16-bit program. Any good ideas? (NOTE: in your answer, please cite the reference material specifically, if possible, such as a URL).

7 replies

by corey4

The printer name in question was rather short, actually (I think the name was "HP Deskjet 840"). Also, from our 16-bit application, I print to the EXACT same printer, using the EXACT same printer name via LPT1:, and it prints just fine. Only thru USB does it crash in 16-bit. The problem is, I can't find any documentation at Microsoft anywhere that says a VB 3.0 app can or cannot print to a USB printer.

by corey4

I checked into these sites, and they did not have ANY information concerning my question. Inherently, my question is a "spec" type of question. USB Printers were not generally around when VB 3.0 came out, nor with Windows 3.1 (because of course, VB 3.0 apps can run under Windows 3.1). Therefore, this is my question, is the API interface independent or dependent on the hardware interface used for printing? Is this documented ANYWHERE??? In my searches of the web, Microsoft, developers library, techrepublic, and developers web sites, this information cannot be found. If you find it, you'll get the credit.

by tjc

My only suggestion is that may be the problem is in the shared name of the printer. Make sure it is 8 letters or less with no spaces. I know from past experience only that having longer than 8 letters and/or spaces in the shared printer name have caused me problems with my VB programing and when we dropped the 16-bit version of our program they went a way, but for the 16-bit ones we had to make sure our clients didn't have the space in the printer shared name.

by corey4

I am aware of the share name limitation. In this case, I think it was HPDESKJE, so that wasn't the problem. Also, if you reread my problem description, I said that printing DOES work with the 16-bit program IF I print to LPT1 to the same, EXACT LOCAL!!! printer. With the EXACT same printer, SAME share name, same report, same program, it will crash if I use USB. Other users of our software report that they couldn't print to a USB printer either. They use a parallel cable (witht the SAME printer), then it worked just fine.

This discussion is closed to new replies.