SlsLocalComEx.dll is the ActiveX version of the Sheriff Extended API ( SlsLocalEx.dll). As an ActiveX control, it is much easier to implement in scripting or programming environments like VB, VBA, VBScript and JavaScript. The ASP demo project shows how to use the extended Sheriff ActiveX control in an Internet Software Registration system. Properties
Type of licence. Its values are explained in the SDK. With an ActiveX control you don't need to manipulate it directly, instead you will want to set the following properties, such as IsReusableKey, IsTimeMeter etc., which are breakdowns 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 not 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. Defines whether the licence has the concurrency limit that is specified by CoUsers. 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. Define the maximum concurrent users that can use the licence simultaneously, if the IsSetCoUsers is set. Defines the feature access level. 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. Product Secret Codes. Product Reference Code The major version number of the control The minor version number of the control Methods
Before calling this method to generate the licence key, you need to make sure that the properties are initialised properly, such as the ProductID, ReferenceCode, Secret Codes and the licence features that you wish to issue. GetLicenceKey returns the licence key on success. Succeeded is called to check whether the previous method succeeded or failed. If the method Succeeded returns false, you can call GetLastErrorCode to return the error code. Or, if the method Succeeded return false, you can call GetLastErrorMessage to get the error message. This method generates a password for removing licence files. The remove Reference Code is provided in bstrRemoveReference; the method returns the password. Method Succeeded can be called to check whether or not this method has succeeded. This method is called to verify the licence Status Code which is provided by bstrStatusCode. If the method succeeded true is returned otherwise false is returned. Licence features are returned in properties. This method is called to verify the Termination Code given by the user who wishes to terminate his/her licence; the Termination Code is passed through bstrTerminationCode. If the method succeeded true is returned otherwise false is returned. Licence features prior to termination are returned in properties. |