DTWAIN_SetErrorCallback64

Top  Previous  Next

The DTWAIN_SetErrorCallback64 allows an application to use a callback function that will receive the errors generated by DTWAIN functions.

 

DTWAIN_BOOL DTWAIN_SetErrorCallback64 (

DTWAIN_ERROR_PROC lpProc,


LONG64 userData );



Parameters

lpProc

    A pointer to a function that will be called whenever a DTWAIN error is generated, or NULL to turn off the callback mechanism.


userData

    A 64-bit user-defined data value that will be sent along with the error value.

 

Return Values

TRUE if successful, FALSE otherwise.

 

Comments

DTWAIN_SetErrorCallback64 allows an application to use a callback function for error generated by the DTWAIN library.  The errors are ones usually generated when calling a DTWAIN function, where any errors can be retrieved by calling DTWAIN_GetLastError.

 

The DTWAIN_ERROR_PROC64 is a function pointer with the following prototype:

 

LONG CALLBACK DTWAINErrorrProc64(LONG errorValue, LONG64 userData);

 

where errorValue is the error value, and userData is the original userData that was passed when DTWAIN_SetErrorCallback64 was called.


The callback function should return a value of 1.  Note that currently, DTWAIN ignores the return value, but this may change in future versions of DTWAIN.

 

The DTWAIN_SetErrorCallback64 can be used in conjunction with DTWAIN_SetErrorCallback, with the only difference being that DTWAIN_SetErrorCallback allows only a 32-bit user defined value.  An application can use both DTWAIN_SetErrorCallback and DTWAIN_SetErrorCallback64, since both functions use separate callbacks.


TWAIN State Transitions

None.

 

Prerequisite Function Call(s)

DTWAIN_SysInitialize

DTWAIN_EnableMsgNotify

 

See Also

DTWAIN Acquisition Functions