| Previous | Next |
| ERROR_INVALID_PRIORITY | ERROR_PRINTER_ALREADY_EXISTS |
ERROR_INVALID_PRINTER_NAME
Winspool APIs use printer names for several different targets: a local printer object, a remote printer connection, or a printer exposed by a print server. A string that looks plausible to a user interface is not automatically valid for the API and server context that receives it.
For queue creation, AddPrinter takes the printer name from PRINTER_INFO_2 and creates that object on the server specified separately by pName. Remote administration adds another layer because the request is carried to the print server through the print protocol.
Log the unmodified name
- Record the exact UTF-16 printer name and the server argument before any display-name shortening.
- Distinguish a queue name from a share name, port name, and driver name; these are separate PRINTER_INFO_2 fields.
- If the failure is remote, test enumeration of printers on the same server rather than rewriting the name into a guessed UNC path.
- Compare the failing value with names returned by EnumPrinters or the remote print server.
AddPrinter and PRINTER_INFO_2 requirements · Print Spooler API functions · MS-RPRN overview
Looking for a different code? Search another status or error code.