←Select platform

KernelExpired Property

Summary
Checks whether the LEADTOOLS kernel has expired.
Syntax
C#
Objective-C
C++/CLI
Java
Python
public static bool KernelExpired { get; } 
+ (BOOL)kernelExpired 
public static boolean getKernelExpired(); 
public: 
static property bool KernelExpired { 
   bool get(); 
} 
KernelExpired # get  (RasterSupport) 

Property Value

true if the LEADTOOLS kernel has expired; false, otherwise.

Example
C#
Java
using Leadtools; 
 
 
public void LeadtoolsKernelExample() 
{ 
	// show current kernel 
	switch (RasterSupport.KernelType) 
	{ 
		case RasterKernelType.Release: 
			Console.WriteLine("Release kernel"); 
			break; 
 
		case RasterKernelType.Evaluation: 
			Console.WriteLine("Evaluation kernel"); 
			// show if the kernel has expired 
			if (RasterSupport.KernelExpired) 
				Console.WriteLine("Evaluation kernel has expired"); 
			else 
				Console.WriteLine("Evaluation kernel has not expired yet"); 
			break; 
	} 
} 
 
import java.io.File; 
import java.io.FileInputStream; 
import java.io.IOException; 
import java.io.InputStream; 
import java.nio.file.Files; 
import java.nio.file.Paths; 
 
import org.junit.*; 
import org.junit.Test; 
import org.junit.runner.JUnitCore; 
import org.junit.runner.Result; 
import org.junit.runner.notification.Failure; 
import static org.junit.Assert.*; 
 
import leadtools.*; 
 
 
public void kernelExpiredExample() throws IOException { 
   Platform.setLibPath("C:\\LEADTOOLS23\\Bin\\CDLL\\x64"); 
   Platform.loadLibrary(LTLibrary.LEADTOOLS); 
   final String licensePath = "C:\\LEADTOOLS23\\Support\\Common\\License\\LEADTOOLS.LIC"; 
   final String myDevKey = Files.readString(Paths.get(licensePath + ".KEY")); 
 
   RasterSupport.setLicense(licensePath, myDevKey); 
 
   switch (RasterSupport.getKernelType()) { 
      case RELEASE: 
         assertTrue("Kernel is not the release version.", RasterSupport.getKernelType() == RasterKernelType.RELEASE); 
         System.out.println("Kernel is the release version."); 
         break; 
      case EVALUATION: 
         assertTrue("Kernel is not a release or evaluation version.", RasterSupport.getKernelType() == RasterKernelType.EVALUATION); 
         System.out.println("Kernel is the evaluation version."); 
 
         System.out.print(RasterSupport.getKernelExpired()); 
         assertTrue("Kernel has expired.", !RasterSupport.getKernelExpired()); 
         System.out.println("Evaluation kernel has not expired yet."); 
         break; 
      default: 
         System.out.println("Kernel is neither a release nor evaluation version. Something is likely wrong with the provided path."); 
   } 
} 
Requirements

Target Platforms

Help Version 23.0.2024.5.22
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2024 LEAD Technologies, Inc. All Rights Reserved.

Leadtools Assembly
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2023 LEAD Technologies, Inc. All Rights Reserved.