DTWAIN_SetMaxRetryAttempts

Top  Previous  Next

The DTWAIN_SetMaxRetryAttempts function sets the maximum number of retries attempted if a page fails to be acquired.

 

DTWAIN_BOOL DTWAIN_SetMaxRetryAttempts (

DTWAIN_SOURCE

Source,

LONG

NumAttempts );

 

Parameters

Source

A DTWAIN_SOURCE denoting a TWAIN Source.

 

NumAttempts

The maximum number of retry attempts or DTWAIN_RETRY_FOREVER

 

Return Values

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

 

Comments

The DTWAIN_SetMaxRetryAttempts function sets the maximum number of retries that the Source Source will attempt before terminating an acquisition.  By default, the Source will allow 3 retry attempts per page berfore terminating an acquisition.  DTWAIN_SetMaxRetryAttempts allows your application to change the number of retry attempts.

 

The NumAttempts must be >= 0 or the constant DTWAIN_RETRY_FOREVER.  If the value is DTWAIN_RETRY_FOREVER, the Source will allow an infinite number of retries to be performed without closing.  If NumAttempts is set to 0, the Source will terminate acquiring images on the first page failure.  To get the maximum number of retry attempts, call DTWAIN_GetMaxRetryAttempts.

 

TWAIN State Transitions

None

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

DTWAIN Source Selection Function

 

See Also

Acquiring Images