JOB_INFO_2 Structure

Type JOB_INFO_2
  JobId As Long
  pPrinterName As String
  pMachineName As String
  pUserName As String
  pDocument As String
  pNotifyName As String
  pDatatype As String
  pPrintProcessor As String
  pParameters As String
  pDriverName As String
  pDevMode As DEVMODE
  pStatus As String
  pSecurityDescriptor As SECURITY_DESCRIPTOR
  Status As Long
  Priority As Long
  Position As Long
  StartTime As Long
  UntilTime As Long
  TotalPages As Long
  Size As Long
  Submitted As SYSTEMTIME
  Time As Long
  PagesPrinted As Long
End Type

Description & Usage

The JOB_INFO_2 structure holds information about a print job. The structure contains data which both identifies the originator of the print job and its current status in the print spooler.

Visual Basic-Specific Issues

None.

Data Members

JobId
The unique numeric identifier of the print job.
pPrinterName
The name of the printer for which the print job is spooled.
pMachineName
The name of the computer which created the print job.
pUserName
The name of the user who owns the print job.
pDocument
The name of the print job (usually the document being printed).
pNotifyName
The name of the user who should be notified when the print job is complete or when an error occurs while printing.
pDatatype
The type of data used to record the print job.
pPrintProcessor
The name of the print processor to be used to print the print job.
pParameters
The parameters of the print processor.
pDriverName
The name of the printer driver to be used to process the print job.
pDevMode
Device initialization and environment data for the printer driver.
pStatus
The current status of the print job. If this string is empty, the print status can instead be found in Status.
pSecurityDescriptor
Reserved -- do not use.
Status
If necessary, a combination of the following flags identifying the current status of the print job:
JOB_STATUS_BLOCKED_DEVQ
The driver cannot print the print job.
JOB_STATUS_DELETED
The print job has been deleted.
JOB_STATUS_DELETING
The print job is being deleted.
JOB_STATUS_ERROR
An error is associated with the print job.
JOB_STATUS_OFFLINE
The printer responsible for printing the print job is offline.
JOB_STATUS_PAPEROUT
The printer responsible for printing the print job is out of paper.
JOB_STATUS_PAUSED
The print job is paused.
JOB_STATUS_PRINTED
The print job has been printed.
JOB_STATUS_PRINTING
The print job is being printed.
JOB_STATUS_RESTART
The print job has been restarted.
JOB_STATUS_SPOOLING
The print job is being spooled.
JOB_STATUS_USER_INTERVENTION
The printer responsible for printing the print job has suffered an error requiring the user to do something.
Priority
A value between 1 and 99 inclusive specifying the priority of the print job (99 being highest). One of the following flags can be used as well:
DEF_PRIORITY
Default priority.
MIN_PRIORITY
Minimum priority.
MAX_PRIORITY
Maximum priority.
Position
The current position of the print job in the print queue.
StartTime
The earliest time that the print job can be printed (specified as number of minutes after midnight UTC (Universal Coordinated Time, a.k.a. Greenwich Mean Time or GMT).
UntilTime
The latest time that the print job can be printed (specified as number of minutes after midnight UTC (Universal Coordinated Time, a.k.a. Greenwich Mean Time or GMT).
TotalPages
The total number of pages which make up the print job, if available.
Size
The size in bytes of the print job.
Submitted
The date and time when the document was spooled into the queue. This time is in Universal Coordinated Time (UTC, a.k.a. Greenwich Mean Time, or GMT) instead of in the system's local time zone time.
Time
The total amount of time, in seconds, since the print job has begun printing.
PagesPrinted
The number of pages of the print job which have already been printed, if available.

Constant Definitions

Const JOB_STATUS_BLOCKED_DEVQ = &H200
Const JOB_STATUS_DELETED = &H100
Const JOB_STATUS_DELETING = &H4
Const JOB_STATUS_ERROR = &H2
Const JOB_STATUS_OFFLINE = &H20
Const JOB_STATUS_PAPEROUT = &H40
Const JOB_STATUS_PAUSED = &H1
Const JOB_STATUS_PRINTED = &H80
Const JOB_STATUS_PRINTING = &H10
Const JOB_STATUS_SPOOLING = &H8
Const JOB_STATUS_USER_INTERVENTION = &H400
Const DEF_PRIORITY = 1
Const MIN_PRIORITY = 1
Const MAX_PRIORITY = 99

Used By

EnumJobs

Go back to the alphabetical Structure listing.
Go back to the Reference section index.


Last Modified: November 26, 1999
This page is copyright © 1999 Paul Kuliniewicz. Copyright Information Revised October 29, 2000
Go back to the Windows API Guide home page.
E-mail: vbapi@vbapi.com Send Encrypted E-Mail
This page is at http://www.vbapi.com/ref/j/job_info_2.html