IScanProfile::SetProperty method

Sets the value of specified child properties in the <Properties> element of a scan profile.

Syntax


HRESULT SetProperty(
  [in]  ULONG num,
  [in]  PROPID *pid,
  [in]  PROPVARIANT *pvar
);

Parameters

num [in]

Type: ULONG

The number of entries in the arrays that are pointed to by pid and pvar.

pid [in]

Type: PROPID*

A pointer to an array of identification numbers of the properties to be set. Each value in the array is a WIA Property Constants.

pvar [in]

Type: PROPVARIANT*

A pointer to an array of values to be assigned to the properties.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Each value in the array that pid points to is one of the WIA Property Constants. You can extend this identification system. See Defining Custom Properties.

Changes to a profile are not saved to disk until the application calls the IScanProfile::Save method.

If two applications create scan profile objects from the same XML file, and each application writes changes to its object, only the changes made by the application that calls IScanProfile::Save last are saved to disk.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Scanprofile.h

IDL

Scanprofiles.idl

See also

IScanProfile
Conceptual
Scan Profile Schema
WIA Property Constants
Defining Custom Properties

 

 

Community Additions

ADD
Show:
© 2014 Microsoft