wiasUpdateScanRect function (wiamdef.h)

The wiasUpdateScanRect function updates the scanning area sizes of the scanning device.

Syntax

HRESULT wiasUpdateScanRect(
  [in] BYTE                 *pWiasContext,
  [in] WIA_PROPERTY_CONTEXT *pContext,
       LONG                 lWidth,
       LONG                 lHeight
);

Parameters

[in] pWiasContext

Pointer to a WIA item context.

[in] pContext

Pointer to a WIA_PROPERTY_CONTEXT structure containing the property context, created by a prior call to wiasCreatePropContext.

lWidth

Specifies the horizontal width of the scanning area of the scanning device, in units of thousandths of an inch. Normally, this is the horizontal bed size.

lHeight

Specifies the vertical height of the scanning area of the scanning device, in units of thousandths of an inch. Normally, this is the vertical bed size.

Return value

On success, the function returns S_OK. If the function fails, it returns a standard COM error or one of the WIA_ERROR_XXX errors (described in the Microsoft Windows SDK documentation).

Remarks

This helper method is called to update the properties making up the scan rectangle. The appropriate changes are made to the properties that are dependent on those that make up the scan rectangle. For example, a change in horizontal resolution affects the horizontal extent. This function assumes that the valid values for the vertical and horizontal extents, and vertical and horizontal positions have not yet been updated.

Requirements

Requirement Value
Minimum supported client Available in Microsoft Windows Me and in Windows XP and later versions of the Windows operating systems.
Target Platform Desktop
Header wiamdef.h (include Wiamdef.h)
Library Wiaservc.lib
DLL Wiaservc.dll

See also

WIA_PROPERTY_CONTEXT

wiasCreatePropContext