Dev Center
Table of contents

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:

version 9.4.0

  • Latest version
  • Version 10.x
    • Version 10.2.10
    • Version 10.2.0
    • Version 10.0.20
    • Version 10.0.10
    • Version 10.0.0
  • Version 9.x
    • Version 9.6.40
    • Version 9.6.30
    • Version 9.6.20
    • Version 9.6.10
    • Version 9.6.0
    • Version 9.4.0
    • Version 9.2.0
    • 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 +