


This operation code allows you to check the current status of a printer. This can be used to see if a printer is available to perform a print job or not.
Usage
CALL "WIN$PRINTER"
USING WINPRINT-GET-PRINTER-STATUS, WINPRINT-SELECTION
GIVING RESULT
Parameters
WINPRINT-SELECTION Group item defined in "winprint.def" as follows:
01 WINPRINT-SELECTION.
03 WINPRINT-NAME PIC X(80).
03 WINPRINT-PORT PIC X(80).
03 WINPRINT-DRIVER PIC X(80).
03 WINPRINT-DRV-VERSION SIGNED-INT.
03 WINPRINT-NO-OF-PRINTERS SIGNED-SHORT.
88 WPRTERR-NO-PRINTERS VALUE -1.
03 WINPRINT-IS-DEFAULT SIGNED-SHORT.
88 WPRT-IS-NOT-DEFAULT VALUE 0.
88 WPRT-IS-DEFAULT VALUE 1.
03 WINPRINT-COPIES SIGNED-SHORT.
88 WPRT-HAS-NO-COPY VALUE 1.
03 WINPRINT-ORIENTATION SIGNED-SHORT.
88 WPRT-HAS-NO-LANDSCAPE VALUE 0.
88 WPRT-HAS-LANDSCAPE VALUE 1.
03 WINPRINT-QUALITY SIGNED-SHORT.
03 WINPRINT-CURR-ORIENTATION SIGNED-SHORT.
03 WINPRINT-CURR-COPIES SIGNED-SHORT.
Return Values
This operation returns the printer status as defined in the Windows API. A great variety of conditions can affect a single print job and printer status may be the result of a combination of values. This makes it impossible to catalog all possible status settings in "winprint.def." Refer to the Windows API documentation for a description of any status not covered in that file.
Description
This operation may be called any time, whether the printer is open or not. There is no need to reset this function. WINPRINT-SELECTION should be initialized prior to use. WINPRINT-NAME must be set to the name of the desired printer. WINPRINT-NAME passes the printer name as an input variable. Printer settings are not modified by this operation.