>Using VFP6 get error "trouble loading driver" using a HP2100 laser printer. Report prints OK if the HP2100 is the default printer anywhere on the LAN. If is not you get the error. How can this proble be solved? what drivers should I use?
As I remember, the 2100 is one of the WinGDI model printers, correct - it relies on the WinGDI directly to handle its graphic rendering, rather than the printer having its own rendering engine? If this is the case, I think you'll be forced to make it the default Windows printer before accessing it, because the GDI must step in and directly control the output process, regardless of whether the printer belongs to it, or to anther system.
If this is the case, there's a straightforward workaround available to you - the WSH Wscript.Network object for WSH 2.0 and later has a SetDefaultPrinter method available to it that can assign either a remote printer or a local device to the status of the local Windows Default printer. It requires that you have the printer driver explicitly installed on each target workstation that relies on the 2100 so that the workstation has the knowledge of how the GDI must behave to directly drive the printer; it's definitely the case with one other HP printer that runs as a WinGDI printer, the HP 1100. As long as the driver for the 1100 has been installed properly on the local workstation previously, the following code snippet has worked for me to permit access to an 1100 shared via MS Networking through VFP:
oWshNet = CREATEOBJECT('Wscript.Network')
oWshNet.RemovePrinterConnection('LPT3',.t.,.f.)
oWshNet.AddPrinterConnection('LPT3','<i>NetBIOSName\PrintShareName</i>',.f.)
oWshNet.SetDefaultPrinter('LPT3')
There may be other ways of doing this; it's the only one I've found that works with the WinGDI printers inside of VFP directly.