Contents - Index
This reference lists all of the properties, methods and events of the Sheriff ActiveX Control.
The properties are listed in their categories, namely Company Info, Product Info, Trial License and Miscellaneous.
All of the properties in this category are for providing information about your company. This information is used and displayed on the licensing dialog box if Auto Authorize or/and Auto Renew options are set on.
These properties are self-explanatory.
The name of your product.
The ID of your product. Sheriff ActiveX Control comes with a pre-defined evaluation product ID that can be used for your evaluation and testing. You need to obtain a product ID of your own if you decide to use Sheriff in your commercially released product.
Instructs Sheriff ActiveX control to automatically issue a trial licence.
Instructs Sheriff ActiveX control to automatically authorize a licence with a built-in licensing dialog box. Your company information will be displayed in the licensing dialog box as well as the user reference code, licence key and publisher's data.
Instructs Sheriff ActiveX control to automatically renew a licence with a built-in licensing dialog box. Your company information will be displayed in the licensing dialog box as well as the user reference code, licence key and publisher's data.
Defines the interval of heartbeating time. Heartbeating is a way of notifying Sheriff that the application is alive and, in the case of unit metering, updating Sheriff of the usage of the unit meter.
Defines when Sheriff can reclaim a dead licence. A dead licence is the licence that was requested and held by an application but its heartbeat has ceased for a period of time that is longer than the HeartbeatTime.
Type of the licence. Its values are explained in the SDK and can be found in the slsapi.bas. With ActiveX control you don't need to manipulated it directly, instead you will want to set the following properties such as IsReusableKey, IsTimeMeter etc which are a breakdown of the possible values of the licence type.
A reusable licence key makes the licence reusable on the same PC given that the hardware components do not change. A reusable licence key allows the user to recover his/her licence in the event that the licence is damaged or lost by accident. Typically you would only want to issue a reusable licence key with time or expiration restrictions.
Sets the user reference code to be reusable.
Defines whether or not a licence is exportable.
Defines whether a licence is a standalone or network licence. A standalone licence is locked to the machine from which the licence is authorised and therefore is not sharable with other users.
Define whether the licence is limited by a number of days that is defined by the Meter property.
Define whether the licence is limited by a number of units that is defined by the Meter property.
Defines whether the licence will expire by the predefined date that is set by the EndDate property.
Define the maximum concurrent users that can use the licence simultaneously.
Defines the maximum number of days if the IsTimeMeter is set, or the maximum number of units if the IsUnitMeter is set.
Defines the expiration date if the IsSetExpiration is set.
Defines the maximum number of concurrent users if the IsSetCoUsers is set.
Defines the feature access level.
Returns the current state of the licence when QueryLicenceInfo method is called. Please refer to the API Reference for its description.
Returns the start date or purchase date of the licence when QueryLicenceInfo method is called.
Returns the usage of the meter when QueryLicenceInfo method is called.
Returns the number of active users when QueryLicenceInfo method is called.
Sets or returns the publisher's data.
Defines the location of the licence files. If LicencePath is not given, Sheriff ActiveX control will create and locate licence files in the directory where it is installed.
Provides the name of the user who is running the application.
The major version number of the control
The minor version number of the control
Apart from those methods that return boolean, all of other methods return an error code that indicates success or failure. A list of error codes can be found in the SLSAPI.bas and are explained in the API reference (see on-line help: Sheriff.chm).
Call this method to check licence and run Sheriff ActiveX control in Automatic Mode.
To get the user's reference code.
To issue a licence with the user's reference code and its licence key.
To request a valid licence to run the application. AccessKey returns the feature access level defined by the licence.
To update licence on heartbeat.
To release licence as soon as the application does not need the licence.
byref AccessKey as Long) As long
To request a valid licence and reserve a number of units to run the application. AccessKey returns the feature access level defined by the licence.
byref UnitsGranted As long) As long
To update licence on heartbeat with the number of units consumed. In addition, to modify the number of units the application wants to reserve.
To release licence when the number units has been consumed in the session.
To issue a licence. The licence features should be set via the licence properties such as Meter, EndData etc. You need to support challenge to be able to issue a licence. Please refer to the Advanced demo for codes of how to make a challenge.
IssueLicence will also set the publisher's data.
To Import a licence.
To export a licence.
To remove a licence. The options are explained in the API reference. You need to support challenge to be able to remove a licence. Please refer to the Advanced demo for codes of how to make a challenge.
To terminate a licence.
To query current licence information. Licence information is returned in the licence and licence info properties, such as Type, State, EndDate, StartDate etc.
QueryLicenceInfo will also return the publisher's data.
Returns last error code.
Returns last error message
To retrieve the error message given an error code returned by any other method.
Used to make a challenge when calling IssueLicence or RemoveLicence.
To retrieve the current status code of the licence.
Sheriff only fires up the following event messages when running in the Automatic Mode.
Please refer to the previous sections for a description of these messages.