Documentation
Table of contents

Thanks for downloading Dynamsoft Label Recognizer Package!

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

CLicenseManager Class

class dynamsoft::core::CLicenseManager 
Method Description
GetIdleInstancesCount Gets available instances count when charging by concurrent instances count.
InitLicense Sets the license key and activates the SDK.

GetIdleInstancesCount

Gets available instances count when charging by concurrent instances count.

static int 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 InitLicense.
  • N ( N > 0 ): N more instances can be created.

Code Snippet

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

InitLicense

Sets the license key and activates the SDK.

static int InitLicense(const char *license, char errorMsgBuffer[], const int errorMsgBufferLen) 

Parameters

[in] pLicense The license key.

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

[in] errorMsgBufferLen The length of the allocated buffer.

Return Value

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

Code Snippet

int errorCode = 0;
char szErrorMsg[256];
errorCode = CLicenseManager::InitLicense("YOUR-LICENSE-KEY", szErrorMsg, 256);
if (errorCode != DM_OK)
    cout << szErrorMsg << endl;

This page is compatible for:

Version 7.5.0

Is this page helpful?

YesYes NoNo

In this article:

latest version

    • Latest version(3.2.20)
    • Version 3.x
      • Version 3.2.10
      • Version 3.2.0
      • Version 3.0.30
      • Version 3.0.20
      • Version 3.0.10
      • Version 3.0.0
    • Version 2.x
      • Version 2.2.20
      • Version 2.2.11
      • Version 2.2.10
      • Version 2.2.0
      • Version 2.0.0
      • Version 2.2.20
      • Version 2.2.11
      • Version 2.2.10
      • Version 2.2.0
      • Version 2.0.0
      • Version 2.0.0
      • Version 2.0.0
    • Version 1.x
      • Version 1.2.1
      • Version 1.2
      • Version 1.0
      • Version 1.2.1
      • Version 1.2
      • Version 1.0
      • Version 1.2.1
      • Version 1.2
      • Version 1.0
      • Version 1.2.1
    Change +
    © 2003–2024 Dynamsoft. All rights reserved.
    Privacy Statement / Site Map / Home / Purchase / Support