Developing Applications Using The SoftwareShield System > Creating Licensing Solutions > Available License Models > Absolute Expiration License Model

Absolute Expiration License Model


This model allows you to deliver a time limited trial version of your software that expires at some absolute point in time (regardless of when the user first runs the software).  When expired, your software can either stop functioning completely or change to some other model.

For detailed information about expiration types and features see Expiring Licenses in the Feature Guide.

Overview - How to Integrate the Absolute Expiration License Model Into Your Application

  1. The first step is simply defining a license that expires using a Hard Expire Date. Note that any of the three types of expiration can be individually used or used in combination with each other. If used in combination your application is expired as soon as any one of the types of expiration takes effect. This section deals with "hard expire dates". The hard expire date is an absolute point is time (E.G.: June 21, 2009) and has nothing to do with when your application is run. When this hard expire date is in the past, your application is expired. This is a less common type of expiring license and should be used with care.  For example, you could use this type of expiration for "poison pill" feature or for some specialized "one-off" leased license terms.

  2. The next step is to ensure that your license has the necessary Authorization Definitions built into it. You decide which definitions to include based on how you want your licenses expiration to behave. There are several Authorization Definitions which can manipulate expiring licenses. You may need a "Release All Expiration" definition, a "Change Hard Date" definition, a "Composite" definitions (which allow you to use a combination of definitions simultaneously), or all of them - depending on what kinds of expiration your build into your license and how you want it to behave. Please see Authorization Definitions for detailed information on the Authorization Definition features.

  3. Once you are satisfied with your license, compile a distributed copy of it. The distributed copy is encrypted and compressed and only contains absolutely necessary information for the enforcement of your license. Place a copy of this distributed license in your applications directory. If you have decided to use steganographic alias files, make sure that they are also in the application directory. Have a look at the programming notes file that the SoftwareShield License Manager creates for your specific license. This will make your programming a little easier by supplying you with the code you will need to invoke the start up event. Please see Deploying the License for Your Application for more detailed information about deploying your license.

  4. Next, in your programs startup event (main form load etc.) create an instance of the ClientProtector object (SSCProtector) and immediately call its StartUp function. You will have to pass specific parameters such as the license name, main license file password, and the finger print options code - but this code will have been already written for your convenience when you compiled your license - just look in the programming notes file created by the SoftwareShield License Manager. Have a look at the exact details of the StartUp function for more information on making this call.

  5. Now, depending on the return value from the ClientProtector StartUp call (in the return_code reference parameter), you can determine if the license is expired or not. If you wish to give the user updated feedback about how much of his expire period remains, you can make calls to the ClientProtector to get detailed information about the expiration. See ClientProtector Reference for more detail. At this point, if it has not yet expired, have your application launch in whatever behaviour mode your model requires (for example "trial mode"). Shut down the program if it has expired after prompting the user to buy and possibly giving them the opportunity to enter an Activation Code if they already have. Run the program in full release mode if the license has been unlocked completely. For information on how to interpret the return_code parameter when deploying a trial version of your application, have a look at RETURNCODES.

Related Topics