LWia::SetProperties

Summary

Sets a list of all properties available through the LWIAPROPERTIES structure into the WIA device's item passed through the pItem parameter.

Syntax

#include "ltwrappr.h"

virtual L_INT LWia::SetProperties(pItem, pProperties)

Parameters

L_VOID * pItem

Valid pointer to a type IWiaItem (WIA Version 1.0) or IWiaItem2 (WIA Version 2.0) object, representing the item that is having its properties set.

Retrieve this parameter by either calling the LWia::GetRootItem function to get a pointer to the device's root item, or by enumerating the child items of the device through a call to LWia::EnumChildItems.

pLWIAPROPERTIES pProperties

Pointer to a LWIAPROPERTIES structure retrieved through the call to the LWia::GetProperties function.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

This feature is available in LEADTOOLS version 16 or higher.

[LWia:SetProperties can set the values of all properties available through the LWIAPROPERTIES structure into the WIA device's item passed through the pItem parameter.

Override the LWia::SetPropertiesCallback function in order to receive error notification and be allowed to abort or retry the operation. Be sure to enable this LWia::SetPropertiesCallback callback beforehand by calling LBase::EnableCallBack (TRUE).

L_WIA_SHOW_USER_INTERFACE Note

Microsoft's image acquisition dialog box sets its own initialization properties, such as the current intent (image type), selected area (left, top, width and height), paper source, duplex mode, etc.

If the L_WIA_SHOW_USER_INTERFACE flag is set, Microsoft's image acquisition dialog box overwrites some of the properties set/changed by any of the LWia::SetPropertyXXX or [LWia:SetProperties functions.

To prevent overwriting, do not set the L_WIA_SHOW_USER_INTERFACE flag if any LWia::SetPropertyXXX or [LWia:SetProperties functions need to be called.

Microsoft WIA Toolkit Limitation

The Microsoft WIA Toolkit has the following, known limitation:

A Win32 version application running on Windows VISTA 64-bit that calls LWia::Acquire, specifying the pnFilesCount and pppszFilePaths parameters, fails to fill those two members with the required information.

Microsoft WIA 2.0 Limitation

To customize the Image Data Type property (WIA_IPA_DATATYPE), some drivers using WIA 2.0 require the WIA_IPS_CUR_INTENT property value to be set to WIA_INTENT_NONE.

Required DLLs and Libraries

See Also

Functions

Topics

Example

For an example, refer to LWia::GetRootItem.

Help Version 22.0.2022.12.7
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS WIA C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.