activate static method
Activates a license using customer credentials and a product reference and saves the license to a file.
param hardwareCode The hardware code on which the license file will be attached, to be retrieved using the GetHostHardwareCode function. param login The id3 account login. param password The id3 account password. param productReference The requested product reference. param commentary Commentary associated to this license activation. param path Path to the retrieved license file. throws BiosealException An error has occurred during Bioseal Library execution.
Implementation
static void activate(String? hardwareCode, String? login, String? password, String? productReference, String? commentary, String? path) {
Pointer<Char>? pHardwareCode = hardwareCode?.toNativeUtf8().cast<Char>();
Pointer<Char>? pLogin = login?.toNativeUtf8().cast<Char>();
Pointer<Char>? pPassword = password?.toNativeUtf8().cast<Char>();
Pointer<Char>? pProductReference = productReference?.toNativeUtf8().cast<Char>();
Pointer<Char>? pCommentary = commentary?.toNativeUtf8().cast<Char>();
Pointer<Char>? pPath = path?.toNativeUtf8().cast<Char>();
try {
var err = biosealSDK.id3BiosealLicense_Activate(pHardwareCode ?? nullptr, pLogin ?? nullptr, pPassword ?? nullptr, pProductReference ?? nullptr, pCommentary ?? nullptr, pPath ?? nullptr);
if (err != BiosealError.success.value) {
throw BiosealException(err);
}
} finally {
if (pHardwareCode != null) {
calloc.free(pHardwareCode);
}
if (pLogin != null) {
calloc.free(pLogin);
}
if (pPassword != null) {
calloc.free(pPassword);
}
if (pProductReference != null) {
calloc.free(pProductReference);
}
if (pCommentary != null) {
calloc.free(pCommentary);
}
if (pPath != null) {
calloc.free(pPath);
}
}
}