The PRJINFO data structure has the following format:
typedef struct _PRJINFO { USHORT uJobId; CHAR szUserName[UNLEN+1]; CHAR pad_1; CHAR szNotifyName[DTLEN+1]; CHAR szDataType[DTLEN+1]; PSZ pszParms; USHORT uPosition; USHORT fsStatus; PSZ pszStatus; ULONG ulSubmitted; ULONG ulSize; PSZ pszComment; } PRJINFO;
where:
parm1=value1 parm2=value2...
Bits 0 through 1 have the symbolic constant PRJ_QS_QUEUED and the value
0. The bit mask isolates the print job queued status bits as follows: ┌──────────┬────────────────────────┬─────────┬────────────────────────────────┐
│ BITS │ SYMBOLIC CONSTANT │ VALUE │ MEANING │
├──────────┼────────────────────────┼─────────┼────────────────────────────────┤
│ 0-1 │ PRJ_QS_QUEUED │ 0 │ Print job is queued. │
├──────────┼────────────────────────┼─────────┼────────────────────────────────┤
│ 0-1 │ PRJ_QS_PAUSED │ 1 │ Print job is paused. │
├──────────┼────────────────────────┼─────────┼────────────────────────────────┤
│ 0-1 │ PRJ_QS_SPOOLING │ 2 │ Print job is spooling. │
├──────────┼────────────────────────┼─────────┼────────────────────────────────┤
│ 0-1 │ PRJ_QS_PRINTING │ 3 │ Print job is printing. │
└──────────┴────────────────────────┴─────────┴────────────────────────────────┘
Bits 2-11 indicate the print job status. Bits 2-11 can be isolated using
the constant PRJ_DEVSTATUS, which has the value of 0xFFC. 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 job was
│
│ │ │ │ deleted. │
└─────┴───────────────────┴──────────┴─────────────────────────────────────────┘