Contents - Index


4.5.1 Extended ActiveX Control - SlsLocalComEx.dll

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

  1. Type
  2. 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.

  3. IsReusableKey
  4. 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.

  5. IsReusableRef
  6. Sets the user Reference Code to be reusable.

  7. IsExportable
  8. Defines whether or not a licence is exportable.

  9. IsStandalone
  10. 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.

  11. IsTimeMeter
  12. Define whether the licence is limited by a number of days that is defined by the Meter property.

  13. IsUnitMeter
  14. Define whether the licence is limited by a number of units that is defined by the Meter property.

  15. IsSetExpiration
  16. Defines whether the licence will expire by the predefined date that is set by the EndDate property.

  17. IsSetCoUsers
  18. Defines whether the licence has the concurrency limit that is specified by CoUsers.

  19. Meter
  20. Defines the maximum number of days if the IsTimeMeter is set, or the maximum number of units if the IsUnitMeter is set.

  21. EndDate
  22. Defines the expiration date if the IsSetExpiration is set.

  23. CoUsers
  24. Define the maximum concurrent users that can use the licence simultaneously, if the IsSetCoUsers is set.

  25. AccessKey
  26. Defines the feature access level.

  27. ProductID
  28. 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.

  29. Secret1, Secret2, Secret3, Secret4
  30. Product Secret Codes.

  31. ReferenceCode
  32. Product Reference Code

  33. MajorVersion
  34. The major version number of the control

  35. MinorVersion
  36. The minor version number of the control

Methods

  1. GetLicenceKey As String
  2. 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.

  3. Succeeded As Boolean
  4. Succeeded is called to check whether the previous method succeeded or failed.

  5. GetLastErrorCode as long
  6. If the method Succeeded returns false, you can call GetLastErrorCode to return the error code.

  7. GetLastErrorMessage as String
  8. Or, if the method Succeeded return false, you can call GetLastErrorMessage to get the error message.

  9. GetRemovePassword(bstrRemoveReference As String) As String
  10. 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.

  11. VerifyStatusCode(bstrStatusCode As String) As Boolean
  12. 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.

  13. VerifyTerminationCode(bstrTerminationCode As String) As Boolean
  14. 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.