LTwain::GetCustomDSData

#include "ltwrappr.h"

L_INT LTwain::GetCustomDSData(pCustomData, pszFileName)

Gets the custom data of the TWAIN data source and save it to a file. This feature is available in version 16 or higher.

Parameters

pTW_CUSTOMDSDATA pCustomData

Pointer to a TW_CUSTOMDSDATA structure. This structure must be allocated and it will be filled with the custom data source data. For more information, refer to the TWAIN specification.

L_TCHAR * pszFileName

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

Returns

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

Comments

To set the custom data of the TWAIN data source, call the LTwain::SetCustomDSData function.

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

Required DLLs and Libraries

See Also

Functions

Topics

Example

L_INT LTwain__GetCustomDSDataExample(LTwain * plTwain, L_TCHAR * pszFileName) 
{ 
   L_INT nRet; 
   TW_CUSTOMDSDATA twData; 
 
   memset(&twData, 0, sizeof(TW_CUSTOMDSDATA)); 
   nRet = plTwain->GetCustomDSData(&twData, pszFileName); 
   if(nRet != SUCCESS) 
   { 
      MessageBox (NULL, TEXT("Failed to get custom data source data"), TEXT("ERROR"), 
MB_OK); 
      return nRet; 
   } 
 
   return SUCCESS; 
} 
Help Version 21.0.2021.7.2
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2021 LEAD Technologies, Inc. All Rights Reserved.

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