JOB_INFO_2

typedef struct _JOB_INFO_2 {

DWORD JobId;

LPTSTR pPrinterName;

LPTSTR pMachineName;

LPTSTR pUserName;

LPTSTR pDocument;

LPTSTR pNotifyName;

LPTSTR pDatatype;

LPTSTR pPrintProcessor;

LPTSTR pParameters;

LPTSTR pDriverName;

LPDEVMODE pDevMode;

LPTSTR pStatus;

PSECURITY_DESCRIPTOR pSecurityDescriptor;

DWORD Status;

DWORD Priority;

DWORD Position;

DWORD StartTime;

DWORD UntilTime;

DWORD TotalPages;

DWORD Size;

SYSTEMTIME Submitted; // Time the job was spooled

DWORD Time; // How many seconds job has been printing

} JOB_INFO_2, *PJOB_INFO_2, *LPJOB_INFO_2;

This structure describes a full set of values associated with a Job.

Members

JobId

This value specifies the identification number for the Print Job.

pPrinterName

This value specifies the Printer that this job is spooled to.

pMachineName

This value specifies the machine name that Printed this job.

pUserName

This value specifies the User name that Printed this job.

pDocument

This value specifies the Document Name, (for example “MS-WORD: Review.doc”)

pNotifyName

This value specifies the person who is notified when this job is completed or when there is an error on this job.

pDatatype

This value specifies the Datatype of this job.

pPrintProcessor

This value specifies the Print Processor to use for this Job.

pParameters

This value specifies the Print Processor parameters to use for this job.

pDriverName

This value specifies the Printer Driver to use for this Job.

pDevMode

This value specifies the DEVMODE to use for this Job.

pStatus

This value specifies a string describing the status of the Job. This value can be NULL.

pSecurityDescriptor

This value points to a SECURITY_DESCRIPTOR. Its value defines the access rights of all users to this Job.

Status

This value is a bit-field. The following values are valid:

JOB_STATUS_PAUSED JOB_STATUS_ERROR JOB_STATUS_DELETING JOB_STATUS_SPOOLING JOB_STATUS_PRINTING JOB_STATUS_OFFLINE JOB_STATUS_PAPEROUT JOB_STATUS_PRINTED

Priority

This value specifies the Priority of this job.

Position

This value specifies the position that this job is in the queue.

StartTime

This value specifies the earliest time that this job can be printed.

UntilTime

This value specifies the latest time that this job can be printed.

TotalPages

This value specifies the Total number of pages of the job.

Size

This value specifies the size in bytes of this Print Job.

Submitted

This value specifies the time that this job was submitted.

Time

This value specifies the length of time, in seconds, that this job has been printing.