Stores information about a specified set of print jobs for a specified printer into an array.

APrintJobs(cArrayName, cPrinter [, nLevel])

Parameters

cArrayName

if nLevel = 1

the array contains the following information from the JOB_INFO_1 structure.
ColumnContentDatatype
1Name of the print job.C
2Name of the printer for which the job is spooled.C
3Name of the user that owns the print job.C
4Name of the machine that created the print job.C
5The type of data used to record the print job.C
6The status of the print job.C
7A job identifier.N
8The job status. For a list of possible values have a look here JOB_INFO_1.N
9The job priority. For a list of possible values have a look here JOB_INFO_1.N
10The job's position in the print queue.N
11The total number of pages that the document contains.
This value may be zero if the print job does not contain page delimiting information.
N
12The number of pages that have printed.
This value may be zero if the print job does not contain page delimiting information.
N
13The time that this document was spooled.
This time value is in Universal Time Coordinate (UTC) format. You should convert it to a local time value before displaying it.
You can use the UTC2DT function to perform the conversion.
T


if nLevel = 2

the array contains the following additional information from the JOB_INFO_2 structure.
ColumnContentDatatype
14The name of the user who should be notified when the job has been printed or when an error occurs while printing the job.C
15The name of the print processor that should be used to print the job.C
16Print-processor parameters.C
17The name of the printer driver that should be used to process the print job.C
18The total time, in milliseconds, that has elapsed since the job began printing.N
19The earliest time that the job can be printed.N
20The latest time that the job can be printed.N
21The size, in bytes, of the job.N
cPrinter

Name of the printer for which to enumerate the printjobs.

nLevel (optional)

default = 1

The level of information to return, either 1 or 2.

Return Value

The number of print jobs.

See Also

Reference

APaperSizes
APrinterForms
APrintersEx
APrinterTrays

Used WinApi functions

EnumJobs
OpenPrinter
ClosePrinter