IADsPrintJobOperations Property Methods
The property methods of the IADsPrintJobOperations interface read and write the properties listed in the following table. For more information about property methods, see Interface Property Methods.
Properties
-
PagesPrinted
-
-
Access type: Read-only
-
Scripting data type: LONG
-
// C++ method syntax HRESULT get_PagesPrinted( [out] LONG* plPagesPrinted );
Contains the number of pages printed.
-
-
Position
-
-
Access type: Read/write
-
Scripting data type: LONG
-
// C++ method syntax HRESULT get_Position( [out] LONG* plPosition ); HRESULT put_Position( [in] LONG lPosition );
Contains the position of this print job in the print queue.
-
-
Status
-
-
Access type: Read-only
-
Scripting data type: LONG
-
// C++ method syntax HRESULT get_Status( [out] LONG* plStatus );
Contains the current status of the print job as indicated by one of the ADSI Print Job Status Constants values.
-
-
TimeElapsed
-
-
Access type: Read-only
-
Scripting data type: LONG
-
// C++ method syntax HRESULT get_TimeElapsed( [out] LONG* plTimeElapsed );
Contains the number of milliseconds elapsed since the print job started.
-
Examples
The following code example shows how the properties for IADsPrintJobOperations may be used.
Dim pqo As IADsPrintQueueOperations
Dim pjo As IADsPrintJobOperations
On Error GoTo Cleanup
Set pqo = GetObject("WinNT://aMachine/aPrinter")
For Each pj In pqo.PrintJobs
Set pjo = pj
MsgBox pjo.PagesPrinted & " pages printed for job " & pj.Name
If (pjo.position > 1) Then
pjo.Position = pjo.status - 1
End If
Next
Cleanup:
If (Err.Number<>0) Then
MsgBox("An error has occurred. " & Err.Number)
End If
Set pqo = Nothing
Set pjo = Nothing
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista |
Minimum supported server |
Windows Server 2008 |
Header |
|
DLL |
|
IID |
IID_IADsPrintJobOperations is defined as 32FB6780-1ED0-11CF-A988-00AA006BC149 |