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

L_TwainOpenTemplateFile

Show in webframe

#include "lttwn.h"

L_LTTWN_API L_INT L_TwainOpenTemplateFile (hSession, phFile, lpszTemplateFile, uAccess)

HTWAINSESSION hSession;

/* handle to an existing TWAIN session */

HTWAINTEMPLATEFILE * phFile;

/* handle to an existing template file */

L_TCHAR * lpszTemplateFile;

/* pointer to a character string */

L_UINT uAccess;

/* optional flag */

Opens the specified template file for loading or saving data.

Parameter

Description

hSession

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

phFile

Pointer to a HTWAINTEMPLATEFILE file handle.

lpszTemplateFile

Character string that contains the name of the template file to open. A LEADTOOLS template files extension is .ltt.

uAccess

Flag that indicates the access type for opening the file. Possible values are:

 

Value

Meaning

 

LTWAIN_TEMPLATE_OPEN_READ

[0] Open the template file for reading. This should be used to load data from an existing template file.

 

LTWAIN_TEMPLATE_OPEN_WRITE

[1] Open the template file for writing. This should be used to save data to a template file.

Returns

SUCCESS

The function was successful.

! = SUCCESS

An error occurred. Refer to Return Codes.

Comments

Slight rewording.

A template file can be opened for either reading or writing, but not both.

For more information on template files, refer to Handling Template Files.

When a file is opened for writing, a new file is created.

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, L_TwainAddCapabilityToFile, L_TwainGetCapabilityFromFile, L_TwainGetNumOfCapsInFile, L_TwainCloseTemplateFile, L_TwainInitSession, L_TwainEndSession

Topics:

Handling Template Files

 

TWAIN Functionality: Template File Functions.

Example

For an example, refer to L_TwainAddCapabilityToFile.

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