public static void SetLicense(
string licenseFile,
string developerKey
)
+ (BOOL)setLicenseFile:(NSString *)licenseFile
developerKey:(NSString *)developerKey
error:(NSError **)error
public static void setLicense(
String licenseFile,
String developerKey
)
public:
static void SetLicense(
String^ licenseFile,
String^ developerKey
)
def SetLicense(self,licenseFile,developerKey):
licenseFile
Character string containing the name of the LEADTOOLS runtime license file to load.
developerKey
Character string containing the developer key.
You must use this method to set the runtime license for LEADTOOLS and to unlock support for any optional features that you have licensed. If you do not set a RELEASE runtime license, your application will display a nag message dialog at runtime, indicating that you have developed the application without a valid runtime license.
In order to obtain a runtime license and developer key, you must contact LEAD. For more information, refer to About LEADTOOLS Runtime Licenses.
For information about LEADTOOLS Document/Medical capabilities, contact LEAD.
To determine if support for optional features has been unlocked, use IsLocked.
NOTE: As an alternative to calling RasterSupport.SetLicense, you can specify your runtime license in the Leadtools.dll.config file. For more information, see LEADTOOLS Config License.
To set the runtime license from a memory buffer instead of disk file, use SetLicense(byte[] licenseBuffer, string developerKey).
using Leadtools;
public void SetLicenseFileExample()
{
#if DEBUG
LicenseSupport.SetLicense();
#else
string MY_LICENSE_FILE = @"leadtools.lic";
string MY_DEVELOPER_KEY = "xyz123abc";
RasterSupport.SetLicense(MY_LICENSE_FILE, MY_DEVELOPER_KEY);
#endif
bool isLocked = RasterSupport.IsLocked(RasterSupportType.Document);
if (isLocked)
Console.WriteLine("Document support is locked");
else
Console.WriteLine("Document support is unlocked");
}
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 setLicenseExample() throws IOException {
Platform.setLibPath("C:\\LEADTOOLS23\\Bin\\CDLL\\x64");
Platform.loadLibrary(LTLibrary.LEADTOOLS);
Platform.loadLibrary(LTLibrary.CODECS);
final String licensePath = "C:\\LEADTOOLS23\\Support\\Common\\License\\LEADTOOLS.LIC";
final String myDevKey = Files.readString(Paths.get(licensePath + ".KEY"));
RasterSupport.setLicense(licensePath, myDevKey);
boolean isLocked = RasterSupport.isLocked(RasterSupportType.DOCUMENT);
assertTrue("Document support is locked.", !isLocked);
System.out.println("Document support is unlocked.");
}
Help Collections
Raster .NET | C API | C++ Class Library | HTML5 JavaScript
Document .NET | C API | C++ Class Library | HTML5 JavaScript
Medical .NET | C API | C++ Class Library | HTML5 JavaScript
Medical Web Viewer .NET
Multimedia
Direct Show .NET | C API | Filters
Media Foundation .NET | C API | Transforms
Supported Platforms
.NET, Java, Android, and iOS/macOS Assemblies
Imaging, Medical, and Document
C API/C++ Class Libraries
Imaging, Medical, and Document
HTML5 JavaScript Libraries
Imaging, Medical, and Document