With the .NET library "License.dll" you are able to determine the current licensing status of your protected software at runtime. You only need to reference this library in your project and use the corresponding methods and properties. All methods and properties should be self explanatory. You don't need to select a license file. If a valid license file is available it will be used automatically to update the licensing status.
Please note, the methods and properties of "License.dll" only return the correct values after you haved protected your software. After protection the library "License.dll" is not needed anymore.
Content of "License.dll" in C#:
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; }
}
}
Content of "License.dll" in VB.NET:
Namespace License
Public Enum EvaluationType
' Fields
Runtime_Minutes = 1
Trial_Days = 0
End Enum
Public Class Status
' Methods
Shared Sub New()
Private Sub New()
Public Shared Function CheckConfirmationCode(ByVal harwareID As String, ByVal confirmationCode As String) As Boolean
Public Shared Function GetHardwareID(ByVal Board As Boolean, ByVal CPU As Boolean, ByVal HDD As Boolean, ByVal MAC As Boolean) As String
Public Shared Function InvalidateLicense() As String
Public Shared Sub LoadLicense(ByVal filename As String)
Public Shared Sub LoadLicense(ByVal license As Byte())
Public Shared Function ReactivateLicense(ByVal code As String) As Boolean
' Properties
Public Shared Property Evaluation_Lock_Enabled As Boolean
Public Shared Property Evaluation_Time As Integer
Public Shared Property Evaluation_Time_Current As Integer
Public Shared Property Evaluation_Type As EvaluationType
Public Shared Property Expiration_Date As DateTime
Public Shared Property Expiration_Date_Lock_Enable As Boolean
Public Shared Property Hardware_Lock_Enabled As Boolean
Public Shared Property HardwareID As String
Public Shared Property KeyValueList As SortedList
Public Shared Property License As Byte()
Public Shared Property License_HardwareID As String
Public Shared Property Licensed As Boolean
Public Shared Property Number_Of_Instances As Integer
Public Shared Property Number_Of_Instances_Lock_Enable As Boolean
Public Shared Property Number_Of_Uses As Integer
Public Shared Property Number_Of_Uses_Current As Integer
Public Shared Property Number_Of_Uses_Lock_Enable As Boolean
End Class
End Namespace
How To Examples:
1. Reference Namespace of License.dll
2. Check if a valid license file is available
3. Read additonal license information from a license license
4. Check the license status of Evaluation Lock
5. Check the license status of Expiration Date Lock
6. Check the license status of Number Of Uses Lock
7. Check the license status of Number Of Instances Lock
8. Check the license status of Hardware Lock
9. Get Hardware ID of the current machine
10. Compare current Hardware ID with Hardware ID stored in License File
11. Invalidate the license
12. Check if a confirmation code is valid
13. Reactivate a license
14. Manually load a license using a filename
15. Manually load a license using byte[]
16. Get loaded license (if available) as byte[]
How To Example Code:
Reference Namespace of License.dll
using License;
Check if a valid license file is available
/*** Check if a valid license file is available. ***/
public bool IsValidLicenseAvailable()
{
return License.Status.Licensed;
}
Read additonal license information from a license license
/*** Read additonal license information from a license license ***/
public void ReadAdditonalLicenseInformation()
{
/* Check first if a valid license file is found */
if (License.Status.Licensed)
{
/* Read additional license information */
for (int i = 0; i < License.Status.KeyValueList.Count; i++)
{
string key = License.Status.KeyValueList.GetKey(i).ToString();
string value = License.Status.KeyValueList.GetByIndex(i).ToString();
}
}
}
Check the license status of Evaluation Lock
/*** Check the license status of Evaluation Lock ***/
public void CheckEvaluationLock()
{
bool lock_enabled = License.Status.Evaluation_Lock_Enabled;
EvaluationType ev_type = License.Status.Evaluation_Type;
int time = License.Status.Evaluation_Time;
int time_current = License.Status.Evaluation_Time_Current;
}
Check the license status of Expiration Date Lock
/*** Check the license status of Expiration Date Lock ***/
public void CheckExpirationDateLock()
{
bool lock_enabled = License.Status.Expiration_Date_Lock_Enable;
System.DateTime expiration_date = License.Status.Expiration_Date;
}
Check the license status of Number Of Uses Lock
/*** Check the license status of Number Of Uses Lock ***/
public void CheckNumberOfUsesLock()
{
bool lock_enabled = License.Status.Number_Of_Uses_Lock_Enable;
int max_uses = License.Status.Number_Of_Uses;
int current_uses = License.Status.Number_Of_Uses_Current;
}
Check the license status of Number Of Instances Lock
/*** Check the license status of Number Of Instances Lock ***/
public void CheckNumberOfInstancesLock()
{
bool lock_enabled = License.Status.Number_Of_Instances_Lock_Enable;
int max_instances = License.Status.Number_Of_Instances;
}
Check the license status of Hardware Lock
/*** Check the license status of Hardware Lock ***/
public void CheckHardwareLock()
{
bool lock_enabled = License.Status.Hardware_Lock_Enabled;
if (lock_enabled)
{
/* Get Hardware ID which is stored inside the license file */
string lic_hardware_id = License.Status.License_HardwareID;
}
}
Get Hardware ID of the current machine
/*** Get H
没有合适的资源?快使用搜索试试~ 我知道了~
.NET Reactor 6.8.0
共294个文件
dll:41个
exe:36个
cs:33个
需积分: 5 43 下载量 121 浏览量
2023-02-09
10:49:21
上传
评论
收藏 28.71MB ZIP 举报
温馨提示
.net 加壳工具 2022版
资源推荐
资源详情
资源评论
收起资源包目录
.NET Reactor 6.8.0 (294个子文件)
REACTOR_HELP.chm 1.54MB
app.config 1KB
app.config 144B
app.config 144B
app.config 144B
app.config 144B
app.config 144B
dotNET_Reactor.exe.config 125B
Form1.cs 6KB
MyMessageBox.cs 5KB
MyMessageBox.cs 5KB
MyMessageBox.cs 5KB
MyMessageBox.cs 5KB
MyMessageBox.cs 5KB
MyMessageBox.cs 5KB
Form1.cs 3KB
Program.cs 3KB
Program.cs 3KB
Form1.Designer.cs 3KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
AssemblyInfo.cs 2KB
Form1.cs 2KB
Form1.cs 2KB
Form1.cs 2KB
Form1.cs 2KB
Form1.cs 2KB
Form1.cs 2KB
ObfuscateAttribute.cs 1KB
Program.cs 605B
MessageBoxInterface.cs 269B
MessageBoxInterface.cs 269B
MessageBoxInterface.cs 269B
MessageBoxInterface.cs 269B
MessageBoxInterface.cs 269B
MessageBoxInterface.cs 269B
MessageBoxInterface.cs 269B
MyMessageBox.csproj 6KB
MyMessageBox.csproj 6KB
MyMessageBox.csproj 6KB
MyMessageBox.csproj 6KB
MyMessageBox.csproj 6KB
MyMessageBox.csproj 6KB
LicenseExamination.csproj 4KB
LicenseExamination.csproj 353B
LicenseExamination.csproj 288B
LicenseExamination.csproj 281B
brolib_x64.dll 804KB
brolib_x86.dll 741KB
dotNETReactorVSPackage.dll 520KB
dotNETReactorVSPackage.dll 518KB
dotNETReactorVSPackage.dll 495KB
LicenseExamination.dll 294KB
LicenseExamination.dll 292KB
LicenseExamination.dll 292KB
LicenseGen.dll 135KB
VS13ReactorAddin.dll 135KB
VS08ReactorAddin.dll 134KB
VSReactorAddin.dll 98KB
LicenseGenNetStandard.dll 82KB
dotNET Reactor VSPackage.dll 80KB
NCC3.dll 73KB
License.dll 20KB
License.dll 20KB
License.dll 20KB
License.dll 20KB
License.dll 20KB
License.dll 20KB
LicenseExamination.dll 10KB
License.dll 9KB
License.dll 9KB
License.dll 9KB
License.dll 9KB
License.dll 9KB
License.dll 9KB
License.dll 9KB
License.dll 9KB
License.dll 9KB
License.dll 9KB
StackTraceDeobfuscator.dll 9KB
StackTraceDeobfuscator.dll 9KB
StackTraceDeobfuscator.dll 9KB
StackTraceDeobfuscator.dll 9KB
StackTraceDeobfuscator.dll 9KB
License.dll 9KB
License.dll 9KB
LicenseExamination.dll 8KB
LicenseExamination.dll 8KB
dotNET_Reactor.exe 14.32MB
MyMessageBox.exe 431KB
MyMessageBox.exe 431KB
MyMessageBox.exe 431KB
MyMessageBox.exe 431KB
MyMessageBox.exe 431KB
MyMessageBox.exe 431KB
MyMessageBox.exe 431KB
共 294 条
- 1
- 2
- 3
资源评论
Zdelta
- 粉丝: 21
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功