LTwain::SetCustomDSData

Summary

Sets the custom data of the TWAIN data source. This feature is available in version 16 or higher.

Syntax

#include "ltwrappr.h"

L_INT LTwain::SetCustomDSData(pCustomData, pszFileName)

Parameters

pTW_CUSTOMDSDATA pCustomData

Pointer to a TW_CUSTOMDSDATA structure. This structure must be allocated and contains the custom data of the TWAIN data source to set. Pass NULL if you need to set the data from a file.

L_TCHAR * pszFileName

Character string that contains a file name for the custom data of a valid TWAIN data source to load from. Pass NULL to set the data using the pCustomData.

Returns

Value Meaning
SUCCESS The function was successful.
< 1 An error occurred. Refer to Return Codes.

Comments

To get the custom data of the TWAIN data source, call the LTwain::GetCustomDSData function.

To load the custom data of the TWAIN data source from a file, pass a valid file name to pszFileName and NULL to pCustomData.

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT LTwain__SetCustomDSDataExample(LTwain * plTwain, L_TCHAR * pszFileName) 
{ 
   L_INT nRet; 
   nRet = plTwain->SetCustomDSData(NULL, pszFileName); 
   if(nRet != SUCCESS) 
   { 
      MessageBox (NULL, TEXT("Failed to set custom data source data"), TEXT("ERROR"), 
MB_OK); 
      return nRet; 
   } 
    
   return SUCCESS; 
} 
Help Version 23.0.2024.2.29
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS TWAIN C++ Class Library Help
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.