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://126.96.36.199/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?