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.

C++ API Reference - Initialization

Method Description
InitLicense Sets product key and activates the SDK.
InitLTSConnectionParameters Initializes a DM_LTSConnectionParameters struct with default values.
InitLicenseFromLTS Initializes the label recognition license and connects to the specified server for online verification.

InitLicense

Sets product key and activate the SDK.

int InitLicense (const char *license)

Parameters [in] license The product key.

Return Value Returns error code. Returns 0 if the function completed successfully, otherwise call GetErrorString to get detailed message.

Possible returns are: DLR_OK;

Code Snippet

CLabelRecognition* recognizer = new CLabelRecognition();
recognizer->InitLicense("t0260NwAAAHV***************");
delete recognizer;

InitLTSConnectionParameters

Initializes a DM_LTSConnectionParameters struct with default values.

static int dynamsoft::dlr::CLabelRecognition::InitLTSConnectionParameters (DM_LTSConnectionParameters *pLTSConnectionParameters)

Parameters [in, out] pLTSConnectionParameters The struct of DM_LTSConnectionParameters.

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

Code Snippet

char errorBuf[512];
DMLTSConnectionParameters paramters;
InitLTSConnectionParameters(&paramters);
paramters.handshakeCode = "Your handshake code";
InitLicenseFromLTS(&paramters, errorBuf, 512);

 

InitLicenseFromLTS

Initializes the label recognition license and connects to the specified server for online verification.

static int dynamsoft::dlr::CLabelRecognition::InitLicenseFromLTS(DM_LTSConnectionParameters *pLTSConnectionParameters, char errorMsgBuffer[], const int errorMsgBufferLen)

Parameters [in] pLTSConnectionParameters The struct DM_LTSConnectionParameters with customized settings.
[in, out] errorMsgBuffer The buffer is allocated by caller and the recommending length is 256. 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 GetErrorString to get detailed error message.

Code Snippet

char errorBuf[512];
DMLTSConnectionParameters paramters;
InitLTSConnectionParameters(&paramters);
paramters.handshakeCode = "Your handshake code";
InitLicenseFromLTS(&paramters, errorBuf, 512);

 

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