Contents - Index SLSAPI Integration

This section provides an example of how to incorporate the Sheriff Licence System Application Programming Interface (SLSAPI) functions in your application, with and without challenge protocol.

Before you begin coding your application, you will need to obtain your Product ID and Secret Codes, either by purchasing a Serial Number or using the evaluation versions. You also need the Sheriff SDK which includes the dynamic link library SLSAPI.DLL and source code for implementing the challenge/response in your application.

To code the application

  1. Choose and implement your licensing strategy. For examples, see "Licensing Strategies".
  2. Incorporate the source codes provided in SDK to prepare the challenge.
  3. Add calls to the SLS_Request functions in your application to grant licence resources.
  4. Include periodic calls to the SLS_Update function to notify the licence system that the current licence is still being used.
  5. Incorporate code to handle errors. Call the SLS_GetErrorMessage function to return a message string that describes the error.
  6. Call SLS_Release to release licence resources before exiting from the application.