PRINT_OTHER_INFO structure (lmalert.h)

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.

Syntax

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

Type: DWORD

The identification number of the print job.

alrtpr_status

Type: DWORD

A bitmask describing the status of the print job.

You can obtain the overall status of the job by checking PRJOB_QSTATUS (bits 0 and 1).

Possible values for the print job status are listed in the Lmalert.h header file.

Value Meaning
PRJOB_QS_QUEUED
0
The print job is in the queue waiting to be scheduled.
PRJOB_QS_PAUSED
1
The print job is in the queue, but it has been paused. (When a job is paused, it cannot be scheduled.)
PRJOB_QS_SPOOLING
2
The print job is in the process of being spooled.
PRJOB_QS_PRINTING
3
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.

Possible values for the device's status are listed in the Lmalert.h header file.

Value Meaning
PRJOB_COMPLETE
0x4
The job has completed printing.
PRJOB_INTERV
0x8
The destination printer requires an operator's intervention.
PRJOB_ERROR
0x10
There is an error at the destination printer.
PRJOB_DESTOFFLINE
0x20
The destination printer is offline.
PRJOB_DESTPAUSED
0x40
The destination printer is paused.
PRJOB_NOTIFY
0x80
A printing alert should be raised.
PRJOB_DESTNOPAPER
0x100
The destination printer is out of paper.
PRJOB_DELETED
0x8000
The printing job is being deleted.

alrtpr_submitted

Type: DWORD

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

Type: DWORD

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.

See NetAlertRaiseEx for a code sample that demonstrates how to raise a print alert.

Requirements

Requirement Value
Minimum supported client Windows 2000 Professional [desktop apps only]
Minimum supported server Windows 2000 Server [desktop apps only]
Header lmalert.h (include Lm.h)

See also

ADMIN_OTHER_INFO

Alert Functions

ERRLOG_OTHER_INFO

NetAlertRaise

NetAlertRaiseEx

Network Management Overview

Network Management Structures

STD_ALERT

USER_OTHER_INFO