getModuleValue static method

int getModuleValue(
  1. String? name
)

Retrieves the value associated to the specified license module.

param name Name of the requested module. return The value associated to the licence module. throws BiosealException An error has occurred during Bioseal Library execution.

Implementation

static int getModuleValue(String? name) {
  Pointer<Char>? pName = name?.toNativeUtf8().cast<Char>();
  Pointer<Int> pValue = calloc();
  try {
    var err = biosealSDK.id3BiosealLicense_GetModuleValue(pName ?? nullptr, pValue);
    if (err != BiosealError.success.value) {
      throw BiosealException(err);
    }
    final vValue = pValue.value;
    return vValue;
  } finally {
    if (pName != null) {
      calloc.free(pName);
    }
    calloc.free(pValue);
  }
}