DTwainSource::GetCapContainer

Top  Previous  Next

Syntax

LONG DTwainSource::GetCapContainer( LONG lCap, LONG lOperation = DTWAIN_CAPGET ) const;

 

Parameters

lCap

Capability

 

lOperation

Capability operation

 

Return Value

If successful, returns the TWAIN container type(s) used by the Source when getting or retrieving values.  If unsuccessful, CDTwainSource::InvalidLong is returned.

 

Comments

The container type denotes the data structure that the Source uses when setting or getting capability values.  The lCap value is the capability, and the lCap is the operation type.  The application does not need to know explicitly what the container is that will be used, but can be helpful to decide whether the Source uses a TW_RANGE to store values, as opposed to a TW_ARRAY.

 

The lOperation parameter can be one of the following:

 

Operation

Definition

DTWAIN_CAPGET

Get capability value

DTWAIN_CAPGETCURRENT        

Get current value

DTWAIN_CAPGETAVAILABLE        

Get available values

DTWAIN_CAPSET

Set Current value

DTWAIN_CAPSETAVAILABLE

Set available values

 

                                         

On return of CDTwainSource::GetCapContainer, one of the following values can be returned:

 

Container

TWAIN Equivalent

DTWAIN_CONTONEVALUE

TW_ONEVALUE type

DTWAIN_CONTARRAY                

TW_ARRAY  type

DTWAIN_CONTRANGE                

TW_RANGE  type

DTWAIN_CONTENUMERATION        

TW_ENUMERATION  type

0                                        

Error