L_LTTWN_API L_INT L_TwainSetProperties (hSession, pltProperties, uFlags, pfnCallBack, pUserData)
Sets predefined capabilities of the TWAIN source in the form of properties.
Pointer to a LTWAINPROPERTIES structure that contains the values to set.
Flags that indicate whether to set or reset the property values. Possible values are:
|LTWAIN_PROPERTIES_SET|| Set the properties to the values specified in the LTWAINPROPERTIES structure.|
|LTWAIN_PROPERTIES_RESET|| Set the properties to their default values neglecting the values specified in the LTWAINPROPERTIES structure. In this case the LTWAINPROPERTIES pointer can be NULL since it is not used.|
Optional callback function, called as each property is set. It lets the user know if an error occurred during the set operation and lets the user abort or retry.
If you do not provide a callback function, use NULL as the value of this parameter. No error reporting will occur. If you do provide a callback function, use the function pointer as the value of this parameter. The callback function must adhere to the function prototype described in LTWAINSETPROPERTYCALLBACK function.
Void pointer that you can use to pass one or more additional parameters that the callback function needs.
To use this feature, assign a value to a variable or create a structure that contains as many fields as you need. Then, in this parameter, pass the address of the variable or structure, casting it to L_VOID *. The callback function, which receives the address in its own pUserData parameter, can cast it to a pointer of the appropriate data type to access your variable or structure. If the additional parameters are not needed, you can pass NULL in this parameter.
|SUCCESS||The function was successful.|
|! = SUCCESS||An error occurred. Refer to Return Codes.|
The function can set the values of the properties to the values specified in the LTWAINPROPERTIES structure or it can reset the values defined in the structure to their default values defined by the TWAIN source.
Required DLLs and Libraries