DTWAIN_ArrayFindWideString

Top  Previous  Next

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

 

LONG DTWAIN_ArrayFindWideString (

DTWAIN_ARRAY

Array,

LPCWSTR

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_ArrayFindWideString is a specialized version of DTWAIN_ArrayFind for string values.

 

The DTWAIN_ArrayFindWideString 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_ARRAYWIDESTRING style

or

2) with the DTWAIN_ARRAYSTRING style if using the Unicode version of the DTWAIN library (DTWAIN32U.DLL, DTWAIN64U.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