如何在.netreactor 6.9.0中获取硬件ID?

问题描述 投票:0回答:1

如上面标题所述,我如何获得硬件ID以用于许可目的?因为当前版本(6.9.0)已经删除了硬件ID生成工具。

我尝试过使用从其他在线下载的 ID 生成器(例如 SoftCo)生成的 ID,但它不起作用。

licensing net-reactor
1个回答
0
投票

使用 SDK 中包含的相应的 license.dll 文件:

使用 .NET 库“License.dll”,您可以在运行时确定受保护软件的当前许可状态。您只需要在项目中引用该库并使用相应的方法和属性即可。所有方法和属性都应该是不言自明的。您不需要选择许可证文件。如果有效的许可证文件可用,它将自动用于更新许可状态。

请注意,“License.dll”的方法和属性只有在您保护软件后才会返回正确的值。保护后,不再需要库“License.dll”。

C# 中“License.dll”的内容:

namespace License
{
    public enum EvaluationType
    {
        Trial_Days,
        Runtime_Minutes
    }

    public class Status
    {

        // Methods
        static Status();
        private Status();
        public static bool CheckConfirmationCode(string harwareID, string confirmationCode);


        public static string GetHardwareID(bool Board, bool CPU, bool HDD, bool MAC);




        public static string InvalidateLicense();
        public static void LoadLicense(string filename);
        public static void LoadLicense(byte[] license);
        public static bool ReactivateLicense(string code);

        // Properties
        public static bool Evaluation_Lock_Enabled { get; set; }
        public static int Evaluation_Time { get; set; }
        public static int Evaluation_Time_Current { get; set; }
        public static EvaluationType Evaluation_Type { get; set; }
        public static DateTime Expiration_Date { get; set; }
        public static bool Expiration_Date_Lock_Enable { get; set; }
        public static bool Hardware_Lock_Enabled { get; set; }
        public static string HardwareID { get; set; }
        public static SortedList KeyValueList { get; set; }
        public static byte[] License { get; set; }
        public static string License_HardwareID { get; set; }
        public static bool Licensed { get; set; }
        public static int Number_Of_Instances { get; set; }
        public static bool Number_Of_Instances_Lock_Enable { get; set; }
        public static int Number_Of_Uses { get; set; }
        public static int Number_Of_Uses_Current { get; set; }
        public static bool Number_Of_Uses_Lock_Enable { get; set; }

    }
}

确保您使用的参数与保护组件时使用的参数相同,例如,保护设置中默认不使用 HDD 串行,因此您可以使用 GetHardwareID(true, true, false, true)。

© www.soinside.com 2019 - 2024. All rights reserved.