Platform SDK: Active Directory, ADSI, and Directory Services

IADsPrintJobOperations Property Methods

The property methods of the IADsPrintJobOperations interface read and write the properties described in the following table. For a general discussion of property methods, see Interface Property Methods.

Properties in Vtable Order

Property Description
Status

[Visual Basic]
Access: Read
Data Type: LONG

[C++]
HRESULT get_Status
([out] LONG *plStatus);

The current status of service. The status is indicated by one of the integer values found in the following list:
  Status
ADS_JOB_PAUSED
ADS_JOB_ERROR
ADS_JOB_DELETING
ADS_JOB_PRINTING
ADS_JOB_OFFLINE
ADS_JOB_PAPEROUT
ADS_JOB_PRINTED
ADS_JOB_DELETED
Hex Value
0x00000001
0x00000002
0x00000004
0x00000010
0x00000020
0x00000040
0x00000080
0x00000100
TimeElapsed

[Visual Basic]
Access: Read
Data Type: LONG

[C++]
HRESULT get_TimeElapsed
([out] LONG *plTimeElapsed);

Time elapsed, in seconds, since the print job started.
PagesPrinted

[Visual Basic]
Access: Read
Data Type: LONG

[C++]
HRESULT get_PagesPrinted
([out] LONG *plPagesPrinted);

Number of pages already printed.
Position

[Visual Basic]
Access: Read/Write
Data Type: LONG

[C++]
HRESULT get_Position
([out] LONG *plPosition);

HRESULT put_Position
([in] LONG lPosition);

Position in the print queue of this print job.

Code Example [Visual Basic]

The following Visual Basic code fragment shows how the properties for IADsPrintJobOperations may be used:

Dim pqo As IADsPrintQueueOperations
Dim pjo As IADsPrintJobOperations
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

Example Code [C++]

For a C++ code snippet, see the Example Code [C++] given in the introductory section of the IADsPrintJobOperations interface.

See Also

IADsPrintJob, IADsPrintJobOperations, IADsPrintQueue