MENU
Table of contents

Thanks for downloading Dynamsoft Barcode Reader Package!

Your download will start shortly. If your download does not begin, click here to retry.

C API Reference - Result Methods

Method Description
DBR_GetAllTextResults Get all recognized barcode results.
DBR_FreeTextResults Free memory allocated for text results.
DBR_GetIntermediateResults Get intermediate results.
DBR_FreeIntermediateResults Free memory allocated for the intermediate results.

DBR_GetAllTextResults

Get all recognized barcode results.

DBR_API int DBR_GetAllTextResults (void* barcodeReader, TextResultArray** pResults)	

Parameters

[in] barcodeReader Handle of the barcode reader instance.
[out] pResults Barcode text results returned by last calling function DBR_DecodeFile / DBR_DecodeFileInMemory / DBR_DecodeBuffer / DBR_DecodeBase64String / DBR_DecodeDIB. The results is allocated by SDK and should be freed by calling function DBR_FreeTextResults.

Return value

Returns error code (returns 0 if the function operates successfully).
You can call DBR_GetErrorString to get detailed error message.

Code Snippet

void* barcodeReader = DBR_CreateInstance();
DBR_InitLicense(barcodeReader, "t0260NwAAAHV***************");
TextResultArray* pResults;
int errorCode = DBR_DecodeFile(barcodeReader, "C:\\Program Files (x86)\\Dynamsoft\\{Version number}\\Images\\AllSupportedBarcodeTypes.tif", "");
DBR_GetAllTextResults(barcodeReader, &pResults);
DBR_FreeTextResults(&pResults);
DBR_DestroyInstance(barcodeReader);

 

DBR_FreeTextResults

Free memory allocated for text results.

DBR_API void DBR_FreeTextResults (TextResultArray** pResults)	

Parameters

[in] pResults Text results.

Code Snippet

void* barcodeReader = DBR_CreateInstance();
DBR_InitLicense(barcodeReader, "t0260NwAAAHV***************");
TextResultArray* pResults;
int errorCode = DBR_DecodeFile(barcodeReader, "C:\\Program Files (x86)\\Dynamsoft\\{Version number}\\Images\\AllSupportedBarcodeTypes.tif", "");
DBR_GetAllTextResults(barcodeReader, &pResults);
DBR_FreeTextResults(&pResults);
DBR_DestroyInstance(barcodeReader);

 

DBR_GetIntermediateResults

Return intermediate results containing the original image, the colour clustered image, the binarized image, contours, lines, text blocks, etc.

DBR_API int DBR_GetIntermediateResults (void* barcodeReader, IntermediateResultArray** pResult)	

Parameters

[in] barcodeReader Handle of the barcode reader instance.
[out] pResult The intermediate results returned by the SDK.

Return value

Returns error code. Possible return(s): DBR_OK.
You can call DBR_GetErrorString to get detailed error message.

Code Snippet

void* barcodeReader = DBR_CreateInstance();
DBR_InitLicense(barcodeReader, "t0260NwAAAHV***************");
PublicRuntimeSettings settings;
DBR_GetRuntimeSettings(barcodeReader, &settings);
settings.intermediateResultTypes = IRT_ORIGINAL_IMAGE | IRT_COLOUR_CLUSTERED_IMAGE | IRT_COLOUR_CONVERTED_GRAYSCALE_IMAGE;
char errorMessage[256];
DBR_UpdateRuntimeSettings(barcodeReader, &settings, errorMessage, 256);
DBR_DecodeFile(barcodeReader, "C:\\Program Files (x86)\\Dynamsoft\\{Version number}\\Images\\AllSupportedBarcodeTypes.tif", "");
IntermediateResultArray* pResults = NULL;
DBR_GetIntermediateResults(barcodeReader, &pResults);
DBR_FreeIntermediateResults(&pResults);
DBR_DestroyInstance(barcodeReader);

 

DBR_FreeIntermediateResults

Frees memory allocated for the intermediate results.

DBR_API void DBR_FreeIntermediateResults (IntermediateResultArray** pResults)

Parameters

[in] pResults The intermediate results.

Code Snippet

void* barcodeReader = DBR_CreateInstance();
DBR_InitLicense(barcodeReader, "t0260NwAAAHV***************");
PublicRuntimeSettings settings;
DBR_GetRuntimeSettings(barcodeReader, &settings);
settings.intermediateResultTypes = IRT_ORIGINAL_IMAGE | IRT_COLOUR_CLUSTERED_IMAGE | IRT_COLOUR_CONVERTED_GRAYSCALE_IMAGE;
char errorMessage[256];
DBR_UpdateRuntimeSettings(barcodeReader, &settings, errorMessage, 256);
DBR_DecodeFile(barcodeReader, "C:\\Program Files (x86)\\Dynamsoft\\{Version number}\\Images\\AllSupportedBarcodeTypes.tif", "");
IntermediateResultArray* pResults = NULL;
DBR_GetIntermediateResults(barcodeReader, &pResults);
DBR_FreeIntermediateResults(&pResults);
DBR_DestroyInstance(barcodeReader);

This page is compatible for:

Version 7.5

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest Version
    • version 7.6
    • version 7.5
    Change +
    © 2003–2020 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support