IPrinterQueue2::GetPrinterQueueView method

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.


HRESULT GetPrinterQueueView(
  ULONG             ulViewOffset,
  ULONG             ulViewSize,
  IPrinterQueueView **ppJobView



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


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


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.


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.

Note  There is work underway to implement a cap on the maximum size of the printer queue view.


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

See Also