FAQ: Product Licensing, Applying the License Key
Code C# pour la licence sous Windows (32 bits) / Windows x64
Code C# pour la licence sous Windows (32 bits) / Windows x64
Les informations suivantes sont valables uniquement pour TBarCode version 10.2.2 et antérieures. À partir de la version 10.2.4, il n'y a plus de licence distincte pour les composants 32 bits et 64 bits.
Vous pouvez utiliser le code C# suivant pour adapter dynamiquement la clé de licence aux versions 32 bits ou 64 bits du binaire :
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!