Web Demos

BARCODE READER SDK DEMO

Explore the flexibe barcode reading settings to optimize for your specific usage scenario.

WEB TWAIN SDK DEMO

Try the most popular web scanner features: scan images, import local images and PDF files, edit, save to local, upload to database, and etc.

BARCODE READER JAVASCRIPT DEMO

Transform any camera-equipped devices into real-time, browser-based barcode and QR code scanners.

MRZ SCANNER WEB DEMO

Detects the machine-readable zone of a passport, scans the text, and parses into human-readable data.

APP STORE DEMOS

BARCODE READER SDK FOR IOS

BARCODE READER SDK FOR ANDROID

VIEW MORE DEMOS >
Dev Center
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.

License Functions

Function Description
DBR_InitLicense Initializes license key and activate the SDK.
DBR_GetIdleInstancesCount Gets available instances count when charging by concurrent instances count.
DBR_SetDeviceFriendlyName Sets a human-readable name that identifies the device.
DBR_InitLicenseFromServer Deprecated
DBR_InitLicenseFromLicenseContent Deprecated
DBR_OutputLicenseToString Deprecated
DBR_OutputLicenseToStringPtr Deprecated
DBR_FreeLicenseString Deprecated
DBR_InitDLSConnectionParameters Deprecated
DBR_InitLicenseFromDLS Deprecated
DBR_InitLTSConnectionParameters Deprecated
DBR_InitLicenseFromLTS Deprecated

DBR_InitLicense

Initializes license key and activate the SDK.

DBR_API int DBR_InitLicense (const char* pLicense, char errorMsgBuffer[], const int errorMsgBufferLen)

Parameters

[in] pLicense The license string.

[in, out] errorMsgBuffer The buffer is allocated by caller and the recommended length is 512. The error message will be copied to the buffer.

[in] errorMsgBufferLen The length of allocated buffer.

Return Value

Returns error code (returns 0 if the function operates successfully).

You can call DBR_GetErrorString to get detailed error message.

Code Snippet

char errorBuf[512];
DBR_InitLicense("YOUR-LICENSE-KEY", errorBuf, 512);
void* barcodeReader = DBR_CreateInstance();
// add further process

DBR_GetIdleInstancesCount

Gets available instances count when charging by concurrent instances count.

DBR_API int DBR_GetIdleInstancesCount()

Return Value

Returns available instances count.

  • 0: There is no space for new instance
  • -1: The available count needs to be updated from server by calling DBR_InitLicense.
  • N ( N > 0 ): N more instances can be created.

Code Snippet

//...
int count = DBR_GetIdleInstancesCount();
if(count > 0)
{
  //create instance and process further
}
if(count < 0)
{
  //call DBR_InitLicense
  //create instance and process further
}
if(count = 0)
{
  //waiting for available instances 
}

DBR_SetDeviceFriendlyName

Sets a human-readable name that identifies the device.

DBR_API int DBR_SetDeviceFriendlyName(const char* name)

Parameters

[in] name The device alias.

Return Value

Returns error code (returns 0 if the function operates successfully).

You can call DBR_GetErrorString to get detailed error message.

Code Snippet

char errorBuf[512];
DBR_SetDeviceFriendlyName("My-PC");
DBR_InitLicense("YOUR-LICENSE-KEY", errorBuf, 512);
void* barcodeReader = DBR_CreateInstance();
// add further process

DBR_InitLicenseFromServer

Deprecated. It still works in this version but could be removed in the near future.

DBR_API int DBR_InitLicenseFromServer (void* barcodeReader, const char* pLicenseServer, const char* pLicenseKey)

DBR_InitLicenseFromLicenseContent

Deprecated. It still works in this version but could be removed in the near future.

DBR_API int DBR_InitLicenseFromLicenseContent (void* barcodeReader, const char* pLicenseKey, const char* pLicenseContent)	

DBR_OutputLicenseToString

Deprecated. It still works in this version but could be removed in the near future.

DBR_API int DBR_OutputLicenseToString (void* barcodeReader, char content[], int contentLen)

DBR_OutputLicenseToStringPtr

Deprecated. It still works in this version but could be removed in the near future.

DBR_API int DBR_OutputLicenseToStringPtr (void* barcodeReader, char** content)

DBR_FreeLicenseString

Deprecated. It still works in this version but could be removed in the near future.

DBR_API void DBR_FreeLicenseString (char** content)

DBR_InitDLSConnectionParameters

Deprecated. It still works in this version but could be removed in the near future.

DBR_API int DBR_InitDLSConnectionParameters (DM_DLSConnectionParameters *pDLSConnectionParameters)

DBR_InitLicenseFromDLS

Deprecated. It still works in this version but could be removed in the near future.

DBR_API int DBR_InitLicenseFromDLS(DM_DLSConnectionParameters *pDLSConnectionParameters, char errorMsgBuffer[], const int errorMsgBufferLen)

DBR_InitLTSConnectionParameters

Deprecated. It still works in this version but could be removed in the near future.

DBR_InitLicenseFromLTS

Deprecated. It still works in this version but could be removed in the near future.

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

  • Latest version
  • Version 9.x
    • Version 9.0.0
  • Version 8.x
    • Version 8.8.0
    • Version 8.6.0
    • Version 8.4.0
    • Version 8.2.0
    • Version 8.1.2
    • Version 8.1.0
    • Version 8.0.0
  • Version 7.x
    • Version 7.6.0
    • Version 7.5.0
Change +
© 2003–2022 Dynamsoft. All rights reserved.
Privacy Statement / Site Map / Home / Purchase / Support