DTWAIN_GetCapArrayType

Top  Previous  Next

The DTWAIN_GetCapArrayType returns the DTWAIN_ARRAY type to use when retrieving or setting a capability's values.

 

LONG DTWAIN_GetCapArrayType (

DTWAIN_SOURCE

Source

LONG

Capability );

 

Parameters

Source

A valid DTWAIN_SOURCE if Capability is a custom capability.  NULL otherwise.

 

Capability

The capability that is to be queried for the DTWAIN data type.

 

Return Values

The actual DTWAIN array type that the capability uses to retrieve or set values within the DTWAIN API.

 

Comments

 

The DTWAIN_GetCapArrayType function returns the DTWAIN type to use for any DTWAIN_ARRAY's or DTWAIN_RANGE's that are used for setting capabilities.

 

Use only the values specified below when creating a DTWAIN_ARRAY or DTWAIN_RANGE that will hold capability values.  Do not use the return values from DTWAIN_GetCapDataType for this purpose.

 

The following are the possible return values for DTWAIN_GetCapArrayType:

 

DTWAIN constant

Value

DTWAIN_ARRAYLONG        

2

DTWAIN_ARRAYFLOAT        

3

DTWAIN_ARRAYSTRING        

4

DTWAIN_ARRAYFRAME        

7

 

For most cases, the Source argument should be NULL to DTWAIN_GetCapArrayType. The only exception is if the capability is a custom capability, the Source argument to DTWAIN_GetCapArrayType must be an open DTWAIN_SOURCE that has been opened.  This is the only way that DTWAIN can determine the data type used for custom capabilities.

 

Note that all integer types are DTWAIN_ARRAYLONG and string types are DTWAIN_ARRAYSTRING.

 

TWAIN State Transitions

The Source must be in State 4 or higher (depending on the capability).

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

DTWAIN Source Selection Function

 

 

See Also

Setting / Getting Twain Capabilities