Platform SDK: Active Directory, ADSI, and Directory Services

IADsPrintQueueOperations::Pause

The IADsPrintQueueOperations::Pause method suspends the processing of print jobs within a print queue service.

HRESULT IADsPrintQueueOperations::Pause(void);

Return Values

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

Code Example [Visual Basic]

The following Visual Basic code fragment suspends the operation of a printer:

Dim pqo As IADsPrintQueueOperations
Set pqo = GetObject("WinNT://aMachine/aPrinter")
if pgo.status = ADS_PRINTER_PRINTING then
pqo.Pause
end if

Example Code [C++]

The following C++ code snippet suspends the operation of a printer.

IADsPrintQueueOperations *pqo;
HRESULT hr = ADsGetObject(L"WinNT://aMachine/aPrinter",
IID_IADsPrintQueueOperations,
(void**)&pqo)
long status;
hr = pqo->get_Status(&status);
if(status = ADS_PRINTER_PRINTING) {
pqo->Pause();
}
hr = pqo->Release();

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

IADsPrintQueueOperations, IADsPrintQueueOperations::Resume