Help With App Licenses
-
Hiya I need to learn about licensing an app. Such as you have an app and say the maximum licence is 5, when 5 of the app are open, no others can be accessed. I don't have a clue how to start to do this. Does anyone have any tutorials on app licensing?? Thanks.
-
Hiya I need to learn about licensing an app. Such as you have an app and say the maximum licence is 5, when 5 of the app are open, no others can be accessed. I don't have a clue how to start to do this. Does anyone have any tutorials on app licensing?? Thanks.
You can accomplish this by using a semaphore or a memory mapped file (MMF). If a simple count is all you need then a semaphore will do nicely. If you need to share additional information you will need a MMF. For a semaphore you set the maxium resource count to the number of licenses you wish to grant. That way only the specified number of processes can obtain the semaphore at any one time and any additional processes can be terminated. For a memory mapped file you save a counter and when the number of licensed applications currently running is exceeded you deny any more processes from starting. There are synchronization issues associated with any inter thread (process) communications and MMF sharing of information is no exception. If you need to know more about synchronization issues respond to this post and I will give more details.