• pInData (PVOID) - input

      Points to the value in ulStatusFlags to indicate the type of status to return.

    
      ulStatusFlags (ULONG) - input

        Type of status alerts to return. Values are as follows:

          Bit

            Description
          0
            PRTSTATUS_TYPE_INPUTS - 0x00000001
            Inputs (0=No; 1=Yes)
          1
            PRTSTATUS_TYPE_OUTPUTS - 0x00000002
            Outputs (0=No; 1=Yes)
          2
            PRTSTATUS_TYPE_JAMS - 0x00000004
            Jams (0=No; 1=Yes)
          3
            PRTSTATUS_TYPE_OP_INTERV - 0x00000008
            Operator intervention required (0=No; 1=Yes)
          4
            PRTSTATUS_TYPE_WARNINGS - 0x00000010
            Warnings (0=No; 1=Yes)
          5
            PRTSTATUS_TYPE_SERVICE_REQ - 0x00000020
            Service required (0=No; 1=Yes)
          6
            PRTSTATUS_TYPE_CONFIG_CHANGES - 0x00000040
            Configuration changes (0=No; 1=Yes)
          7
            PRTSTATUS_TYPE_SUPPLIES - 0x00000080
            Supplies (0=No; 1=Yes)
          8
            PRTSTATUS_TYPE_PRINTER_STATS - 0x00000100
            Printer statistics (0=No; 1=Yes)
          9 - 31
            Reserved (set to 0)
          
            *pcbOutData (PVOID) - input/output

              Set to the length of data returned in pOutData, which returns a variable length structure.

            
              pOutData (PVOID) - output

                Returns a list of status fields and their values. The status fields are listed below:

                     BYTE       printerStatus;
                     BYTE       deviceAlerts1;
                     BYTE       deviceAlerts2;
                
                     BYTE       cInputStatus;
                
                     BYTE       InputId;
                     USHORT     InputStatus;
                
                     BYTE       cOutputStatus;
                
                     BYTE       OutputId;
                     USHORT     OutputStatus;
                
                     BYTE       cJamAlerts;
                
                     BYTE       JamLocationCode;
                     BYTE       JamLocationID;
                
                     BYTE       cOperatorAlerts;
                
                     BYTE       OperatorAlertCode;
                     BYTE       lOperatorAlertMsg;
                     CHAR       OperatorAlertMsg[];
                
                     BYTE       cWarningAlerts;
                
                     BYTE       WarningAlertCode;
                     BYTE       lWarningAlertMsg;
                     CHAR       WarningAlertMsg[];
                
                     BYTE       cServiceAlerts;
                
                     BYTE       ServiceAlertCode;
                     BYTE       lServiceAlertMsg;
                     CHAR       ServiceAlertMsg[];
                
                     BYTE       cConfigureAlerts;
                
                     BYTE       ConfigureAlertCode;
                     BYTE       lConfigureAlertMsg;
                     CHAR       ConfigureAlertMsg[];
                
                     BYTE       cSuppliesLevels;
                
                     BYTE       SuppliesLocation;
                     BYTE       SuppliesID;
                     USHORT     SuppliesLevel;
                
                     BYTE       cSuppliesAlerts;
                
                     BYTE       SuppliesAlertCode;
                     BYTE       lSuppliesAlertMsg;
                     CHAR       SuppliesAlertMsg[];
                
                     BYTE       cPrinterStatistics;
                
                     BYTE       PrinterStatisticsCode;
                     ULONG      PrinterStatisticsValue;
                
                

                The specific flags and their values are listed below:

                printerStatus

                  Overall printer status.

                    Bit
                      Description
                    0
                      PRTSTATUS_PROTCNV_HAS_STATUS - 0x01
                      Set if protocol converter can determine printer status. If clear, the remaining bits do not reflect the printer state.
                    1
                      PRTSTATUS_POWER_ON - 0x02
                      Power on initialization (0=No; 1=Yes)
                    2
                      PRTSTATUS_OFFLINE - 0x04
                      Printer offline (0=No; 1=Yes)
                    3
                      PRTSTATUS_PRINTER_BUSY - 0x08
                      Printer temporarily busy (0=No; 1=Yes)
                    4
                      PRTSTATUS_NOT_ACCEPTING_DATA - 0x10
                      Unable to accept print job data (0=No; 1=Yes). If set, the spooler will not send a print job to this printer.
                    5 - 7
                      Reserved
                    deviceAlerts1
                      Active device alerts 1. For each bit set, there is an active alert.
                        Bit
                          Description
                        0
                          PRTSTATUS_DEV1_SUPPLY_ALERT - 0x01
                          Printing supply alert
                        1
                          PRTSTATUS_DEV1_JAM_ALERT - 0x02
                          Paper jam alert
                        2
                          PRTSTATUS_DEV1_OUTPUT_ALERT - 0x04
                          Output alert
                        3
                          PRTSTATUS_DEV1_INPUT_ALERT - 0x08
                          Input alert
                        4 - 7
                          Reserved
                        deviceAlerts2
                          Active device alerts 2. For each bit set, there is an active alert. 0
                            PRTSTATUS_DEV2_CONFIG_ALERT - 0x01
                            Configuration change alert
                          1
                            PRTSTATUS_DEV2_WARNING_ALERT - 0x02
                            Warnings alert
                          2
                            PRTSTATUS_DEV2_SERVICE_ALERT - 0x03
                            Device service-required alert
                          3
                            PRTSTATUS_DEV2_OPERATOR_ALERT - 0x04
                            Operator intervention-required alert
                          4 - 7
                            Reserved
                          cInputStatus
                            Count of input status alerts that follow. This value determines the number of times InputID and InputStatus are repeated. If 0 (zero), these fields are not returned. InputID
                              Input identifier with this alert active.
                            InputStatus
                              Current status of input, as follows:

                                Bit

                                  Description
                                0 - 2
                                  PRTSTATUS_LEVEL_MASK-0x0007
                                  Current input level. All zeros indicate the input bin is empty.
                                3
                                  PRTSTATUS_TRAY_MISSING - 0x0008
                                  Tray missing (0=No; 1=Yes)
                                4
                                  PRTSTATUS_BROKEN - 0x0010
                                  Unavailable/broken (0=No; 1=Yes)
                                5
                                  PRTSTATUS_INOUT_BUSY - 0x0020
                                  Busy/temporarily unavailable (0=No; 1=Yes). Set when tray is allocated to some other process.
                                6 - 14
                                  Reserved.
                                15
                                  PRTSTATUS_ALERT_ACTIVE - 0x8000
                                  Alert active (0=No; 1=Yes)
                                cOutputStatus
                                  Count of output status alerts that follow. This value determines the number of times OutputID and OutputStatus are repeated. If 0 (zer0), these fields are not returned. OutputID
                                    Output identifier with this alert active.
                                  OutputStatus
                                    Current status of output, as follows:

                                      Bit

                                        Description
                                      0 - 2
                                        PRTSTATUS_LEVEL_MASK - 0x0007
                                        Current output level. All zeros (0) indicate the output bin is empty. All ones (1) indicates the output bin is full.
                                      3
                                        PRTSTATUS_TRAY_MISSING - 0x0008
                                        Tray missing (0=No; 1=Yes)
                                      4
                                        PRTSTATUS_BROKEN - 0x0010
                                        Unavailable/broken (0=No; 1=Yes)
                                      5
                                        PRTSTATUS_INOUT_BUSY - 0x0020
                                        Busy/temporarily unavailable (0=No; 1=Yes). Set when tray is allocated to some other process.
                                      6 - 14
                                        Reserved
                                      15
                                        PRTSTATUS_ALERT_ACTIVE - 0x8000
                                        Alert active (0=No; 1=Yes)
                                      cJamAlerts
                                        Count of printing-media-jam status alerts that follow. This value determines the number of times JamLocationCode and JamLocationID are repeated. If zero, these fields are not returned. JamLocationCode
                                          Indicates general location of jam, as follows:

                                            Bit

                                              Description
                                            00
                                              Reserved
                                            01
                                              PRTSTATUS_JAM_CODE_INPUT - 0x01
                                            02
                                              PRTSTATUS_JAM_CODE_OUTPUT - 0x02
                                            03
                                              PRTSTATUS_JAM_CODE_INTERNAL - 0x03
                                            04
                                              PRTSTATUS_JAM_CODE_DUPLEX - 0x04
                                            05
                                              PRTSTATUS_JAM_CODE_EXTERNAL - 0x05
                                            06
                                              PRTSTATUS_JAM_CODE_STACKER - 0x06
                                            07
                                              PRTSTATUS_JAM_CODE_FINISHER - 0x07
                                            08
                                              PRTSTATUS_JAM_CODE_MARKER - 0x08
                                            09
                                              PRTSTATUS_JAM_CODE_LOG_UNIT - 0x09
                                            0A - FD
                                              Reserved
                                            FE
                                              PRTSTATUS_JAM_CODE_OTHER - 0xFE
                                            FF
                                              PRTSTATUS_JAM_CODE_UNKNOWN - 0xFF
                                            JamLocationID
                                              Identification number of jam location. For example, if the jam occurred at an input, this value would be the input ID. A value of hex 'FF' indicates the location cannot be determined.
                                            cOperatorAlerts
                                              Count of operator alert messages that follow. This value determines the number of times OperatorAlertCode, lOperatorAlertMsg, and OperatorAlertMsg are repeated. If zero, these fields are not returned. OperatorAlertCode
                                                Defines the operator intervention reason, as follows:

                                                  Bit

                                                    Description
                                                  00
                                                    Reserved
                                                  01
                                                    PRTSTATUS_OP_COVER_OPEN - 0x01
                                                    Cover or door open or ajar
                                                  02
                                                    PRTSTATUS_OP_WASTE_TONER_FULL - 0x02
                                                    Waste toner box full
                                                  03
                                                    PRTSTATUS_OP_RIBBON_JAM - 0x03
                                                    Print ribbon jam
                                                  04
                                                    PRTSTATUS_OP_WASTE_INK_FULL - 0x04
                                                    Waste ink reservoir full
                                                  05 - FD
                                                    Reserved
                                                  FE
                                                    PRTSTATUS_OP_OTHER - 0xFE
                                                    Other
                                                  FF
                                                    PRTSTATUS_OP_UNKNOWN - 0xFF
                                                    Unknown
                                                  lOperatorAlertMsg
                                                    Length of operator alert message that follows.
                                                  OperatorAlertMsg
                                                    ASCII operator alert message.

                                                    Note: This is not null terminated.

                                                  cWarningAlerts
                                                    Count of warning alert messages that follow. This value determines the number of times WarningAlertCode, lWarningAlertMsg, and WarningAlertMsg are repeated. If zero, these fields are not returned. WarningAlertCode
                                                      Defines type of warning, as follows:

                                                        Bit

                                                          Description
                                                        00
                                                          Reserved
                                                        01
                                                          PRTSTATUS_WARNING_TONER_LOW - 0x01
                                                          Toner supply low
                                                        02
                                                          PRTSTATUS_WARNING_INK_LOW - 0x02
                                                          Supply low
                                                        03
                                                          PRTSTATUS_WARNING_INPUT_LOW - 0x03
                                                          Paper input low
                                                        04
                                                          PRTSTATUS_WARNING_OUTPUT_FULL - 0x04
                                                          Output bin nearly full
                                                        05
                                                          PRTSTATUS_WARNING_COVER_OPEN - 0x05
                                                          Cover or panel open
                                                        06
                                                          PRTSTATUS_WARNING_FUSING_LOW - 0x06
                                                          Fusing supplies low
                                                        07 - FD
                                                          Reserved
                                                        FE
                                                          PRTSTATUS_WARNING_OTHER - 0xFE
                                                          Other
                                                        FF
                                                          PRTSTATUS_WARNING_UNKNOWN - 0xFF
                                                          Unknown.
                                                        lWarningAlertMsg
                                                          Length of warning alert message that follows.
                                                        WarningAlertMsg
                                                          ASCII warning alert message.

                                                          Note: This is not null terminated.

                                                        cServiceAlerts
                                                          Count of device service-required alert messages that follow. ServiceAlertCode
                                                            Defines type-of-service-required alert, as follows:

                                                              Bit

                                                                Description
                                                              00
                                                                Reserved
                                                              01
                                                                PRTSTATUS_SERVICE_HARD_ERROR - 0x01
                                                                Hard error. A hard error indicates an error from which the system cannot recover.
                                                              02
                                                                PRTSTATUS_SERVICE_SOFT_ERROR - 0x02
                                                                Soft error. A soft error indicates an error that was detected and may or may not persist.
                                                              03 - FE
                                                                Reserved
                                                              FF
                                                                PRTSTATUS_SERVICE_UNKNOWN - 0xFF
                                                                Unknown.
                                                              lServiceAlertMsg
                                                                Length of service-required message that follows.
                                                              ServiceAlertMsg
                                                                ASCII service-required alert message.

                                                                Note: This is not null terminated.

                                                              cConfigureAlerts
                                                                Count of configuration-changealertmessagesthatfollow .ThisvaluedeterminesthenumberoftimesConfigureAlertCode ,lConfigureAlertMsgandConfigureAlertMsgarerepeated .Ifzero ,thesefieldsarenotreturned .ConfigureAlertCode
                                                                  Definesthetypeofconfiguration - changealert ,asfollows :

                                                                    Bit

                                                                      Description
                                                                    00
                                                                      Reserved
                                                                    01
                                                                      PRTSTATUS_CONFIG_INT_RES_DEL - 0x01
                                                                      Interpreter-related resources deleted
                                                                    02
                                                                      PRTSTATUS_CONFIG_INT_RES_ADD - 0x02
                                                                      Interpreter-related resources added
                                                                    03
                                                                      PRTSTATUS_CONFIG_TRAY_REMOVED - 0x03
                                                                    04
                                                                      PRTSTATUS_CONFIG_TRAY_INSERTED - 0x04
                                                                    05
                                                                      PRTSTATUS_CONFIG_CART_REMOVED - 0x05
                                                                      Cartridge removed
                                                                    06
                                                                      PRTSTATUS_CONFIG_CART_INSERTED - 0x06
                                                                      Cartridge inserted
                                                                    07
                                                                      PRTSTATUS_CONFIG_MEM_REDUCED - 0x07
                                                                      Installation memory reduced
                                                                    08
                                                                      PRTSTATUS_CONFIG_MEM_ADDED - 0x08
                                                                      Installation memory increased
                                                                    09 - FD
                                                                      Reserved
                                                                    FE
                                                                      PRTSTATUS_CONFIG_OTHER - 0xFE
                                                                      Configuration change. Printer is unable to classify change, but host can determine change by interpreting printer's query response.
                                                                    FF
                                                                      PRTSTATUS_CONFIG_UNKNOWN - 0xFF
                                                                      Unknown
                                                                    lConfigureAlertMsg
                                                                      Length of configuration-change message that follows.
                                                                    ConfigureAlertMsg
                                                                      ASCII configuration-change alert message.

                                                                      Note: This is not null terminated.

                                                                    cSuppliesLevels
                                                                      Count of printing-supplies-level values that follow. This value determines the number of times SuppliesLocation, lSuppliesID, and SuppliesLevel are repeated. If zero, these fields are not returned. SuppliesLevel
                                                                        Defines the current status of printing supplies as follows:

                                                                          Bit

                                                                            Description
                                                                          0 - 2
                                                                            PRTSTATUS_LEVEL_MASK - 0x0007
                                                                            Supplies level. All zeros (0) indicate the printing supply is empty. All ones (1) indicate the supply is full.
                                                                          3 - 14
                                                                            Reserved
                                                                          15
                                                                            PRTSTATUS_ALERT_ACTIVE - 0x8000
                                                                            Alert active (0=No; 1=Yes)
                                                                          SuppliesLocation
                                                                            Specifies the general location of the supply within the printer, as defined by JamLocationCode. A value of hex 'FF' is used if the location cannot be specified.
                                                                          SuppliesID
                                                                            Specifies the ID number of the location of the supply at SuppliesLocation. A value of hex 'FF' is used if an ID does not exist for the supply.
                                                                          cSuppliesAlerts
                                                                            Count of printing-supplies alert messages that follow. This value determines the number of times SuppliesAlertCode, lSuppliesAlertMsg, and SuppliesAlertMsg are repeated. If zero, these fields are not returned. SuppliesAlertCode
                                                                              Defines the type of printing-supplies alert.

                                                                                Bit

                                                                                  Description
                                                                                00
                                                                                  Reserved
                                                                                01
                                                                                  PRTSTATUS_SUPPLY_OUT_OF_TONER - 0x01
                                                                                02
                                                                                  PRTSTATUS_SUPPLY_OUT_OF_INK - 0x02
                                                                                03
                                                                                  PRTSTATUS_SUPPLY_RIBBON_OUT - 0x03
                                                                                04 - FD
                                                                                  Reserved
                                                                                FE
                                                                                  PRTSTATUS_SUPPLY_OTHER - 0xFE
                                                                                FF
                                                                                  PRTSTATUS_SUPPLY_UNKNOWN - 0xFF
                                                                                lSuppliesAlertMsg
                                                                                  Length of printing-supplies message that follows.
                                                                                SuppliesAlertMsg
                                                                                  ASCII printing-supplies alert message.

                                                                                  Note: This is not null terminated.

                                                                                cPrinterStatistics
                                                                                  Count of printer statistics that follow. This value determines the number of times PrinterStatisticsCode and PrinterStatisticsValue are repeated. If zero, these fields are not returned. PrinterStatisticsCode
                                                                                    Defines the type of statistic the printer is reporting, as follows:

                                                                                      Bit

                                                                                        Description
                                                                                      00
                                                                                        Reserved
                                                                                      01
                                                                                        PRTSTATUS_STATS_UNITS_TOTAL - 0x01
                                                                                        Total counter units printed since beginning of printer life
                                                                                      02
                                                                                        PRTSTATUS_STATS_UNITS_POWERON - 0x02
                                                                                        Total counter units printed since printer power on
                                                                                      03
                                                                                        PRTSTATUS_STATS_UNITS_SUPPLIES - 0x03
                                                                                        Total counter units on current printing supplies
                                                                                      04
                                                                                        PRTSTATUS_STATS_HOST_COUNTER - 0x04
                                                                                        Current value of the counter, resetable by the host.
                                                                                      05 - FE
                                                                                        Reserved
                                                                                      FF
                                                                                        PRTSTATUS_STATS_UNKNOWN - 0xFF
                                                                                        Unknown.
                                                                                      PrinterStatisticsValue
                                                                                        The value associated with the previous statistic code. The units associated with this value are defined by BIDI_Q_DEVICE, in the counterUnits field of the PRTDEVCHAR data structure.


                                                                                      [Back: BIDI_Q_STATUS(8015h)]
                                                                                      [Next: Remarks]