IPrinterQueue2::GetPrinterQueueView method (printerextension.h)

Retrieves an IPrinterQueueView object, and initializes the object with the range of jobs to be monitored.

This method allows the user to perform job management tasks from within a UWP device app for printers.

Syntax

HRESULT GetPrinterQueueView(
  [in]          ULONG             ulViewOffset,
  [in]          ULONG             ulViewSize,
  [out, retval] IPrinterQueueView **ppJobView
);

Parameters

[in] ulViewOffset

Indicates the start of the range of jobs to be monitored.

[in] ulViewSize

Indicates the size or the range of jobs to be monitored.

[out, retval] ppJobView

IPrinterQueueView object that shows the range of jobs to be monitored.

Return value

If the method call is successful, GetPrinterQueueView returns S_OK.

Otherwise, if a call to GetPrinterQueueView results in an error condition, then one of the following HRESULT values can be returned.

HRESULT value Description
E_ILLEGAL_METHOD_CALL Indicates an attempt to retrieve more than one printer queue view object.
E_INVALIDARG Indicates an attempt to create a view size larger than the maximum size.

Remarks

Only one IPrinterQueueView object can be retrieved per IPrinterQueue2 object. However it is possible to move around the single view that you retrieve. In other words, it is possible to change the positions of the monitored jobs by invoking IPrinterQueueView::SetViewRange.

Requirements

Requirement Value
Minimum supported client Windows 8.1
Minimum supported server Windows Server 2012 R2
Target Platform Desktop
Header printerextension.h

See also

IPrinterQueue2

IPrinterQueueView