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. Application hibernation [modified]

Application hibernation [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
helpjavajsonquestion
11 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.
  • S Offline
    S Offline
    SelvaKr
    wrote on last edited by
    #1

    Hi, I have a requirement to keep an application alive even after an user logs off. i.e When the second user logs in, the applications that are opened by the first user should remain open. Is there any way to do this? As our appication would take more time to shutdown and startup we dont want to close it while log off. Can anybody help me out in resolving this...:) An another thing i dont want run my application as a service :(.... Is it possible to hibernate the application and wake up when the next user logs in? Can anybody tell me the concept of Identity Switching? Can this be employed to solve this issue? What happens when the Switch user is being called in Windows XP? Is there any API to accomplish this task? Platform : Windows Thanks, Selva -- modified at 4:25 Tuesday 21st November, 2006

    ~ Selva

    stefanmihaimogaS C M X 4 Replies Last reply
    0
    • S SelvaKr

      Hi, I have a requirement to keep an application alive even after an user logs off. i.e When the second user logs in, the applications that are opened by the first user should remain open. Is there any way to do this? As our appication would take more time to shutdown and startup we dont want to close it while log off. Can anybody help me out in resolving this...:) An another thing i dont want run my application as a service :(.... Is it possible to hibernate the application and wake up when the next user logs in? Can anybody tell me the concept of Identity Switching? Can this be employed to solve this issue? What happens when the Switch user is being called in Windows XP? Is there any API to accomplish this task? Platform : Windows Thanks, Selva -- modified at 4:25 Tuesday 21st November, 2006

      ~ Selva

      stefanmihaimogaS Offline
      stefanmihaimogaS Offline
      stefanmihaimoga
      wrote on last edited by
      #2

      SelvaKr wrote:

      to keep an application alive even after an user logs off. i.e When the second user logs in, the applications that are opened by the first user should remain open

      I think you need to wrote a windows service application. Good luck!

      S 1 Reply Last reply
      0
      • stefanmihaimogaS stefanmihaimoga

        SelvaKr wrote:

        to keep an application alive even after an user logs off. i.e When the second user logs in, the applications that are opened by the first user should remain open

        I think you need to wrote a windows service application. Good luck!

        S Offline
        S Offline
        SelvaKr
        wrote on last edited by
        #3

        Thanks for your reply Moga... But i dont want to keep my app as a service...Any other way apart from this... Is there any other way like XP's hibernation technique or only changing the user identities .... Thanks.

        ~ Selva

        1 Reply Last reply
        0
        • S SelvaKr

          Hi, I have a requirement to keep an application alive even after an user logs off. i.e When the second user logs in, the applications that are opened by the first user should remain open. Is there any way to do this? As our appication would take more time to shutdown and startup we dont want to close it while log off. Can anybody help me out in resolving this...:) An another thing i dont want run my application as a service :(.... Is it possible to hibernate the application and wake up when the next user logs in? Can anybody tell me the concept of Identity Switching? Can this be employed to solve this issue? What happens when the Switch user is being called in Windows XP? Is there any API to accomplish this task? Platform : Windows Thanks, Selva -- modified at 4:25 Tuesday 21st November, 2006

          ~ Selva

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          If you detect that your app is being closed, and store it's state to a local file, you can read it again when the app opens.  You would have to do something fairly funky for it to work like hibernation.

          Christian Graus - C++ MVP

          S 1 Reply Last reply
          0
          • C Christian Graus

            If you detect that your app is being closed, and store it's state to a local file, you can read it again when the app opens.  You would have to do something fairly funky for it to work like hibernation.

            Christian Graus - C++ MVP

            S Offline
            S Offline
            SelvaKr
            wrote on last edited by
            #5

            Hi Graus, Thanks for your reply. But this approach will again require all my supporting dlls to load again which will lead in time consumption again :-( Or is it possible to switch the identities of all the running applications instead of logoff/login. Will it change the user privilege of windows too? Thanks.

            ~ Selva

            C 1 Reply Last reply
            0
            • S SelvaKr

              Hi Graus, Thanks for your reply. But this approach will again require all my supporting dlls to load again which will lead in time consumption again :-( Or is it possible to switch the identities of all the running applications instead of logoff/login. Will it change the user privilege of windows too? Thanks.

              ~ Selva

              C Offline
              C Offline
              Christian Graus
              wrote on last edited by
              #6

              SelvaKr wrote:

              Or is it possible to switch the identities of all the running applications instead of logoff/login. Will it change the user privilege of windows too?

              No, that's not going to work.

              Christian Graus - C++ MVP

              1 Reply Last reply
              0
              • S SelvaKr

                Hi, I have a requirement to keep an application alive even after an user logs off. i.e When the second user logs in, the applications that are opened by the first user should remain open. Is there any way to do this? As our appication would take more time to shutdown and startup we dont want to close it while log off. Can anybody help me out in resolving this...:) An another thing i dont want run my application as a service :(.... Is it possible to hibernate the application and wake up when the next user logs in? Can anybody tell me the concept of Identity Switching? Can this be employed to solve this issue? What happens when the Switch user is being called in Windows XP? Is there any API to accomplish this task? Platform : Windows Thanks, Selva -- modified at 4:25 Tuesday 21st November, 2006

                ~ Selva

                M Offline
                M Offline
                Michael Dunn
                wrote on last edited by
                #7

                SelvaKr wrote:

                An another thing i dont want run my application as a service

                Why not? A service is exactly the solution to what you're asking.

                SelvaKr wrote:

                Is it possible to hibernate the application and wake up when the next user logs in?

                Why build your own keep-alive system when the OS already has one? I suppose you could make your app persist its state to a file, then read it back in on the next launch. But then it's not actually running after logoff.

                --Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ

                1 Reply Last reply
                0
                • S SelvaKr

                  Hi, I have a requirement to keep an application alive even after an user logs off. i.e When the second user logs in, the applications that are opened by the first user should remain open. Is there any way to do this? As our appication would take more time to shutdown and startup we dont want to close it while log off. Can anybody help me out in resolving this...:) An another thing i dont want run my application as a service :(.... Is it possible to hibernate the application and wake up when the next user logs in? Can anybody tell me the concept of Identity Switching? Can this be employed to solve this issue? What happens when the Switch user is being called in Windows XP? Is there any API to accomplish this task? Platform : Windows Thanks, Selva -- modified at 4:25 Tuesday 21st November, 2006

                  ~ Selva

                  X Offline
                  X Offline
                  XtremDev
                  wrote on last edited by
                  #8

                  Did you try to add a key in the following registry path "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" to automatically start your application for all users ?

                  S 1 Reply Last reply
                  0
                  • X XtremDev

                    Did you try to add a key in the following registry path "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run" to automatically start your application for all users ?

                    S Offline
                    S Offline
                    SelvaKr
                    wrote on last edited by
                    #9

                    Thanks for your reply.. But my app should not be closed while logoff.. I dont want to start it for each login since it would take more time to load.

                    ~ Selva

                    X 1 Reply Last reply
                    0
                    • S SelvaKr

                      Thanks for your reply.. But my app should not be closed while logoff.. I dont want to start it for each login since it would take more time to load.

                      ~ Selva

                      X Offline
                      X Offline
                      XtremDev
                      wrote on last edited by
                      #10

                      I see 2 solutions : - Create a service : I know that you dont want to do this...but a service is not closed on logoff - Use the Run Registry Key to launch your app for each logon and optimize the applicatino loading

                      S 1 Reply Last reply
                      0
                      • X XtremDev

                        I see 2 solutions : - Create a service : I know that you dont want to do this...but a service is not closed on logoff - Use the Run Registry Key to launch your app for each logon and optimize the applicatino loading

                        S Offline
                        S Offline
                        SelvaKr
                        wrote on last edited by
                        #11

                        Thanks buddy :-)

                        ~ Selva

                        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