DTWAIN_ArrayFindANSIString

Top  Previous  Next

The DTWAIN_ArrayFindANSIString function searches for a string value in a DTWAIN_ARRAY.

 

LONG DTWAIN_ArrayFindANSIString (

DTWAIN_ARRAY

Array,

LPCSTR

Value );

 

Parameters

Array

DTWAIN_ARRAY to search.

 

Value

String to search for

 

Return Values

If the function succeeds, the zero-based position of the element is returned.  Otherwise -1 is returned if the element cannot be found, or another error has been encountered.

 

Comments

DTWAIN_ArrayFindANSIString is a specialized version of DTWAIN_ArrayFind for string values.

 

The DTWAIN_ArrayFindANSIString function searches the DTWAIN_ARRAY Array, and returns the position of the first element that is equal to string pointed to by Value.  Note that the string Value must be a null-terminated string.

 

This function will only work for DTWAIN_ARRAY's that can store wide (Unicde) or 16-bit character strings values.  The DTWAIN_ARRAY must be created  with

 

1) The DTWAIN_ARRAYANSISTRING style

or

2) with the DTWAIN_ARRAYSTRING style if using the ANSI version of the DTWAIN library (DTWAIN32.DLL, DTWAIN64.DLL).

 

To search for 8-bit character strings, use DTWAIN_ArrayFindANSIString.

 

 

TWAIN State Transitions

None.

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

See Also

Adding, Setting, and Inserting