FAQ: Produktlizenzierung, Anwenden des Lizenzschlüssels
C# Code zur Lizenzierung für Windows 32-Bit und Windows x64
C# Code zur Lizenzierung für Windows 32-Bit und Windows x64
Der folgende Abschnitt ist nur für TBarCode Version 10.2.2 und früher relevant. Ab Version 10.2.4 werden 32 bit und 64 bit Komponenten des SDK nicht mehr getrennt lizenziert.
Bitte verwenden Sie den folgenden C# Code, um den Lizenzschlüssel dynamisch für 32-Bit oder 64-Bit Versionen anzupassen:
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!