#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.
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.
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.
| Value | Meaning |
|---|---|
| SUCCESS | The function was successful. |
| < 1 | An error occurred. Refer to Return Codes. |
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
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;}