Type Library
QSADSLib
VB 5.0 Project-Reference Descriptive String
of Type Library
Bindview DirectScript Objects 3.2 Type Library
DLL
QSNOS.DLL
The Print Job object represents a print job that is waiting to be serviced in a queue. This object is different from other ADSI objects in that it is not stored in a directory and so does not have a parent container.
The Print Job object may be obtained by enumerating the print jobs in a queue. It cannot be created by using the ADsPath like other DirectScript objects.
The object contains properties and methods that you can use to manage a print job. The properties include the size of the print job, total number of pages in the print job, current status of the print job, and so on.
There are methods provided for pausing a job, resuming a paused print job, canceling a print job, and so on.
The object supports these interfaces:
IADsPrintJob: the default interface for this object. Can be used to get and set properties of the Print Job object.
IADs: Can be used to get some basic properties (like name, class, and parent) of an object.
IADsPrintJobOperations: Can be used to pause or cancel a print job, change its priority, and so on.
IPrintJobAdditionalOperations: Can be used to cancel or restart a print job.
Example
Dim PrintQueueOperations As
IADsPrintQueueOperations
Dim PrintJobCollection As IADsCollection
Dim PrintJob As IADsPrintJob
'Gets the IADsPrintQueueOperations interface. In the path HP
DeskJet '500C is the print queue.
Set PrintQueueOperations = GetObject ("NTDS://MSFT/MOON/HP DeskJet
500C")
Set PrintJobCollection = PrintQueueOperations.PrintJobs
'Enumerate individual print jobs
For each PrintJob In PrintJobCollection
Debug.Print PrintJob.Description
Next PrintJob