# How Locks Work

# Inbuilt software locks

By imposing locks on your software, you can freely distribute your product for trial or evaluation and rely upon lock expiration to compel the purchase of your wares when the evaluation period expires. When software locks expire, your prospective client must purchase a valid license.

# Locks in license files

You can also set Evaluation Time, Expiration Date, and Number of Uses limits in issued licenses. When license locks expire, your customer must acquire a further license to use your product further.

# Combine software and license locks

By combining software and license locks, you can impose any limitations on the software use you desire. Most importantly, without writing a line of code to do so, you can show off your wares to your market.

# Licensing in applications with multiple assemblies

Each protected assembly that contains its own licensing lock performs a licensing check when that assembly is loaded. If several assemblies in one application contain locks, this can cause multiple licensing dialogs and can affect counters such as Number of Uses.

To perform the licensing check only in the main executable, enable the locks for that executable and add the following assembly attribute to the source code of each additional assembly:

using System.Reflection;

[assembly: Obfuscation(Feature = "NOLICENSING")]

.NET Reactor will still protect an assembly marked with NOLICENSING, but it will not add its own licensing lock to that assembly. The attribute works even when Declarative Protection is not enabled. An assembly cannot perform a licensing check or update its usage count until it is loaded.

# Related topics

Evaluation Lock · License File Settings · Lock an assembly · Declarative Protection