When the Set_Printer function returns a value that is less than 0, then a printer error has occurred. Here is a list of the error codes that are returned by the Set_Printer function.

Return codeError
-1The INIT message failed because OIPI could not start a new printing session. This error can occur if another printing session has not terminated or if GPF errors occur.
-2The bitmap can not be found. The path and filename are not valid for the BMP Set_Printer message.
-3The user clicked the Cancel button from the Printer Setup dialog box displayed with the INIT message.
-4Invalid MSG parameter passed to the Set_Printer function.
-5The INIT message failed because the OIPI.EXE or support files could not be found. The OIPI.EXE and support files should be located in the OpenInsight directory. See the OpenInsight Modifications for more details on the support files that are required by OIPI.
-6The ColLen parameter of the HEADER message contains invalid information. The ColLen parameter must contain numerical information.
-7The user has clicked the Cancel button from the Printing dialog box.
-8No ColLen information was provided for the TABLE message.
-9Invalid MSG parameter passed to the Get_Printer function.
-10Internal error with SendMessage and the OIPI.EXE.
-11Invalid ColLen information was provided in the HEADER message for the TEXTCOL message.
-12The Width or Height that was specified in the INIT message was too large. The Width and Height must be smaller than the page size specified in the Printer Setup dialog. The print job will continue with the default page size.
-13There are no printers defined or no default printer is selected.
-14Invalid PageSize, PageWidth, or PageHeight for the default printer was specified with the Set_Printer function.
-15Invalid PaperBin was specified with the Set_Printer function.
-16Invalid Duplex mode was specified with the Set_Printer function.
-17The current printer does not support multiple copies.
-18An error occured saving the report.
-19The printer does not support changing the orientation.
-20The printer does not support scaling the output.
  • No labels