FAQ: Product Licensing, Applying the License Key
C# Code for Licensing both on Windows (32 Bit) / Windows x64
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!*/);
//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!