Contents - Index


4.2.3.1 About the SlsAPI

The Sheriff Licence System provides a management layer that can track the rights to use purchased software. You can incorporate licence enforcement and verification in your product by using the Sheriff Licence System Application Programming Interface (SLSAPI), a set of functions that provides licensing services within applications. SLSAPI-enabled applications can gain access to the SLSAPI interface through the protected dynamic-link library SLSAPI.DLL.

The SLSAPI-compliant product includes the following basic components:

  • An SLSAPI-enabled desktop application
  • The dynamic-link library SLSAPI.DLL
  • A Sheriff licence file that serves digital licence certificates

Alphabetical List of SLSAPI Functions

SLS_Connect Connects to a Sheriff network server
SLS_CreateChallenge Creates Challenge
SLS_ExportLicence Export licence
SLS_GetErrorMessage Returns the message string associated with a licensing service function status code.
SLS_GetPublisherData Enables publishers to retrieve their own data that is stored with the Licence Key
SLS_GetReference Returns licence reference code
SLS_GetStatusCode Get current licence status
SLS_GetUserCount Returns the total number of users who are using the product
SLS_GetVersion Get the current version numbers of the API libraries
SLS_ImportLicence Import licence
SLS_IsAdminAccount Checks whether the current user account is an admin account.
SLS_IsLimitedAccount Checks whether the current user account is a limited account.
SLS_IsProductInstalledChecks if the specified product has been installed on the machine
SLS_IsProductLicensedChecks if the specified product has been licensed on the machine
SLS_License Issues licensing policy programmatically
SLS_MoveLicence Move licence
SLS_QueryLicenceInfoReturns information about licence policy and licence usage
SLS_QueryUserInfo Returns information about the users who are using the specified product
SLS_Register Registers licence system in the user's PC
SLS_Release Requests that the licence system release the licensing resources associated with a specific licence context (compulsory).
SLS_Remove Removes the specified licence
SLS_RemoveEx Like SLS_Remove but with added security
SLS_Request Requests that the licence system grants the licensing resources so the calling application can execute (compulsory).
SLS_RequestEx Extended version of SLS_Request with extra parameter dwUserID.
SLS_SetLicence Issues licence with licence key
SLS_SetOptions Sets various options such as reclaim times
SLS_SetPermissions Sets write access permission to all relevant registry keys and files.
SLS_SetPublisherDataEnables publishers to store their own data with the Licence Key
SLS_SetSessionOptionsEnables publishers to relax the Sheriff machine locking when desired.
SLS_Terminate Terminates the specified licence
SLS_Update Updates the synchronisation between the licensed application and the licence system (compulsory).
SLS_VerifyChallengeVerifies Challenge