Platform SDK: Active Directory, ADSI, and Directory Services

IADsPrintJobOperations::Pause

The IADsPrintJobOperations::Pause method halts the processing of the current print job. Call the IADsPrintJobOperations::Resume method to continue the processing.

HRESULT IADsPrintJobOperations::Pause(void);

Return Values

This method supports the standard return values. For other return values, see ADSI Error Codes.

Code Example [Visual Basic]

The following Visual Basic code fragment shows how this interface 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
if (Hex(pjo.status) = ADS_JOB_PRINTING) Then
pjo.Pause
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.

Requirements

  Windows NT/2000: Requires Windows 2000 (or Windows NT 4.0 with DSClient).
  Windows 95/98: Requires Windows 95 or later (with DSClient).
  Header: Declared in Iads.h.

See Also

IADsPrintJobOperations, IADsPrintJobOperations::Resume