L_TwainSetCapability

#include "lttw2.h"

L_INT EXT_FUNCTION L_TwainSetCapability (hSession, pCapability, uFlags)

HTWAINSESSION hSession;

/* handle to an existing TWAIN session */

pTW_CAPABILITY pCapability;

/* pointer to a structure */

L_UINT uFlags;

/* optional flags */

Sets the value of the specified capability.

Parameter

Description

hSession

Handle to an existing TWAIN session. This handle is obtained by calling the L_TwainInitSession function.

pCapability

Pointer to the TW_CAPABILITY structure that references the capability value to set. This structure must be allocated and filled with data corresponding to the required capability before passing it to the function.

uFlags

Flags that indicate whether to set or reset the capability value. Possible values are:

 

Value

Meaning

 

LTWAIN_CAPABILITY_SET

[1] Set the capability to the value specified in pCapability.

 

LTWAIN_CAPABILITY_RESET

[2] Reset the value of the capability to the default value defined by the TWAIN source. In this case the pCapability can be NULL since it is not needed.

Returns

SUCCESS

The function was successful.

! = SUCCESS

An error occurred. Refer to Return Codes.

Comments

To enable duplex scanning, set the CAP_DUPLEXENABLED option in the TW_CAPABILITY structure passed to this function.

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.

See Also

Functions:

L_TwainStartCapsNeg, L_TwainEndCapsNeg, L_TwainSetProperties, L_TwainGetProperties, L_TwainGetCapability, L_TwainInitSession, L_TwainEndSession.

Topics:

Getting and Setting Capabilities

 

TWAIN Functionality: Capability Functions.

Example

For an example, refer to L_TwainAcquire.