DeployLX Software Protection System

SecureLicense Class

Represents a license that can be validated and issued by the SecureLicenseManager.

Syntax

<SerializableAttribute> _
<ComVisibleAttribute(True)> _
Public NotInheritable Class SecureLicense _
	Inherits License _
	Implements ISerializable, IChange
[SerializableAttribute]
[ComVisibleAttribute(true)]
public sealed class SecureLicense : License, 
	ISerializable, IChange

Remarks

See the SecureLicenseManager object for more information on how licenses are found, validated and issued.

To ensure that the license files have not been altered since they were issued, each SecureLicense is signed with a LicenseKey. The signing code uses an asymmetric public code encryption system with the public key embedded in the protected assembly that the class is implemented in. The private key remains secured with the original developers ensuring that only they can grant valid licenses, serial numbers, activations and extensions.

Examples

This sample demonstrates the basic use of a SecureLicense object after it has been validated.

Visual Basic
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
C#
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." );
        }
    }
}

Inheritance Hierarchy

System..::..Object
  System.ComponentModel..::..License
    DeployLX.Licensing.v5..::..SecureLicense

Assembly:  DeployLX.Licensing.v5 (in DeployLX.Licensing.v5.dll)

See Also