Licensing (ActiveX Control)

The ActiveX Control is licensed, like the SIS applications, using a combination of a dongle or hardware lock and a licence file. The licensing covers both design-time, when an application is being written, and run-time, when the application is being run.

In addition, the ActiveX Control has four built-in licensing levels, controlled by the Level property. The default level is Unlicensed, at which only a small number of system housekeeping Methods and Commands are available. The other levels enable more of the Methods and Commands. The Unlicensed level does not require that a licence be present and is useful for starting an application, before making a choice of required Level.

The Level property cannot be set at design-time, leaving the ActiveX Control unlicensed at startup. If the application is written using Visual Basic then the ActiveX Control will have been created before the Form_Load event, so the Level property can be set here. The property can be tested immediately after being set, any discrepancy from the intended value indicates a licence failure. In addition the LicenceError event will be called.

At run-time the licence is tested from time-to-time at the start of Methods, and if the Level property is changed. This prevents swamping the licence, and potentially the network, if a network licence is in use. If an error occurs when changing from unlicensed to licensed the Level property will revert back to unlicensed.

The SIS Control supports both standalone and network licensing:

Standalone licensing

Standalone licensing primarily uses a combination of a licence file and a dongle as a hardware lock. Both must be present for SIS to run. The licence file is explicitly linked to the dongle number, so they must be used together.

If standalone dongle free licensing is being used the licence file is locked to a feature of the machine hardware. Both the licence file and defined hardware must be present on the machine; if one is not present, the licence will not run. This means that a standalone dongle free licence will only run on the machine for which it has been created. If the hardware feature to which the licence file is locked is removed or altered, the licence file will not work. For this reason the IP address must be static for dongle free licence installations.

Network licensing

Network licensing primarily uses a combination of a licence file and a dongle as a hardware lock. The dongle must be present on the network licence server and the licence installed on the server for SIS to run.

If network dongle free licensing is being used the licence file is locked to a hardware feature of the network licence server on which it is installed. Both the licence file and defined hardware must be present on the network licence server; if one is not present, the licence will not run. This means that a network dongle free licence will only run on the network licence server for which it has been created. If the hardware feature to which the licence file is locked is removed or altered, the licence file will not work. For this reason the IP address must be static for dongle free licence installations.

Design-time Considerations

At design-time the ActiveX Control will only be loaded when necessary and will be automatically unloaded when not in use, e.g. if no form containing the ActiveX Control is open in Visual Basic. The ActiveX Control can therefore be loaded and unloaded many times during a design session. If the design-time licensing is using a network licence then this can have an impact on performance due to the time taken to find the network licence server on the network. It is therefore recommended that design-time licences be used on standalone licences wherever possible.

Multiple ActiveX Controls in an Application

It is possible to have more than one ActiveX Control in an application. Multiple ActiveX Control-s will share the same licence, and by implication the same Level. In addition they will only take one "user" from a network licence. Care should be taken when changing the Level property of any one SIS Control, because this will affect all other ActiveX Control-s in the application.

Licensing ActiveX Control (OCX) projects for SIS

For development with the Cadcorp ActiveX Control OCX, Cadcorp will issue you with a unique licence file and unique LicenceKey and LicenceSuffix that must be used within your ActiveX applications.

The LicenceKey and LicenceSuffix are unique to each distributor or user of the code. The combination of both properties ensures that an ActiveX runtime licence supplied for use with the application can only be used by that distributor. The same LicenceKey and LicenceSuffix can be used within any applications written by the distributor.

The ActiveX Control LicenceKey and LicenceSuffix properties are shared between all ActiveX Control instances in a single program, for compatibility with the Level property.

To upgrade from a previous version of SIS

Upgrading an existing ActiveX Control (OCX) project to SIS includes a major change to the licensing method as used in previous versions of SIS.

This procedure is based upon Microsoft Visual Studio 2005

  1. Take a copy of the entire solution

  2. Register the SIS OCX

  3. Open the solution

  4. Replace the SIS constants file with a new one generated from the Program Window of SIS desktop

  5. In the References tree in the Solution Explorer, remove the references to AxSisLib and SisLib

  6. Add references to Cadcorp.Sis.Control.AxInterop.dll and Cadcorp.Sis.Control.Interop.dll

    Note: The files Cadcorp.Sis.Control.AxInterop.dll and Cadcorp.Sis.Control.Interop.dll are only used with Visual Studio 2002 and 2003. With Visual Studio 2008, 2010 and 2012 you can add the COM OCX directly to the forms toolbar.

  7. Errors will be notified in Error List. Double-click on each error (AxSisLib.AxSis is not defined)

  8. Replace this with Cadcorp.Sis.Control.AxInterop.AxSis in each case.

To add new licensing information:

Before you set the licence level you will need to add two additional properties:

SisObject.LicenceKey = "licencekey"

This is a string value supplied by Cadcorp. It must match details in the licence file to work. Cadcorp will program all licences supplied to your organisation with this string. If you are working in a .NET environment, you should obfuscate your code to protect this information.

SisObject.LicenceSuffix = "licencesuffix"

This will be your organisation name or initials as a unique code supplied by Cadcorp. It must match details in the licence file to work. Cadcorp will program all licences supplied to your organisation with this string. If you are working in a .NET environment, you should obfuscate your code to protect this information.

Cadcorp recommend that the following line of code is added to enable both standalone and network licensing options:

SisObject.SetStr (SIS_OT_SYSTEM, 0, "_SentinelRMSServerList$", "CADCORP_LICENCE_SERVER_LIST")

This line of code will tell the application to do the following:

  1. Check for a local licence file.

  2. If no local licence is found then look for a network licence.

  3. If the CADCORP_LICENCE_SERVER_LIST Windows Environment Variable value is set on the client machine, this will tell the application the location of the Network Licence Server(s).

  4. If no CADCORP_LICENCE_SERVER_LIST Windows Environment Variable value is found, check the network for Network Licence Servers and use the first licence available.

Note: The CADCORP_LICENCE_SERVER_LIST Windows Environment Variable can hold a list of servers separated by a tilde symbol (~) and replaces the previously used variable LSHOST which only held a single value.

If you set the CADCORP_LICENCE_SERVER_LIST Windows Environment Variable on the client machine to the IP address of the network licence server, this is the most efficient way of contacting the Network Licence Server.

Refer to System Variables for a description of all Sentinel licensing features.

In summary, Cadcorp recommend that the following code is used in SIS Control OCX applications to provide flexible licensing:

SisObject.LicenceSuffix = "licencesuffix"
SisObject.LicenceKey = "licencekey"
SisObject.SetStr (SIS_OT_SYSTEM, 0, "_SentinelRMSServerList$", "CADCORP_LICENCE_SERVER_LIST")
SisObject.Level = SIS_LEVEL_MODELLER

All OCX applications that are to run on SIS will need these alterations to be made to the code and be re-issed as new applications.

Note: The system property "_SentinelRMSServerList$" sets the location of the licence server, it can be an IP Address or a Machine name.

If you are using redundant servers (described in the Redundant Licence Servers topic of the SIS online Help) this value is set to CADCORP_LICENCE_SERVER_LIST, therefore the Windows Environment Variable CADCORP_LICENCE_SERVER_LIST must be set to a list of redundant servers.


Top of page

Send comments on this topic.

Click to return to www.cadcorp.com

© Copyright 2000-2017 Computer Aided Development Corporation Limited (Cadcorp).