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. Program expiration

Program expiration

Scheduled Pinned Locked Moved C / C++ / MFC
question
4 Posts 4 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.
  • J Offline
    J Offline
    JohnnyNin
    wrote on last edited by
    #1

    I want to make my program expire after 30 days. What's the best way to implement this? I just need a simple solution, one that will prevent normal users from bypassing the expiration. Thanks! Johnny Wood

    C I P 3 Replies Last reply
    0
    • J JohnnyNin

      I want to make my program expire after 30 days. What's the best way to implement this? I just need a simple solution, one that will prevent normal users from bypassing the expiration. Thanks! Johnny Wood

      C Offline
      C Offline
      Chris Losinger
      wrote on last edited by
      #2

      1. get the current time 2. read a registry key that your program owns HKCU/Software/MyCompany/Whatever... 3. if that key doesn't exist, create it and write the current time there. this wil happen the first time your app runs. 4. if the key does exists, read the time stamp that was stored there and compare it to the current time. -c


      To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses.
         /. #3848917

      image effects!

      1 Reply Last reply
      0
      • J JohnnyNin

        I want to make my program expire after 30 days. What's the best way to implement this? I just need a simple solution, one that will prevent normal users from bypassing the expiration. Thanks! Johnny Wood

        I Offline
        I Offline
        includeh10
        wrote on last edited by
        #3

        save lastest date in register or a file, make sure ur user can't find it avoid to use 'current time', so if user changes time setting, the app still expired includeh10

        1 Reply Last reply
        0
        • J JohnnyNin

          I want to make my program expire after 30 days. What's the best way to implement this? I just need a simple solution, one that will prevent normal users from bypassing the expiration. Thanks! Johnny Wood

          P Offline
          P Offline
          Peter Occil
          wrote on last edited by
          #4

          There is an article on this site regarding this: CExpire Peter O.

          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