FAQ: Licenza del Prodotto, Applicazione della Chiave di Licenza
Codice C# per la Licenza sia su Windows (32 Bit) che su Windows x64
Codice C# per la Licenza sia su Windows (32 Bit) che su Windows x64
Le seguenti informazioni sono valide solo per TBarCode Versione 10.2.2 e precedenti. A partire dalla versione 10.2.4 non esiste più una licenza separata per i componenti a 32 bit e 64 bit.
Potete utilizzare il seguente codice C# per adattare dinamicamente la chiave di licenza alle versioni a 32 bit o 64 bit del binario:
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!