Public NotInheritable Class SecureLicenseManager _ Inherits LicenseProvider
public sealed class SecureLicenseManager : LicenseProvider
The SecureLicenseManager is the core interface to the DeployLX Licensing enforcement system. Each protected class calls Validate(Object, Type, LicenseValidationRequestInfo) to look for a license on the client machine.
Imports Microsoft.VisualBasic
Imports System
Imports System.Windows.Forms
Imports DeployLX.Licensing.v5
Namespace VBProtectedDll
Public Class ProtectedClass
Private _license As SecureLicense
Public Sub New()
_license = SecureLicenseManager.Validate(Me, Nothing, Nothing)
End Sub
Public Sub DoSomething()
If _license.IsTrial Then
MessageBox.Show("Hello from ProtectedClass, enjoy the trial.")
Else
MessageBox.Show("Hello from ProtectedClass, thanks for your purchase.")
End If
End Sub
End Class
End Namespace
using System;
using System.Windows.Forms;
using DeployLX.Licensing.v5;
namespace CSharpProtectedDll
{
public class ProtectedClass
{
private SecureLicense _license;
public ProtectedClass()
{
_license = SecureLicenseManager.Validate( this, null, null );
}
public void DoSomething( )
{
if( _license.IsTrial )
MessageBox.Show( "Hello from ProtectedClass, enjoy the trial." );
else
MessageBox.Show( "Hello from ProtectedClass, thanks for your purchase." );
}
}
}
Assembly: DeployLX.Licensing.v5 (in DeployLX.Licensing.v5.dll)