Dynamsoft Barcode Reader 6.3.0 - API Reference
Functions

Functions

DBR_API int DBR_InitRuntimeSettingsWithFile (void *hBarcode, const char *pszFilePath, ConflictMode emSettingPriority, char szErrorMsgBuffer[], int nErrorMsgBufferLen)
 
DBR_API int DBR_InitRuntimeSettingsWithString (void *hBarcode, const char *pszContent, ConflictMode emSettingPriority, char szErrorMsgBuffer[], int nErrorMsgBufferLen)
 
DBR_API int DBR_AppendTplFileToRuntimeSettings (void *hBarcode, const char *pszFilePath, ConflictMode emSettingPriority, char szErrorMsgBuffer[], int nErrorMsgBufferLen)
 
DBR_API int DBR_AppendTplStringToRuntimeSettings (void *hBarcode, const char *pszContent, ConflictMode emSettingPriority, char szErrorMsgBuffer[], int nErrorMsgBufferLen)
 
DBR_API int DBR_GetParameterTemplateCount (void *hBarcode)
 
DBR_API int DBR_GetParameterTemplateName (void *hBarcode, int iIndex, char szNameBuffer[], int nNameBufferLen)
 
DBR_API int DBR_OutputSettingsToString (void *hBarcode, char pszContent[], int nContentLen, const char *pszSettingsName)
 
DBR_API int DBR_OutputSettingsToFile (void *hBarcode, const char *pszFilePath, const char *pszSettingsName)
 

Detailed Description

Advanced APIs for customizing parameters in runtime settings to fit specified scenarios.

Function Documentation

◆ DBR_AppendTplFileToRuntimeSettings()

DBR_API int DBR_AppendTplFileToRuntimeSettings ( void *  hBarcode,
const char *  pszFilePath,
ConflictMode  emSettingPriority,
char  szErrorMsgBuffer[],
int  nErrorMsgBufferLen 
)

Append a new template file to current runtime settings.

Parameters
[in]hBarcodeHandle of the barcode reader instance.
[in]pszFilePathThe settings file path.
[in]emSettingPriorityThe parameter setting mode, which decides to inherit parameters from previous template setting or overwrite previous settings and replace by new template.
[in,out]szErrorMsgBufferThe buffer is allocated by caller and the recommending length is 256. The error message would be copy to the buffer.
[in]nErrorMsgBufferLenThe length of allocated buffer.
Returns
Returns error code. Returns 0 if the function completed successfully, otherwise call DBR_GetErrorString to get detail message.
See also
C Functions PublicRuntimeSettings

◆ DBR_AppendTplStringToRuntimeSettings()

DBR_API int DBR_AppendTplStringToRuntimeSettings ( void *  hBarcode,
const char *  pszContent,
ConflictMode  emSettingPriority,
char  szErrorMsgBuffer[],
int  nErrorMsgBufferLen 
)

Append a new template string to current runtime settings.

Parameters
[in]hBarcodeHandle of the barcode reader instance.
[in]pszContentA JSON string that represents the content of the settings.
[in]emSettingPriorityThe parameter setting mode, which decides to inherit parameters from previous template setting or overwrite previous settings and replace by new template.
[in,out]szErrorMsgBufferThe buffer is allocated by caller and the recommending length is 256. The error message would be copy to the buffer.
[in]nErrorMsgBufferLenThe length of allocated buffer.
Returns
Returns error code. Returns 0 if the function completed successfully, otherwise call DBR_GetErrorString to get detail message.
See also
C Functions PublicRuntimeSettings

◆ DBR_GetParameterTemplateCount()

DBR_API int DBR_GetParameterTemplateCount ( void *  hBarcode)

Get count of parameter template.

Parameters
[in]hBarcodeHandle of the barcode reader instance.
Returns
Returns the count of parameter template.

◆ DBR_GetParameterTemplateName()

DBR_API int DBR_GetParameterTemplateName ( void *  hBarcode,
int  iIndex,
char  szNameBuffer[],
int  nNameBufferLen 
)

Get paramter template name by index.

Parameters
[in]hBarcodeHandle of the barcode reader instance.
[in]iIndexThe index of parameter template array.
[in,out]szNameBufferThe buffer is allocated by caller and the recommended length is 256. The template name would be copy to the buffer.
[in]nNameBufferLenThe length of allocated buffer
Returns
Returns error code. Returns 0 if the function completed successfully, otherwise call DBR_GetErrorString to get detail message.

◆ DBR_InitRuntimeSettingsWithFile()

DBR_API int DBR_InitRuntimeSettingsWithFile ( void *  hBarcode,
const char *  pszFilePath,
ConflictMode  emSettingPriority,
char  szErrorMsgBuffer[],
int  nErrorMsgBufferLen 
)

Initialize runtime settings with the parameters obtained from JSON file.

Parameters
[in]hBarcodeHandle of the barcode reader instance.
[in]pszFilePathThe settings file path.
[in]emSettingPriorityThe parameter setting mode, which decides to inherit parameters from previous template setting or overwrite previous settings and replace by new template.
[in,out]szErrorMsgBufferThe buffer is allocated by caller and the recommending length is 256. The error message would be copy to the buffer.
[in]nErrorMsgBufferLenThe length of allocated buffer.
Returns
Returns error code. Returns 0 if the function completed successfully, otherwise call DBR_GetErrorString to get detail message.
See also
C Functions PublicRuntimeSettings

◆ DBR_InitRuntimeSettingsWithString()

DBR_API int DBR_InitRuntimeSettingsWithString ( void *  hBarcode,
const char *  pszContent,
ConflictMode  emSettingPriority,
char  szErrorMsgBuffer[],
int  nErrorMsgBufferLen 
)

Initialize runtime settings with the parameters obtained from JSON string.

Parameters
[in]hBarcodeHandle of the barcode reader instance.
[in]pszContentA JSON string that represents the content of the settings.
[in]emSettingPriorityThe parameter setting mode, which decides to inherit parameters from previous template setting or overwrite previous settings and replace by new template.
[in,out]szErrorMsgBufferThe buffer is allocated by caller and the recommending length is 256. The error message would be copy to the buffer.
[in]nErrorMsgBufferLenThe length of allocated buffer.
Returns
Returns error code. Returns 0 if the function completed successfully, otherwise call DBR_GetErrorString to get detail message.
See also
C Functions PublicRuntimeSettings

◆ DBR_OutputSettingsToFile()

DBR_API int DBR_OutputSettingsToFile ( void *  hBarcode,
const char *  pszFilePath,
const char *  pszSettingsName 
)

Outputs runtime settings and save it into a settings file (JSON file).

Parameters
[in]hBarcodeHandle of the barcode reader instance.
[in]pszFilePathThe output file path which stores current settings.
[in]pszSettingsNameA unique name for declaring current runtime settings.
Returns
Returns error code. Returns 0 if the function completed successfully, otherwise call DBR_GetErrorString to get detail message.

◆ DBR_OutputSettingsToString()

DBR_API int DBR_OutputSettingsToString ( void *  hBarcode,
char  pszContent[],
int  nContentLen,
const char *  pszSettingsName 
)

Outputs runtime settings to a string.

Parameters
[in]hBarcodeHandle of the barcode reader instance.
[in,out]pszContentThe output string which stores the contents of current settings.
[in]nContentLenThe length of output string.
[in]pszSettingsNameA unique name for declaring current runtime settings.
Returns
Returns error code. Returns 0 if the function completed successfully, otherwise call DBR_GetErrorString to get detail message.