大网数据广告活动
域与目录服务

IADsPrintJobOperations Property Methods (Iads.h)

· 52CE 我爱测

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.

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

Contains the number of pages printed.

Access type: Read-only

Scripting data type: LONG

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

Position

Contains the position of this print job in the print queue.

Access type: Read/write

Scripting data type: LONG

// C++ method syntax
HRESULT get_Position(
  [out] LONG* plPosition
);
HRESULT put_Position(
  [in] LONG lPosition
);

Status

Contains the current status of the print job as indicated by one of the ADSI Print Job Status Constants values.

Access type: Read-only

Scripting data type: LONG

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

TimeElapsed

Contains the number of milliseconds elapsed since the print job started.

Access type: Read-only

Scripting data type: LONG

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

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 Iads.h
DLL Activeds.dll
IID IID_IADsPrintJobOperations is defined as 32FB6780-1ED0-11CF-A988-00AA006BC149

See also

IADsPrintJob

IADsPrintJobOperations

IADsPrintQueue

ADSI Print Job Status Constants

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 05/31/2018
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。