IPrintCoreUI2::EnumConstrainedOptions method determines which options of a feature are constrained.
HRESULT EnumConstrainedOptions( POEMUIOBJ poemuiobj, DWORD dwFlags, PCSTR pszFeatureKeyword, PZZSTR pmszConstrainedOptionList, DWORD cbSize, PDWORD pcbNeeded );
Pointer to the current context, an OEMUIOBJ structure.
Is reserved and must be set to zero.
Pointer to a caller-supplied buffer containing the single feature keyword of interest to the caller.
Pointer to a caller-supplied buffer that receives the list of option keywords, in MULTI_SZ format, for this feature. Each keyword represents an option that is constrained in the current configuration.
Set this parameter to NULL to simply query for the size (*pcbNeeded) of the constrained option list without having the list filled in.
Specifies the size, in bytes, of the buffer pointed to by pmszConstrainedOptionList.
Pointer to a memory location that receives the actual size, in bytes, of the constrained option list.
This method must return one of the following values.
||The method succeeded. The method should also return this value if none of the feature's options are constrained. In this case, the method should place one null character into the buffer pointed to by pmszConstrainedOptionList, and should set *pcbNeeded to 1.|
The value in cbSize was smaller than the number of bytes to be written to the output buffer (the buffer pointed to by pmszConstrainedOptionList).
The method was called with pmszConstrainedOptionList set to NULL.
The string pointed to by pszFeatureKeyword was not a recognized feature.
The poemuiobj parameter pointed to an invalid context object.
The stickiness of the feature did not match that of the context object pointed to by peomuiobj. (See Replacing Driver-Supplied Property Sheet Pages.)
||The method failed.|
||The method is not supported.|
This method is supported only for Windows XP Pscript5 UI plug-ins that fully replace the core driver's standard UI pages, and is supported only during the UI plug-in's IPrintOemUI::DocumentPropertySheets and IPrintOemUI::DevicePropertySheets functions, and their property sheet callback routines. See Replacing Driver-Supplied Property Sheet Pages for more information.
To reduce the need to make two calls per data access, pass the method an output buffer of a fixed size (1 KB, for example), and then check the function return value. If the method returns S_OK, the buffer already contains the data of interest. If the method returns E_OUTOFMEMORY, the value in *pcbNeeded is the buffer size needed to hold the data of interest. The caller should then allocate a buffer of that larger size and proceed with a second call to the method.
|Header||prcomoem.h (include Prcomoem.h)|