[Samba] Printing samba, cups and legacy 16 bit applications

Jim Shanks jim at shanks.cc
Fri Feb 29 15:17:39 GMT 2008

> hello everybody,
> I have come to a dead end.
> I have successfully configured cups and samba to print from windows with
> automated drivers download.
> It works perfectly, but for one little problem, most of the printing here
> in
> my company are reports printed by the ERP software, which has been
> developed
> by ouserlves some 12 years ago in (oohh sucks) Visual basic 3.
> The problem is:
> Every single application prints successfully except apps developed in Vb3.
> I have developed a wonderful test app with amazing 3 lines of code.
> event form load
> cmdialog1.action=5 'opens windows common dialog for choosing printer
> printer.print time 'prints time in the upper left corner of the page
> printer.enddoc 'finishes print job
> end
> the same app built with vb6 prints ok, built with vb3 does not print, and
> what's worse, does not generate any kind of error, the job simply
> disapears.
> worse than that. if i check the "print to file" option of the ps driver,
> save the file with whatever name, copy it to my cups/samba server and
> print
> it with lpr, it prints, either from vb3 or vb6.
> i believe the problem is with the 8.3 filename restriction of vb3 and the
> smbprn.XXXXXX filename of samba spool directory although i`m not certain
> of
> who really creates this file, the app, the windows driver or samba itself.
> i have pcap files of the network from the moment i click the ok button in
> the printing dialog, But i could not make any sense out of them.
> if someone could be of any help!
> tks a lot
> Ciro Souza


It's been quite a while since I had to do this, but if I remember right,
with Windows 2000 and Windows XP clients running most 16 bit applications,
you'll have to "capture" a local LPT port to your network printer in order
to get the application to print.

Run the following at the DOS prompt at the client workstation:

net use LPT2:  \\servername\shared-printer-name

Then from the 16-bit application, print to LPT2


More information about the samba mailing list