IScanProfile::Save method
Saves changes to a profile to disk.
Syntax
HRESULT Save();
Parameters
This method has no parameters.
Return value
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
A saved scan profile is an XML file stored at %USERPROFILE%\Application Data\Microsoft\Document Center\UserScanProfiles.
If more than one process writes to the IScanProfile object, the one that calls IScanProfile::Save last is the only process whose changes are saved.
The IScanProfile::Save method validates the profile before saving. The profile is always considered valid unless the category of the Windows Image Acquisition (WIA) 2.0 item associated with the profile is either WIA_CATEGORY_FLATBED or WIA_CATEGORY_FEEDER. If the category is WIA_CATEGORY_FLATBED or WIA_CATEGORY_FEEDER, the following properties must be valid for the item, if the properties are contained in the profile:
WIA_IPS_BRIGHTNESS
WIA_IPS_CONTRAST
WIA_IPA_DATATYPE
WIA_IPS_XRES
WIA_IPA_FORMAT
In addition, if the category is WIA_CATEGORY_FEEDER, the WIA_IPS_PAGE_SIZE property must be valid, if it is present in the profile. For more information about these properties, see Scanner WIA Item Property Constants.
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
Header |
|
IDL |
|
See also