Products | Support | Send comments on this topic. | Email a link to this topic. | Back to Getting Started | Help Version 18.0.10.23
LEADTOOLS TWAIN C DLL Help

LTWAINSAVECAPCALLBACK Function

Show in webframe

#include "lttwn.h"

L_INT pEXT_CALLBACK YourFunction (hSession, pCapability, pUserData)

HTWAINSESSION hSession;

/* handle to an existing TWAIN session */

pTW_CAPABILITY pCapability;

/* pointer to a structure */

L_VOID * pUserData;

/* pointer to additional parameters */

Called for each capability supported by a particular TWAIN source, before saving it to a specific template file. The address of this callback is passed as an argument in L_TwainTemplateDlg.

Parameter

Description

hSession

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

pCapability

Pointer to the TW_CAPABILITY structure that references the capability data to save to the specified template file. For more information about TW_CAPABILITY, refer to the TWAIN 1.9 specification from the site http://www.twain.org/.

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

SUCCESS

The function was successful.

SUCCESS_ABORT

The callback wants to abort the saving procedure.

SUCCESS_DELETE

Abort saving procedure and delete the file.

< 1

An error occurred. Refer to Return Codes.

Comments

The user can only modify the capability data before saving it to the specified template file.

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

Required DLLs and Libraries

LTTWN

For a listing of the exact DLLs and Libraries needed, based on the toolkit version, refer to Files To Be Included With Your Application.

See Also

Functions:

L_TwainTemplateDlg.

Topics:

TWAIN Functionality: Callback Functions.

Example

For an example, refer to L_TwainTemplateDlg.

Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.