FAQ:产品许可、应用许可证密钥
用于在 Windows(32 位)/ Windows x64 上进行许可的 C# 代码
用于在 Windows(32 位)/ Windows x64 上进行许可的 C# 代码
以下信息仅适用于 TBarCode 10.2.2 及更早版本。从 10.2.4 版本开始,32 位和 64 位组件不再需要单独的许可。
您可以使用以下 C# 代码,根据二进制文件的 32 位或 64 位版本动态调整许可证密钥:
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!