#include "ltwrappr.h"
virtual L_INT LWia::SetProperties(pItem, pProperties)
L_VOID * pItem; |
pointer to IWiaItem or IWiaItem2 interface |
pLWIAPROPERTIES pProperties; |
pointer to a structure |
Sets a list of all properties available through the LWIAPROPERTIES structure into the WIA device's item passed through the pItem parameter.
Parameter |
Description |
pItem |
Valid pointer to a type IWiaItem or IWiaItem2 object (IWiaItem if using WIA Version 1.0; IWiaItem2 if using WIA Version 2.0), which represents 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. |
pProperties |
Pointer to a structure of type LWIAPROPERTIES retrieved through the call to the LWia::GetProperties function. |
SUCCESS |
The function was successful. |
< 1 |
An error occurred. Refer to Return Codes. |
This feature is available in LEADTOOLS version 16 or higher.
The function can set the values of the properties to the values specified in the LWIAPROPERTIES structure into the WIA device's item passed through the pItem parameter.
You can override the LWia::SetPropertiesCallback function in order to know if an error occurred during the set operation and lets the user abort or retry but in order to enable this callback you need to call the LBase::EnableCallBack (TRUE).
Note: |
If the user set the L_WIA_SHOW_USER_INTERFACE flag, then he should be aware of the following point: |
|
Some of the these properties will be overwritten by the Microsoft image acquisition dialog box, since this dialog set it seems that this dialog sets its own initialization properties like the current intent (image type), selected area (left, top, width and height), papser source and duplex mode, etc. |
So if the user wants to keep his changed properties then he should not set this flag to suppress the manufacturer's image acquisition dialog and acquire directly from the specified source item.
Note: |
Through our test we have found the following limitation related to Microsoft WIA toolkit which is, on some drivers and while using WIA 2.0 if you want to change the Image Data Type property (WIA_IPA_DATATYPE) to your custom setting then you have to set the WIA_IPS_CUR_INTENT property value to WIA_INTENT_NONE. |
Required DLLs and Libraries
LTWIA For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application. |
Functions: |
LWia::GetProperties, LWia::GetRootItem, LWia::EnumChildItems, LWia::InitSession, LWia::SetPropertiesCallback, LWia::EndSession, Class Members |
Topics: |
|
|
For an example, refer to LWia::GetRootItem.