DTWAIN_GetAcquireStripSizes

Top  Previous  Next

The DTWAIN_GetAcquireStripSizes function gets the minimum, maximum, and preferred buffer size when a buffered image acquisition is requested.

 

DTWAIN_BOOL DTWAIN_GetAcquireStripSizes (

DTWAIN_SOURCE

Source,

LPLONG

lpMinSize,

LPLONG

lpMaxSize,

LPLONG

lpPreferredSize );

 

Parameters

Source

An open TWAIN Source.

 

lpMinSize

Address of where minimum buffer size will be stored on return, or NULL.

 

lpMaxSize

Address of where maximum buffer size will be stored on return, or NULL.

 

lpPreferredSize

Address of where preferred buffer size will be stored on return, or NULL.

 

Return Values

The return value is TRUE if successful.  Otherwise FALSE is returned.

 

Comments

The DTWAIN_GetAcquireStripSizes function gets the minimum, maximum, and preferred buffer sizes whenever an image is acquired using the buffered memory transfer.  If lpMinSize, lpMaxSize, or lpPreferredSize is NULL or 0, the parameter is ignored.

 

Bufffered images are acquired when a call to

 

DTWAIN_AcquireBuffered is invoked
DTWAIN_AcquireFile or DTWAIN_AcquireFileEx is called with the DTWAIN_USEBUFFERED flag is used,
DTWAIN_AcquireToClipboard when DTWAIN_USEBUFFERED flag is used.

 

The DTWAIN_GetAcquireStripSizes function is useful if your application desires to set the size of the buffer when acquiring images, overriding the values used by DTWAIN.  Note that when overriding the strip size, you must also supply a buffer of that size to store the image strips.  To use a buffer size and buffer other than the default, call DTWAIN_SetAcquireStripBuffer.

 

Example

 

LONG BufMin,  BufMax, BufPref;

DTWAIN_SOURCE Source;

//...

DTWAIN_GetAcquireStripSizes( Source, &BufMin, &BufMax, &BufPref );

printf( "Min Size = %d\nMax size = %d\nPref size = %d", BufMin, BufMax, BufPref);

//...

 

TWAIN State Transitions

The Source must be in State 4 or higher

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

 

DTWAIN Source Selection Function

 

 

See Also

Buffered Image Transfer Support