LTWAINSAVEERRORCALLBACK

#include "lttwn.h"

L_INT pEXT_CALLBACK YourFunction (hSession, pCapability, uError, pUserData)

Called when an error occurs while saving capability data supported by a particular TWAIN source to a specific template file. The address of this callback is passed as an argument in L_TwainTemplateDlg.

Parameters

HTWAINSESSION hSession

Handle to an existing TWAIN session. This handle is obtained by calling the L_TwainInitSession or L_TwainInitSession2 function.

pTW_CAPABILITY pCapability

Pointer to the TW_CAPABILITY structure that references the capability data that was being saved to a specific template file when the error occurred. For more information about TW_CAPABILITY, refer to the TWAIN specification.

L_UINT uError

Error code.

L_VOID * pUserData

A void pointer that you can use to access a variable or structure containing data that your callback function needs. This gives you a way to receive data indirectly from the function that uses this callback function. (This is the same pointer that you pass in the pUserData parameter of L_TwainTemplateDlg.)

Keep in mind that this is a void pointer, which must be cast to the appropriate data type within your callback function.

Returns

Value Meaning
SUCCESS The function was successful.
SUCCESS_RETRY Retry saving the capability value.
SUCCESS_ABORT Abort the saving procedure.
SUCCESS_DELETE Abort saving procedure and delete the file.

Comments

The user should not free the pointer to the TW_CAPABILITY structure within this callback.

Required DLLs and Libraries

See Also

Functions

Topics

Example

For an example, refer to L_TwainTemplateDlg.

Help Version 20.0.2020.4.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS TWAIN C API Help