The DTWAIN_ArrayAddWideStringN function adds N copies of a string value to the end of a DTWAIN_ARRAY.
DTWAIN_BOOL DTWAIN_ArrayAddWideStringN (
DTWAIN_ARRAY
|
Array,
|
LPCWSTR
|
Value,
|
LONG
|
NumCopies);
|
Parameters
Array
DTWAIN_ARRAY that the value will be added to.
Value
Pointer to character buffer.
NumCopies
Number of copies of Value to add to the array.
Return Values
If the function succeeds, TRUE is returned. If the function fails FALSE is returned.
Comments
The DTWAIN_ArrayAddWideStringN function appends NumCopies of the contents of the buffer located at Value to the end of the DTWAIN_ARRAY Array. The number of elements in the DTWAIN_ARRAY is increased by NumCopies.
For example, if Array currently has two values: L"Name1", and L"Name2",
DTWAIN_ArrayAddWideStringN(Array, L"abc123", 4);
will result in Array containing the following values:
Name1
Name2
|
abc123
|
abc123
|
abc123
|
abc123
|
This function will only work for DTWAIN_ARRAY's that can store 16-bit Unicode 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 insert 8-bit (ANSI) character strings, use DTWAIN_ArrayAddANSIStringN.
TWAIN State Transitions
None.
Prerequisite Function Call(s)
DTWAIN_SysInitialize
See Also
Adding, Setting, and Inserting elements in a DTWAIN_ARRAY
|