Samples

The following example code can be used right out of the box.  These examples are also included with the software (both demo and full versions) in these and other supported language interfaces.


An example of using simple uncounted node-locked licensing.


An example of using a floating license with the floating license server


An example of obtaining a node-locked license from the Product Activation Server.  e.g. (your app "calls home" to get a license from your hosted site that sets rules for issuing licenses)


An example of obtaining a floating license from the Product Activation Server.  e.g. (your app "calls home" to get a license from your hosted site that sets rules for issuing licenses)


An example of your app getting a list of licenses that are checked out on its behalf.


An example of your app querying the license server to see what licenses it is serving up and current license counts.


An example of a much more detailed license server query, with details about checked out licenses by all users connected to the license server.  Things such as thread ID, socket file descriptor, IP address, PID, process name, username, hostname, component, version and count of each checked out license on the queried license server.


An example of using a "vendor defined host ID" where you can have your own unique host ID, such as a finger print scanner, dongle, or whatever your unique needs are.  The sky is the limit.  This example builds a very simple composite ID made up of the username and hostname.


© 2023 Persistent Security, LLC