Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Help With App Licenses

Help With App Licenses

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    IrishSonic
    wrote on last edited by
    #1

    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.

    J 1 Reply Last reply
    0
    • I IrishSonic

      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.

      J Offline
      J Offline
      JimmyRopes
      wrote on last edited by
      #2

      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.

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups