L_TwainSetProperties

#include "lttwn.h"

L_LTTWN_API L_INT L_TwainSetProperties (hSession, pltProperties, uFlags, pfnCallBack, pUserData)

HTWAINSESSION hSession;

handle to an existing TWAIN session

pLTWAINPROPERTIES pltProperties;

pointer to a structure

L_UINT uFlags;

optional flags

LTWAINSETPROPERTYCALLBACK pfnCallBack;

optional callback function

L_VOID * pUserData;

pointer to more parameters for the callback

Sets predefined capabilities of the TWAIN source in the form of properties.

Parameter Description
hSession Handle to an existing TWAIN session. This handle is obtained by calling the L_TwainInitSession or L_TwainInitSession2 function.
pltProperties Pointer to a LTWAINPROPERTIES structure that contains the values to set.
uFlags Flags that indicate whether to set or reset the property values. Possible values are:
  Value Meaning
  LTWAIN_PROPERTIES_SET [1] Set the properties to the values specified in the LTWAINPROPERTIES structure.
  LTWAIN_PROPERTIES_RESET [2] 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.
pfnCallBack 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.
pUserData 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.

Returns

SUCCESS

The function was successful.

! = SUCCESS

An error occurred. Refer to Return Codes.

Comments

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.

This function must be called after L_TwainStartCapsNeg is called and before L_TwainEndCapsNeg is called.

Required DLLs and Libraries

LTTWN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files to be Included with your Application.

Help Version 19.0.2017.10.19
Products | Support | Contact Us | Copyright Notices
© 1991-2017 LEAD Technologies, Inc. All Rights Reserved.
LEADTOOLS TWAIN C API Help