WINPRINT-UPDATE-PRINTERS

Usage

CALL "WIN$PRINTER" 
     USING WINPRINT-UPDATE-PRINTERS

Description

This op-code enables you to force the runtime to reload the internal printerlist so that any changes to that list (new printer added, for example) will be detected by the COBOL program.

This op-code takes no parameters and always returns TRUE. By calling this op-code, the runtime printing system is told to reload the printer list. A call to this op-code should be followed by a call to one of the following op-codes to ensure synchronization between the COBOL printer list and the internal runtime:

    78  WINPRINT-GET-NO-PRINTERS            VALUE 13.
    78  WINPRINT-GET-PRINTER-INFO           VALUE 14.
    78  WINPRINT-GET-CURRENT-INFO           VALUE 16.
    78  WINPRINT-GET-PRINTER-INFO-EX        VALUE 28.
    78  WINPRINT-GET-CURRENT-INFO-EX        VALUE 30.
Note: Windows supports two types of printer drivers. One prints multiple copies without application support, and the other requires that the application detect the number of copies requested and do the printing itself. On its own, a driver that requires application support has no way to access the number of copies set in the printer setup. While the runtime does store the information, the calling of WIN$PRINTER with WINPRINT-UPDATE-PRINTERS causes the runtime to delete all printer-related memory and reload all printer information from the driver. Because the printer driver doesn't store the number of copies, that information is lost.