# getLicenseFileHardwareCode static method

String getLicenseFileHardwareCode()

Retrieves the hardware code of the previously loaded license.

return The license hardware code. throws FaceException An error has occurred during Face Library execution.

## Implementation

    static String getLicenseFileHardwareCode() {
      Pointer<Char> pLicenseFileHardwareCode = calloc.allocate(256);
      Pointer<Int> pLicenseFileHardwareCodeSize = calloc.allocate(1);
      pLicenseFileHardwareCodeSize[0] = 256;
      try {
        var err = faceSDK.id3FaceLicense_GetLicenseFileHardwareCode(pLicenseFileHardwareCode, pLicenseFileHardwareCodeSize);
        if (err == FaceError.insufficientBuffer.value) {
          calloc.free(pLicenseFileHardwareCode);
          pLicenseFileHardwareCode = calloc.allocate(pLicenseFileHardwareCodeSize.value);
          err = faceSDK.id3FaceLicense_GetLicenseFileHardwareCode(pLicenseFileHardwareCode, pLicenseFileHardwareCodeSize);
          if (err != FaceError.success.value) {
            throw FaceException(err);
          }
        }
        final vLicenseFileHardwareCode = utf8.decode(Uint8List.fromList(pLicenseFileHardwareCode.cast<Uint8>().asTypedList(pLicenseFileHardwareCodeSize.value)));
        return vLicenseFileHardwareCode;
      } finally {
        calloc.free(pLicenseFileHardwareCode);
        calloc.free(pLicenseFileHardwareCodeSize);
      }
    }