IPrintCoreUI2::SetOptions method sets the driver's feature settings.
HRESULT SetOptions( [in] POEMUIOBJ poemuiobj, [in] DWORD dwFlags, [in] PCSTR pmszFeatureOptionBuf, [in] DWORD cbIn, [out] PDWORD pdwResult );
- poemuiobj [in]
Pointer to the current context, an OEMUIOBJ structure.
- dwFlags [in]
Specifies whether the core driver is to resolve conflicts. This parameter must be set to one of the following values:
Ask core driver to not resolve any conflict that arises.
Ask core driver to resolve any conflict that arises.
- pmszFeatureOptionBuf [in]
Pointer to a caller-supplied buffer containing a list of feature/option keyword pairs in MULTI_SZ format. Each item in this list is separated from the next by a null character, and the list is terminated with two null characters.
- cbIn [in]
Specifies the size, in bytes, of the buffer pointed to by pmszFeatureOptionBuf. This size includes the last MULTI_SZ null character.
- pdwResult [out]
Pointer to a memory location that receives one of the following values. These constants are defined in printoem.h.
The core driver found conflicts, but has left them unresolved.
The core driver found and resolved all conflicts.
The core driver did not find any conflict.
The method must return one of the following values.
The method succeeded.
The method is not supported.
A structure of the type specified by dwLevel is not supported.
The value in dwFlags was incorrect.
The input buffer (pointed to by pmszFeatureOptionBuf) was not in MULTI_SZ format.
The poemuiobj parameter pointed to an invalid context object.
The method failed
This method is supported only for Windows XP Pscript5 plug-ins, not for Unidrv plug-ins.
This method is called to set the driver's feature settings using a list of feature/option keyword pairs. The caller can access the resultant feature settings using the IPrintCoreUI2::GetOptions method.
If this method returns any value other than S_OK, then it did not make any change in the driver's feature settings.
The pmszFeatureOptionBuf input buffer must be constructed in the same way as the output buffer of the IPrintCoreUI2::GetOptions method. That is, the feature/option keyword pairs must be in MULTI_SZ format, and each item in the list is separated from the next by a null character. A pair of null characters terminates the list.
If the input buffer contains a feature keyword or its option keyword that is not recognized, or the feature is recognized but not supported in the current sticky mode (see Replacing Driver-Supplied Property Sheet Pages), then the feature/option pair is ignored, and the current option for that feature continues to be in effect.
This method is supported only for 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.
For more information, see Using GetOptions and SetOptions.