L_LTTWN_API L_INT L_TwainOpenTemplateFile (hSession, phFile, lpszTemplateFile, uAccess)
Opens the specified template file for loading or saving data.
Pointer to a HTWAINTEMPLATEFILE file handle.
Character string that contains the name of the template file to open. A LEADTOOLS template files extension is .ltt.
Flag that indicates the access type for opening the file. Possible values are:
|LTWAIN_TEMPLATE_OPEN_READ|| Open the template file for reading. This should be used to load data from an existing template file.|
|LTWAIN_TEMPLATE_OPEN_WRITE|| Open the template file for writing. This should be used to save data to a template file.|
|SUCCESS||The function was successful.|
|! = SUCCESS||An error occurred. Refer to Return Codes.|
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
For an example, refer to L_TwainAddCapabilityToFile.