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. Regarding application expiration

Regarding application expiration

Scheduled Pinned Locked Moved C / C++ / MFC
help
15 Posts 5 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.
  • H H4u32

    Thanks for your reply. I also thought about the suggestion for getting global time from server till PC is connected to Internet that you have mentioned. But that's not my requirement. what could be the other way to do so?? As I told you that i need to expire it on particular date. Your suggestion would work if i need to expire it after number of days from its installation. Please help me out if you still have some suggestions. by the way thanks again for you reply. Thanks

    S Offline
    S Offline
    Saurabh Garg
    wrote on last edited by
    #4

    As far as I know there is no way to determine the correct time irrespective of the time user has set in the machine. Actually if you think about it there is no such thing as correct time. In Singapore the current time is 15:15 07-11-08, in India it is 12:45 07-11-08 but in Los Angeles it is 11:15 PM on 06-11-08. So which one will you choose? -Saurabh

    H 1 Reply Last reply
    0
    • S Saurabh Garg

      As far as I know there is no way to determine the correct time irrespective of the time user has set in the machine. Actually if you think about it there is no such thing as correct time. In Singapore the current time is 15:15 07-11-08, in India it is 12:45 07-11-08 but in Los Angeles it is 11:15 PM on 06-11-08. So which one will you choose? -Saurabh

      H Offline
      H Offline
      H4u32
      wrote on last edited by
      #5

      yaa... I think you are right. Let me think over hoe to accomplish it. Thank you very much for your replies. Thanks

      S 1 Reply Last reply
      0
      • H H4u32

        yaa... I think you are right. Let me think over hoe to accomplish it. Thank you very much for your replies. Thanks

        S Offline
        S Offline
        Saurabh Garg
        wrote on last edited by
        #6

        I think you should be asking why do I need to do that? What actually am I trying to accomplish? -Saurabh

        H 1 Reply Last reply
        0
        • S Saurabh Garg

          I think you should be asking why do I need to do that? What actually am I trying to accomplish? -Saurabh

          H Offline
          H Offline
          H4u32
          wrote on last edited by
          #7

          I didn't get you in your previous reply. If you are asking what i am trying to accomplish is clear. I want to expire my application on particular date. but i can't use local time/date to check it as user may change its local time/date. That's why i am thinking of some other way. Please help me if u have some suggestions for me. Thanks

          S 1 Reply Last reply
          0
          • H H4u32

            Hello all, I am building Win32 application. My requirement is to expire this application on a particular date let say for e.g. on 31 december, 2008. If i use system's local time then user will be able to run it by changing its date/time. So is there any way to get global time in my VC application. Please help me out in this situation. Any help would be greatly appreciated. Thanks

            B Offline
            B Offline
            beko
            wrote on last edited by
            #8

            Hello, you can save the current date every time the program runs, so you can check against the date for alterations. Hope this helps Bekir.

            S 1 Reply Last reply
            0
            • H H4u32

              I didn't get you in your previous reply. If you are asking what i am trying to accomplish is clear. I want to expire my application on particular date. but i can't use local time/date to check it as user may change its local time/date. That's why i am thinking of some other way. Please help me if u have some suggestions for me. Thanks

              S Offline
              S Offline
              Saurabh Garg
              wrote on last edited by
              #9

              I don't think that is the goal. If that is the goal then may I ask why do you want you application to suddenly stop working for every user. What purpose the purpose of this? There is no suggestion I can give you for finding time, even if you assume that you want time in a particular time zone. As far as I know there is no way for a standalone computer to determine current time. In fact no device can have such capability because time is not absolute. -Saurabh

              1 Reply Last reply
              0
              • B beko

                Hello, you can save the current date every time the program runs, so you can check against the date for alterations. Hope this helps Bekir.

                S Offline
                S Offline
                Saurabh Garg
                wrote on last edited by
                #10

                What if date has been altered before program was installed? Saurabh

                B 1 Reply Last reply
                0
                • H H4u32

                  Hello all, I am building Win32 application. My requirement is to expire this application on a particular date let say for e.g. on 31 december, 2008. If i use system's local time then user will be able to run it by changing its date/time. So is there any way to get global time in my VC application. Please help me out in this situation. Any help would be greatly appreciated. Thanks

                  N Offline
                  N Offline
                  Nishad S
                  wrote on last edited by
                  #11

                  My suggestion is to follow what beko said. In addition to that you can mark it as expired once the expiry date reached. After that you should not allow the application to continue working even if the date is changed back.

                  - NS - [ODBaseBtn]

                  H 1 Reply Last reply
                  0
                  • N Nishad S

                    My suggestion is to follow what beko said. In addition to that you can mark it as expired once the expiry date reached. After that you should not allow the application to continue working even if the date is changed back.

                    - NS - [ODBaseBtn]

                    H Offline
                    H Offline
                    H4u32
                    wrote on last edited by
                    #12

                    Thank u to all. I really appreciate your help. I got a clue from all of your replies. Again thanks a lot to u all.

                    1 Reply Last reply
                    0
                    • S Saurabh Garg

                      What if date has been altered before program was installed? Saurabh

                      B Offline
                      B Offline
                      beko
                      wrote on last edited by
                      #13

                      Hello, Either limit the number of days also or if you are providing a license, do not proceed if the supplied date is earlier than the start date of the license. You could also use both, if you want it. The only drawback of this approach is that, if the user changes the date to an earlier date for any purpose (reports :)), and mistakenly opened your program also, he/she would be pissed off ;P . Bekir.

                      S 1 Reply Last reply
                      0
                      • H H4u32

                        Thanks for your reply. I also thought about the suggestion for getting global time from server till PC is connected to Internet that you have mentioned. But that's not my requirement. what could be the other way to do so?? As I told you that i need to expire it on particular date. Your suggestion would work if i need to expire it after number of days from its installation. Please help me out if you still have some suggestions. by the way thanks again for you reply. Thanks

                        D Offline
                        D Offline
                        David Crow
                        wrote on last edited by
                        #14

                        Hemang Raval wrote:

                        Your suggestion would work if i need to expire it after number of days from its installation.

                        If you already know that 31-Dec-2008 is the expiration date, and you installed the software today, then simply set the value to 53.

                        "Love people and use things, not love things and use people." - Unknown

                        "The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch

                        1 Reply Last reply
                        0
                        • B beko

                          Hello, Either limit the number of days also or if you are providing a license, do not proceed if the supplied date is earlier than the start date of the license. You could also use both, if you want it. The only drawback of this approach is that, if the user changes the date to an earlier date for any purpose (reports :)), and mistakenly opened your program also, he/she would be pissed off ;P . Bekir.

                          S Offline
                          S Offline
                          Saurabh Garg
                          wrote on last edited by
                          #15

                          Actually that is the interesting thing. OP do not want to disable application after a given number of days, he wants to disable it on a particular date. -Saurabh

                          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