0

I had three printers in my network. All of these three are using self-signed certificate. Only for one printer, I am getting error

GetLastError() – 1797 – Printer Driver Unknown

I had compared the SSL settings of all printers, and all of them are matching.

Same thing I tried using "Start" → "Device and Printers" → "Add a Printer" → "Add a network, wireless or bluetooth" → "The Printer that I wasn't listed" → "Select a shared printer by name" then entered the HTTPS URL which is failing in my case and click Next then it is throwing an error as follows:

Connect to Printer

Windows couldn't connect to the printer. Check the printer name and try again. If this is a network printer, make sure that the printer is turned on, and that the printer address is correct.

Only for this hostname it is failing for remaining all it is passing. Even though I cross checked with the printers settings that are getting installed everything I changed to same as of one's getting installed. I am not able to figure out why only this is failing. If self signed certification is a problem this problem is not happening with other printers.

And one more thing this is how I am using AddPrinter() For your information

PRINTER_INFO_2    pInfo;
HANDLE            hPrinter = NULL;
ZeroMemory(&pInfo, sizeof(PRINTER_INFO_2));
pInfo.pPrinterName      = L"HP H-2310"      
pInfo.pPortName         = L"https://174.24.240.37/ipp"  ;   
pInfo.pDriverName       = L"HP H-2310";     
pInfo.pPrintProcessor   = L"winprint";      
pInfo.pLocation         = L"";
pInfo.pComment          = L"";
pInfo.Attributes        = PRINTER_ATTRIBUTE_NETWORK;
hPrinter                = AddPrinter(NULL, 2, LPBYTE)&pInfo);       
dwError             = GetLastError();

Here it is throwing

1797-"Printer driver unknown"

error for only this Hostname and the printer is not getting installed. Other than this for other Hostname's it is passing.

Any idea what else could have gone wrong?

kostix
  • 1,100
  • 1
  • 7
  • 13
Siva
  • 101
  • One thing is not clear: are you saying that you're attempting to attach several identical (of the same model) printers via IPP to the same Windows host? I mean, unless some error handling in that software stack on Windows is subtly broken (such things do happen, alas), I would interpret the error message literally. Are you sure there indeed is the printer driver named "HP H-2310" (of the matching architecture (x86 vs amd64)) available on the host which is running this failing script? – kostix Dec 11 '14 at 15:06
  • I mean, looking at the tags on your question, it looks like you're inherently sure that the problem lies in the SSL/TLS layer while it truly might be rooted in what the printing subsystem is telling you it is. I mean something like [this](http://arstechnica.com/civis/viewtopic.php?f=17&t=1141834). – kostix Dec 11 '14 at 15:10
  • One more hint just in case: when you connect to a Windows printer exported via CIFS/SMB (that is, available as a "shared printer" on the serving computer), the Windows stack automatically fetches and installs the drivers for that printer from the serving machine. This is completely transparent to the user (until it breaks or the drivers are buggy or there's no version of the drivers for target architecture available on the server etc). – kostix Dec 11 '14 at 16:27
  • ...so it could happen that someone had connected to some of these printers using CIFS on those client machines on which connecting via IPP went well, and so *these boxes got the necessary drivers installed,* but on the failing host no such connection was ever made, hence it has no drivers and so the attempt to connect via IPP fails. Just a guess but may be it will give you some food for thought. – kostix Dec 11 '14 at 16:29

0 Answers0