Skip to main content

Error 9 with spacey printer name in PC_PRINTER routines

  • February 15, 2013
  • 0 replies
  • 0 views

Problem:

Net Express 3.1

When using the PC_PRINTER_OPEN or PC_PRINTER_DEFAULT routines, it has been found that using a printer name with spaces in it i.e HP Laser, causes an error 9.

Other than remove the space - is there anything else I can do?

Resolution:

Put the printer name in quotes, and add a NULL terminator, for example:

move "spacey printer name" & x"00" to l-printer.

Old KB# 4286