Platform SDK: Network Management

PRINT_OTHER_INFO

The PRINT_OTHER_INFO structure contains information about a print job. The NetAlertRaise and NetAlertRaiseEx functions use the PRINT_OTHER_INFO structure to specify information when a job has finished printing, or when a printer needs intervention.

typedef struct _PRINT_OTHER_INFO {
  DWORD  alrtpr_jobid;
  DWORD  alrtpr_status;
  DWORD  alrtpr_submitted;
  DWORD  alrtpr_size;
}PRINT_OTHER_INFO, *PPRINT_OTHER_INFO, *LPPRINT_OTHER_INFO;

Members

alrtpr_jobid
Specifies the identification number of the print job.
alrtpr_status
Specifies a bit mask describing the status of the print job.

You can obtain the overall status of the job by checking PRJOB_QSTATUS (bits 0 and 1). The following values are possible.
Value Meaning
PRJOB_QS_QUEUED The print job is in the queue waiting to be scheduled.
PRJOB_QS_PAUSED The print job is in the queue, but it has been paused. (When a job is paused, it cannot be scheduled.)
PRJOB_QS_SPOOLING The print job is in the process of being spooled.
PRJOB_QS_PRINTING The job is currently printing.

If the print job is in the PRJOB_QS_PRINTING state, you can check bits 2 through 8 for the device's status (PRJOB_DEVSTATUS). Bit 15 is also meaningful.
Value Meaning Bit
PRJOB_COMPLETE The job has completed printing. 2
PRJOB_INTERV The destination printer requires an operator's intervention. 3
PRJOB_ERROR There is an error at the destination printer. 4
PRJOB_DESTOFFLINE The destination printer is offline. 5
PRJOB_DESTPAUSED The destination printer is paused. 6
PRJOB_NOTIFY A printing alert should be raised. 7
PRJOB_DESTNOPAPER The destination printer is out of paper. 8
PRJOB_DELETED The printing job is being deleted. 15

alrtpr_submitted
Specifies the time at which the print job was submitted. This value is stored as the number of seconds that have elapsed since 00:00:00, January 1, 1970, GMT.
alrtpr_size
Specifies the size, in bytes, of the print job.

Remarks

Additional variable-length data follows the PRINT_OTHER_INFO structure in the alert message buffer. The information is in the form of contiguous null-terminated character strings, as follows.

String Meaning
computername The computer that submitted the print job.
username The user who submitted the print job.
queuename The print queue to which the job was submitted.
destination The printer destination (device) to which the print job was routed.
status The status of the print job.

The calling application must allocate and free the memory for all structures and variable-length data in an alert message buffer.

Requirements

  Windows NT/2000: Requires Windows NT 3.1 or later.
  Windows 95/98: Unsupported.
  Header: Declared in Lmalert.h.

See Also

Network Management Overview, Network Management Structures, Alert Functions, ADMIN_OTHER_INFO, ERRLOG_OTHER_INFO, STD_ALERT, USER_OTHER_INFO, NetAlertRaise, NetAlertRaiseEx