IScanProfile interface
The IScanProfile interface represents a single scan profile and enables applications to set and get the properties of the profile.
Members
The IScanProfile interface inherits from the IDispatch interface. IScanProfile also has these types of members:
Methods
The IScanProfile interface has these methods.
Method | Description |
---|---|
GetAllPropIDs | Gets all available property IDs in a profile. |
GetDeviceID | Returns the ID of the device. |
GetGUID | Returns the GUID of the profile. |
GetItem | Gets the GUID of the category of the WIA 2.0 item that the profile is associated with. |
GetName | Gets the friendly name of the profile. |
GetNumPropIDS | Gets the number of property IDs in a profile. |
GetProperty | Gets the value of specified child properties in the <Properties> element of a scan profile. |
IsDefault | Gets a value that indicates whether the profile is the default scan profile of an associated IWiaItem2 device. |
RemoveProperty | Removes a specified list of child properties in the <Properties> element of a scan profile. |
Save | Saves changes to a profile to disk. |
SetItem | Sets the GUID of the category of WIA 2.0 item that the profile is associated with. |
SetName | Sets the friendly name of the profile. |
SetProperty | Sets the value of specified child properties in the <Properties> element of a scan profile. |
Remarks
Any IWiaItem2 device can have a scan profile. However, IWiaItem2 items of types WIA_CATEGORY_FINISHED_FILE and WIA_CATEGORY_ROOT cannot have profiles.
If a scan profile is saved using the IScanProfile::Save method, it is stored as an XML file at %USERPROFILE%\Application Data\Microsoft\Document Center\UserScanProfiles.
To create an instance of an IScanProfile object, use the IScanProfileMgr::CreateProfile method. To get a reference to a scan profile that has already been saved to disk, use the IScanProfileMgr::OpenProfile method.
All scan profiles have the following elements: <ProfileGUID>, <DeviceID>, <ProfileName>, <WiaItem>
, and <Properties>
. The default profile of a device also has a <Default>
element.
The <ProfileGUID>
and <DeviceID>
elements cannot be changed after the profile is created. The values of the <ProfileName>
element and the <WiaItem>
element can be changed after the profile is created. The <Default>
element can be added or deleted. This can be done programatically with the IScanProfile::SetName, IScanProfile::SetItem, and IScanProfileMgr::SetDefault methods. These properties can also be changed by users through the IScanProfileUI::ScanProfileDialog method.
The <Properties>
element contains <Property>
children. Use these to add any WIA 2.0 item or device property to the profile. You can also develop your own image acquistion <Property>
children. This makes the Scan Profile Schema extensible. (For more information about extending the schema, see Defining Custom Properties, IScanProfile::GetProperty, and IScanProfile::SetProperty.)
Requirements
Requirement | Value |
---|---|
Minimum supported client |
Windows Vista [desktop apps only] |
Minimum supported server |
Windows Server 2008 [desktop apps only] |
IDL |
|
See also