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_TwainGetCustomDSData

Show in webframe

#include "lttwn.h"

L_LTTWN_API L_INT EXT_FUNCTION L_TwainGetCustomDSData(hSession, pCustomData, pszFileName)

HTWAINSESSION hSession;

/* handle to an existing TWAIN session */

pTW_CUSTOMDSDATA pCustomData;

/* pointer to TW_CUSTOMDSDATA structure to be filled */

L_TCHAR * pszFileName;

/* file name to save */

Gets the custom data of TWAIN data source and save it to a file.

This feature is available in version 16 or higher.

Parameter

Description

hSession

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

pCustomData

Pointer to a TW_CUSTOMDSDATA structure. This structure must be allocated and it will be filled with custom data source data. For more information refer to the TWAIN 1.9 specification from the site "http://www.twain.org/".

pszFileName

Character string that contains file name to save the custom data of TWAIN data source to. Pass NULL to not save the data to a file.

Returns

SUCCESS

The function was successful.

< 1

An error occurred. Refer to Return Codes.

Comments

This function should be called after calling the L_TwainStartCapsNeg function and before calling the L_TwainEndCapsNeg function.

To update the custom data of TWAIN data source, call the L_TwainSetCustomDSData function.

To save the custom data of TWAIN data source to a file, pass valid file name to the pszFileName. If you pass NULL, the data will return only to pCustomData. Also, you should pass valid pointer to TW_CUSTOMDSDATA to pCustomData.

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_TwainSetCustomDSData, L_TwainGetCapability, L_TwainSetCapability

Topics:

Getting and Setting Capabilities

 

TWAIN Functionality: Capability Functions

Example

 L_INT TwainGetCustomDSDataExample(HTWAINSESSION hSession, L_TCHAR * pszFileName)
{
   L_TwainStartCapsNeg(hSession);
   L_INT nRet;
   TW_CUSTOMDSDATA twData;
   memset(&twData, 0, sizeof(TW_CUSTOMDSDATA));
   nRet = L_TwainGetCustomDSData(hSession, &twData, pszFileName);
   if (nRet != SUCCESS) 
   {
      MessageBox (NULL, TEXT("Failed to get custom data source data"), TEXT("ERROR"), MB_OK);
      return nRet;
   }
   L_TwainEndCapsNeg(hSession);
   return SUCCESS;
}
Products | Support | Contact Us | Copyright Notices
© 2006-2014 All Rights Reserved. LEAD Technologies, Inc.