|
FAQ: Product Licensing, Applying the License Key | | | This FAQ handles issues related to licensing. Applying the license key is discussed for Access, Excel and Developer Licenses. Licensing a developer license which uses a memory license key (without any registry entries) is explained. | | |
Licensing | | Methods for LicensingLicensing (applying the license key) must be done at least once per computer system. 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.
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. | |
License Dialog | | Applying the License Key ManuallyThe 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. | |
Programmatic Licensing | | Licensing Within Program CodeThe 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 TBarCodeOCX in VB:
Private Sub Form_Load()
TBarCode101.LicenseMe "Mem: LicenseeInfo",
eLicKindDeveloper, 1, "MyLicKey", eLicProd1D
End Sub
Sample for licensing TBarCodeDLL in VC++:
BCLicenseMe ("Licensee", eKindOfLicense, 1,
"YourKey", eProductID);
// for enums refer to the file TECBCEnum.h
More info about licensing can be found in the product documentation available in the Download Area of this site. | |
License Volatile | | The License Key is not Saved PermanentlyYou 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).
Web-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. | |
Licensing with Excel | | Microsoft Excel - Licensing during OpenLicensing 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 V10):
Private Sub Workbook_Open()
Dim tbc As TBarCode10
Set tbc = CreateObject ("TBarCode10.TBarCode10")
tbc.LicenseMe "Mem:Licensee", eLicKindDeveloper, 1, "Key", eLicProd1D
Set tbc = Nothing
End Sub
We recommend to password protect your VBA code in the project property window. | |
Product Licensing with Access | | Microsoft Access - Licensing with Autoexec MacroBelow we show you how to license at startup of the database (sample for TBarCode OCX V10). Create a new Module with the following function (in Microsoft VBA Editor):
Public Function LicenseTBarCode()
Dim TB As New TBarCode10
TB.LicenseMe "Mem:Licensee", eLicKindDeveloper, 1, "Key", 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. | |
TBarCode .NET | | C# Code for Licensing both on Windows (32 Bit) / Windows x64The 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!*/);
//else
//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!*/);
//else
//error, unknown platform!
| |
TBarCode OCX | | Licensing TBarCode OCX in Microsoft InfoPath (JavaScript)Please use this code to license TBarCode OCX V9 in the OnLoad event of your InfoPath document (through JavaScript):
function XDocument::OnLoad(eventObj)
{
var tbc = new ActiveXObject("TBarCode9.TBarCode9")
tbc.LicenseMe("Licensee", 2, 1, "YourKey", 44 )
}
| |
|
|
© TEC-IT Datenverarbeitung GmbH, Austria ++43(0)7252/72720 office@tec-it.com |
|