TLL Init Chunk was created to make integration simple. It is encrypted file containing all necessary configuration for TLLInterface object. You can generate init chunk file from TLL toolbox.

Security notice

TLL Init Chunk must be used properly to mitigate security risks. Init chunk purpose is to hide configuration values (your app public key, license registry storage path, TLL license data etc.) from prying eyes and make integration to your project simple. However, when you simply load it from the file at runtime, any other user can generate his own init chunk and replace yours and crack your application.

Shortened, properly used init chunk increases security and makes integration easier. Without proper usage, it decreases security. Please follow these rules:

  • Always integrate chunk file somewhere into your compiled code (resources or byte array)
  • Always use your own custom password for init chunk
  • NEVER initialize TLLInterface using chunk file directly (by passing IO.File.ReadAllBytes result to the TLLInterface constructor)

Generate init chunk (file or code snippet)

  1. Start LibaryToolbox2.exe
  2. Create or open license signing key for your application
  3. Click “Generate init chunk for easy integration” button in the first tab
  4. Fill the configuration values (details below)
  5. Use it in your project

Configure init chunk

You can configure multiple properties of init chunk. You can find the object definition here. Below more description:

  • Mode
    • Standalone: Treek’s Licensing Library 2.0 WITHOUT activation server
    • With licensing API server: For those who purchased TLL activation server
  • Init chunk password
    • This is password used to encrypt init chunk file content. You’ll have to pass it to TLLInterface object.
  • TLL License
    • Put here your developer license to avoid TLL demo notification.
    • If you set developer license in the same named tab of toolbox, this information will be filled automatically
    • You can keep this empty for testing purposes
  • License registry scope
    • Scope of registry used to save end user’s license
    • Remember, you need administrator permission to store license in HKEY_LOCAL_MACHINE
  • License registry key
    • The path of registry key to store license
    • Always should start with backslash “\”
  • License registry value name
    • Registry value name to store end user’s license
  • License obfuscation password
    • Password used to encrypt end user’s license in registry
    • URL of activation server
  • Product ID
    • This value is generated by activation server

Using TLL chunk file in your application

  1. Add TLL init chunk file to your project’s resources (to ensure that init chunk is compiled into exe/dll file)
    1. Optionally, you can generate byte array source code snippet for C# or VB from the toolbox instead of using application resources
  2. Add using/imports code
    1. C#: Using TreeksLicensingLibrary2.EasyIntegration;
    2. VB: Imports TreeksLicensingLibrary2.EasyIntegration
  3. Create new instance of TLLInterface object using added resource and password
    1. C#: TLLInterface tlli = new TLLInterface(YourAppNamespace.Properties.Resource.ChunkFilename, “password”);
    2. VB: Dim tlli As New TLLInterface(My.Resources.ChunkFileName, “password”)
  4. Use Register method to activate licenses generated by toolbox.
  5. Use MyLicense property to determine actual license status
    1. When no license is present, MyLicense object will be null (nothing)