IPrintCoreUI2::QuerySimulationSupport method

The IPrintCoreUI2::QuerySimulationSupport method retrieves a spooler simulation capability structure, which indicates the kinds of simulation the spooler supports.


HRESULT QuerySimulationSupport(
  [in]  HANDLE hPrinter,
  [in]  DWORD  dwLevel,
  [out] PBYTE  pCaps,
  [in]  DWORD  cbSize,
  [out] PDWORD pcbNeeded


hPrinter [in]

Specifies a handle to the printer.

dwLevel [in]

Specifies the spooler simulation capability structure returned in the buffer pointed to by pCaps. Currently, only level 1 of spooler simulation support is provided.

ValueSpooler Simulation Support Structure


SIMULATE_CAPS_1 (defined in printoem.h)


pCaps [out]

Pointer to the output buffer, which contains a structure of the type indicated by the value in the dwLevel parameter.

cbSize [in]

Specifies the size, in bytes, of the output buffer, which is pointed to by pCaps.

pcbNeeded [out]

Specifies the size, in bytes, of the memory needed to store a structure of the type indicated by dwLevel.

Return value

The method must return one of the following values.

Return codeDescription

The method succeeded.


The value in cbSize was smaller than the number of bytes to be written to the output buffer (the buffer pointed to by pCaps).

The method was called with pCaps set to NULL.


The method is not supported.

A structure of the type specified by dwLevel is not supported.


The method failed



This method is supported only for Windows XP Pscript5 plug-ins, not for Unidrv plug-ins.

The IPrintCoreUI2::QuerySimulationSupport method stores a spooler simulation capability structure in the buffer pointed to by pCaps. This structure specifies the level of spooler support for "N-up" printing, reverse printing, the maximum number of pages that can be printed, collation, and others.


Target platform


Prcomoem.h (include Prcomoem.h)

See also




Send comments about this topic to Microsoft