Table of contents
Swift
Objective-C

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_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_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:

Is this page helpful?

YesYes NoNo

In this article: