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
DLR_CreateInstance Creates a Dynamsoft Label Recognition instance.
DLR_DestroyInstance Destroys an instance of Dynamsoft Label Recognition.
DLR_InitLicense Sets product key and activates the SDK.
DLR_InitLTSConnectionParameters Initializes a DM_LTSConnectionParameters struct with default values.
DLR_InitLicenseFromLTS Initializes the label recognition license and connects to the specified server for online verification.

DLR_CreateInstance

Create an instance of Dynamsoft Label Recognition.

DLR_API void* DLR_CreateInstance ()	

Return Value Returns an instance of Dynamsoft Label Recognition. If failed, returns NULL.

Code Snippet

void* recognizer = DLR_CreateInstance();
DLR_InitLicense(recognizer, "t0260NwAAAHV***************");
DLR_DestroyInstance(recognizer);

 

DLR_DestroyInstance

Destroy the instance of Dynamsoft Label Recognition.

DLR_API void DLR_DestroyInstance (void* recognizer)	

Parameters [in] recognizer Handle of the Dynamsoft Label Recognition instance.

Code Snippet

void* recognizer = DLR_CreateInstance();
DLR_InitLicense(recognizer, "t0260NwAAAHV***************");
DLR_DestroyInstance(recognizer);

DLR_InitLicense

Sets product key and activate the SDK.

DLR_API int DLR_InitLicense (void* recognizer, const char* pLicense)

Parameters [in] recognizer Handle of the label recognition instance.
[in] pLicense The product keys.

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

Code Snippet

void* recognizer = DLR_CreateInstance();
DLR_InitLicense(recognizer, "t0260NwAAAHV***************");
DLR_DestroyInstance(recognizer);

 

DLR_InitLTSConnectionParameters

Initializes a DM_LTSConnectionParameters struct with default values.

DLR_API int DLR_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 DLR_GetErrorString to get detailed error message.

Code Snippet

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

 

DLR_InitLicenseFromLTS

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

DLR_API int DLR_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 DLR_GetErrorString to get detailed error message.

Code Snippet

char errorBuf[512];
DMLTSConnectionParameters paramters;
DLR_InitLTSConnectionParameters(&paramters);
paramters.handshakeCode = "Your handshake code";
DLR_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