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 code
 

Error
 

 

-1
 

The 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.
 

 

-2
 

The bitmap can not be found. The path and filename are not valid for the BMP Set_Printer message.
 

 

-3
 

The user clicked the Cancel button from the Printer Setup dialog box displayed with the INIT message.
 

 

-4
 

Invalid MSG parameter passed to the Set_Printer function.
 

 

-5
 

The 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.
 

 

-6
 

The ColLen parameter of the HEADER message contains invalid information. The ColLen parameter must contain numerical information.
 

 

-7
 

The user has clicked the Cancel button from the Printing dialog box.
 

 

-8
 

No ColLen information was provided for the TABLE message.
 

 

-9
 

Invalid MSG parameter passed to the Get_Printer function.
 

 

-10
 

Internal error with SendMessage and the OIPI.EXE.
 

 

-11
 

Invalid ColLen information was provided in the HEADER message for the TEXTCOL message.
 

 

-12
 

The 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.
 

 

-13
 

There are no printers defined or no default printer is selected.
 

 

-14
 

Invalid PageSize, PageWidth, or PageHeight for the default printer was specified with the Set_Printer function.
 

 

-15
 

Invalid PaperBin was specified with the Set_Printer function.
 

 

-16
 

Invalid Duplex mode was specified with the Set_Printer function.
 

 

-17
 

The current printer does not support multiple copies.
 

 

-18
 

An error occured saving the report.
 

 

-19
 

The printer does not support changing the orientation.
 

 

-20
 

The printer does not support scaling the output.
 

  • No labels