The PRDINFO data structure has the following format:
typedef struct _PRDINFO { CHAR szName[PDLEN+1]; CHAR szUserName[UNLEN+1]; USHORT uJobId; USHORT fsStatus; PSZ pszStatus; USHORT time; } PRDINFO;
where:
Bits 0 and 1 have the symbolic constant PRJ_QS_QUEUED and the value 0. The
bit mask isolates the print job queued status bits as follows: ┌───────┬───────────────────┬──────────┬───────────────────────────────────────┐
│ BIT │ SYMBOLIC CONSTANT │ VALUE │ MEANING │
├───────┼───────────────────┼──────────┼───────────────────────────────────────┤
│ 0-1 │ PRJ_QS_ACTIVE │ 0 │ Print job is processing. │
├───────┼───────────────────┼──────────┼───────────────────────────────────────┤
│ 0-1 │ PRJ_QS_PAUSED │ 1 │ Print job is paused. │
└───────┴───────────────────┴──────────┴───────────────────────────────────────┘
Bits 2 through 11 indicate the print destination status. Bits 2 through
11 can be isolated using the constant PRJ_DEVSTATUS or PRD_DEVSTATUS, which
has the value of 0x0FFC. Bit 15 signals whether an alert indicated that
the print job was deleted. These are the meanings for the individual bits:
┌─────┬───────────────────┬──────────┬─────────────────────────────────────────┐
│ BIT │ SYMBOLIC CONSTANT │ VALUE │ MEANING │
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 2 │ PRJ_COMPLETE │ 0x0004 │ If 1, the print job is complete. │
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 3 │ PRJ_INTERV │ 0x0008 │ If 1, intervention is required. │
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 4 │ PRJ_ERROR │ 0x0010 │ If 1, an error occurred. │
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 5 │ PRJ_DESTOFFLINE │ 0x0020 │ If 1, the print destination is offline.
│
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 6 │ PRJ_DESTPAUSED │ 0x0040 │ If 1, the print destination is paused.
│
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 7 │ PRJ_NOTIFY │ 0x0080 │ If 1, an alert is raised. │
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 8 │ PRJ_DESTNOPAPER │ 0x0100 │ If 1, the print destination is out of
│
│ │ │ │ paper. │
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 9 │ PRJ_DESTFORMCHG │ 0x0200 │ If 1, the printer is waiting for a form
│
│ │ │ │ change. │
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 10 │ PRJ_DESTCRTCHG │ 0x0400 │ If 1, the printer is waiting for a
car- │
│ │ │ │ tridge change. │
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 11 │ PRJ_DESTPENCHG │ 0x0800 │ If 1, the printer is waiting for a
pen │
│ │ │ │ change. │
├─────┼───────────────────┼──────────┼─────────────────────────────────────────┤
│ 15 │ PRJ_DELETED │ 0x8000 │ If 1, an alert indicates the print job
│
│ │ │ │ was deleted. │
└─────┴───────────────────┴──────────┴─────────────────────────────────────────┘