Methods for Licensing

Licensing (applying the license key) must be done at least once per computer system (and/or per user - depending on license). The license key unlocks the downloaded demo version - no additional download is needed. Applying the license key can be done manually with the help of the license dialog, by programmatic licensing and by licensing via INI File.

Site Licenses on Terminal Servers

For this purpose there are Registry- and INI-File based methods available - please contact our support ( for details.

Developer or Web Licenses

It is necessary to license programmatically each time when your application is being started or before you create a bar code.

Licensing Manually (License Dialog)

The license key (sent to you by TEC-IT) has to be entered in the license dialog of the product. Please enter the license data exactly as submitted to you. Take care of spaces and upper/lowercase! To avoid mistakes you can use "copy & paste" if you have received the license key by email. The license-key must be applied to the product on each target system where you want to use the product.

ActiveX Controls

You can open the license dialog (in most applications) by right-clicking on the ActiveX® Control.

For Programmers

You can license directly in your program code by calling the LicenseMe() function.

Licensing Within Program Code

The licensing procedure for developers is as follows:

Call the LicenseMe() method from within your application each time when your program is getting started. This has to be done before you draw a barcode!

For users of an ActiveX® Control: when you call the LicenseMe() method you should take care that an instance of the control has been created (e.g. within load event of a form), otherwise you have to create an object.

Sample for licensing TBarCode OCX in VB:

Private Sub Form_Load()
TBarCode111.LicenseMe "Mem: LicenseeInfo", 
          eLicKindDeveloper, 1, "MyLicKey", TBarCode11Lib.eLicProd1D
End Sub

Sample for licensing TBarCode DLL in VC++:

BCLicenseMe ("Licensee", eKindOfLicense, 1,"YourKey", eProductID);
// for enums refer to the file TECBCEnum.h

Sample for licensing TBarCode .NET in C#:

barcode.License ("YourLicensee", LicenseType.DeveloperOrWeb, 1,
                                 "YourKey", TBarCodeProduct.Barcode2D)

More info about licensing can be found in the product documentation available in the Download Area of this site.

The License Key is not Saved Permanently

You may encounter the following problem: after entering the license key it is recognized (key valid) but not stored in the system. After restarting your application the product is unlicensed again.

Developer Licenses

For Developer Licenses (using a license key which starts with Mem:) you have to license the product within your program code. Just call the LicenseMe() function at startup of your application or before you draw the first barcode. Registry based licensing is not available for developer licenses (or Mem: prefixed licenses).


Each instance of TBarCode in ASP.NET must be licensed separately via program code. TBarCode .NET does not support licensing via registry key or ini file. But TBarCode OCX in ASP does support licensing through registry or ini file.

Permission Problem

There maybe permission restrictions when reading or writing the Windows Registry. Because our product wants to store the license data in the Registry you have to check if your user account has sufficient permissions for the TEC-IT key.

User Account

In most cases license data is stored for the actual user (HKEY_CURRENT_USER) only. If you login as different user you may have to license again. A method for user independent licensing is available on request.

User Access Control

Depending on your UAC level (Vista, Windows 7) write access to registry HKey Local Machine may be inhibited (relevant for TConnector). This prevents from persistent licensing.

Mac OS-X

If the program has been started directly from within the DMG file, the license key cannot be saved. Install the software by double clicking the DMG file and dragging the program icon onto the application path. Afterwards try to license again. For licensing use the same user account which has been used for installing the software (write permissions!)

INI File Licensing

For special problems there is a possibility to load the license key through a preconfigured INI-File. Please contact our support if you have unsolved licensing problems.

Microsoft Excel - Licensing during Open

Licensing happens during startup of the document which contains the ActiveX® Control.

  • Open the Microsoft VBA editor with Alt+F11.
  • In the Project Explorer select This Workbook.
  • Now enter the following code as for the Workbook-Open Event (sample for TBarCode OCX V11):
  • Private Sub Workbook_Open()
     Dim tbc As TBarCode11
     Set tbc = CreateObject ("TBarCode11.TBarCode11")
     tbc.LicenseMe "Mem:Licensee", eLicKindDeveloper, 1, "Key", TBarCode11Lib.eLicProd1D
     Set tbc = Nothing
    End Sub

We recommend to password protect your VBA code in the project property window.

Microsoft Access - Licensing with Autoexec Macro

Below we show you how to license at startup of the database (sample for TBarCode OCX V11). Create a new Module with the following function (in Microsoft VBA Editor):

Public Function LicenseTBarCode()
 Dim TB As New TBarCode11
 TB.LicenseMe "Mem:Licensee", eLicKindDeveloper, 1, "Key", TBarCode11Lib.eLicProd1D
 Set TB = Nothing
End Function

Create a new Macro named "Autoexec" with the following settings:

Action = RunCode
Functionname = License TBarCode()
Don't forget to include a reference to the type library of the ActiveX® Control in the menu Tools - References (otherwise enumerations cannot be used). We recommend to password protect your VBA code in the project property window.

C# Code for Licensing both on Windows (32 Bit) / Windows x64

The following information is valid only for TBarCode Version 10.2.2 and earlier. Starting with version 10.2.4 there is no separate licensing for 32 bit and 64 bit components anymore.

You can use the following C# code to adapt the license key dynamically to 32-Bit or 64-Bit versions of the binary:

TBarCode .NET V10

// are we in 32-bit mode?
if (IntPtr.Size == 4)
  barcode.License("Your Licensee Name", LicenseType.DeveloperOrWeb, 1, "Your 32 Bit Key",
    (TBarCodeProduct) 2003 /* 2D V10!*/);
// or in 64-bit process?
else if (IntPtr.Size == 8)
  barcode.License("Your Licensee Name", LicenseType.DeveloperOrWeb, 1, "Your x64 Bit Key", 
    (TBarCodeProduct)2005 /* 2D x64 V10!*/);
//error, unknown platform!

TBarCode OCX V9

// are we in 32-bit mode?
if(IntPtr.Size == 4)
   objTBarCode.License("Your Licensee Name", tag_licKind.eLicKindWeb, 1, "Your 32 Bit Key", 
   (tag_licProduct)45 /* 2D V9!*/);
// or in 64-bit process?
else if (IntPtr.Size == 8)
   objTBarCode.License("Your Licensee Name", tag_licKind.eLicKindWeb, 1, "Your x64 Key", 
   (tag_licProduct)49 /* 2D V9!*/);
//error, unknown platform!

Licensing TBarCode OCX in Microsoft InfoPath (JavaScript)

Please use this code to license TBarCode OCX V11 in the OnLoad event of your InfoPath document (through JavaScript):

function XDocument::OnLoad(eventObj)
   var tbc = new ActiveXObject("TBarCode11.TBarCode11") 
   tbc.LicenseMe("Licensee", 2, 1, "YourKey", 2023 )

SSL Error during Online-Licensing

During Online-Licensing of Barcode Studio V9 and V10 you may see a SSL error message. In this case confirm the error (Issuer Certificate) with Yes (Ignore) in order to proceed with licensing.