DTWAIN_ARRAY Creation and Initialization

Top  Previous  Next

The DTWAIN library serves as a 'factory' or 'warehouse' of DTWAIN_ARRAY types.  If your application wants to store values within a DTWAIN_ARRAY, the array must be initialized before it can be used.  This makes any necessary cleanup of arrays less error prone, and less likely to cause memory leaks within your application.

 

The functions used to create and initialize a DTWAIN_ARRAY are as follows:

 

DTWAIN_ArrayCreate

DTWAIN_ArrayCreateFromCap

DTWAIN_ArrayCreateCopy

 

 

There are some DTWAIN functions that do not need an initialized DTWAIN_ARRAY (in other words, the application needs only to declare a variable of type DTWAIN_ARRAY without having to initialize it).  For example, the DTWAIN_GetCapValues function takes the address of a DTWAIN_ARRAY (an LPDTWAIN_ARRAY) and internally initializes the array to the correct data type.