License Initialization
Get a Trial License
You can request a 30-day trial license via the Request a Trial License link.
You can contact our support team via the Contacting Us link when:
- You want request for an Offline trial license.
- Your license generation failed.
Get a Full License
Contact us to purchase a full license.
Set the License In the Code
The following shows how to set the license in the code.
- JavaScript
- C
- C++
- C#
- Java
- Android
- Objective-C
- Swift
- Python
Dynamsoft.License.LicenseManager.initLicense("YOUR-LICENSE-KEY");
char errorBuf[512]; DBR_InitLicense("YOUR-LICENSE-KEY", errorBuf, 512); void* barcodeReader = DBR_CreateInstance(); // add further process
int errorCode = 1; char errorMsg[512]; errorCode = CLicenseManager::InitLicense("YOUR-LICENSE-KEY", errorMsg, 512); if (errorCode != EC_OK) cout << "License initialization error: " << errorMsg << endl; CCaptureVisionRouter *cvRouter = new CCaptureVisionRouter; // add further process
int errorCode = 0; string errorMsg; errorCode = LicenseManager.InitLicense("--Enter Your License Key Here--", out errorMsg); if (errorCode != (int)EnumErrorCode.EC_OK && errorCode != (int)EnumErrorCode.EC_LICENSE_CACHE_USED) { Console.WriteLine("License initialization error: " + errorMsg); } else { CaptureVisionRouter cvRouter = new CaptureVisionRouter(); // add code for further process }
BarcodeReader.initLicense("YOUR-LICENSE-KEY"); BarcodeReader reader = new BarcodeReader(); // add further process
LicenseManager.initLicense("YOUR-LICENSE-KEY", this, (isSuccess, error) -> { if (!isSuccess) { error.printStackTrace(); } });
[DSLicenseManager initLicense:@"YOUR-LICENSE-KEY" verificationDelegate:self]; - (void)onLicenseVerified:(BOOL)isSuccess error:(nullable NSError *)error { if (!isSuccess && error != nil) { NSLog(@"error: %@", error); } }
LicenseManager.initLicense("YOUR-LICENSE-KEY", verificationDelegate: self) func onLicenseVerified(_ isSuccess: Bool, error: Error?) { if !isSuccess { if let error = error { print("\(error.localizedDescription)") } } }
error_code, error_msg = LicenseManager.init_license("--Enter Your License Key Here--") if error_code != EnumErrorCode.EC_OK.value and error_code != EnumErrorCode.EC_LICENSE_CACHE_USED.value: print("License initialization error: " + error_msg) else: cvr_instance = CaptureVisionRouter() # add code for further process
If you are using a concurrent instance license
, see Concurrent Instance License Initialization for more information.