IPrintCoreHelperPS::EnumConstrainedOptions method

The IPrintCoreHelperPS::EnumConstrainedOptions method provides a list of all of the options that are constrained in a particular feature, based on current settings.


HRESULT EnumConstrainedOptions(
  IN const DEVMODE *pDevmode,
  IN DWORD         cbSize,
  IN PCSTR         pszFeatureKeyword,
  OUT PCSTR * []   pConstrainedOptionList,
  OUT DWORD        *pdwNumOptions



A pointer to a DEVMODEW structure. If this pointer is provided, IPrintCoreHelperPS::EnumConstrainedOptions should use the DEVMODEW structure that is pointed to by pDevmode instead of the default or current DEVMODEW structure. If this method is called from the plug-in provider or from IPrintOemPS::DevMode, this parameter is required. In most other situations, the parameter should be NULL. When the core driver sets pDevmode to NULL, it modifies its internal state rather than that of the passed-in DEVMODEW structure. This is required during operations such as full UI replacement, where the DEVMODEW structure returned by a DDI, such as DrvDocumentPropertySheets, is being serviced by the core driver's UI module.


The size, in bytes, of the DEVMODEW structure that is pointed to by the pDevmode parameter.


A string of ANSI characters that contains the feature name.



A pointer to a variable that receives the number of constrained options in the array that is pointed to by the pConstrainedOptionList parameter.

Return Value

IPrintCoreHelperPS::EnumConstrainedOptions should return one of the following values.

Return code Description
The constrained options were set for the specified feature.
The caller provided information that resulted in an invalid request, such as a request for a feature that does not exist.
One or more of the arguments were invalid. This value might mean that the feature is not supported.
There was not enough memory to create the options array or the core driver could not service the request because of lack of memory.
E_UNEXPECTED, or other failures not listed here
An unexpected condition occurred. The core driver is probably in an invalid state. The caller should exit with a failure code.


Target Platform Desktop
Header prcomoem.h (include Prcomoem.h)

See Also