dcsimg
Results 1 to 10 of 10

Thread: how to let .exe into Hibernate and wake 1.exe

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2017
    Posts
    74

    how to let .exe into Hibernate and wake 1.exe

    run 1.exe -> 1.exe Calculate a lot of data and stored in memory -> use mouse click windows xp Hibernate button -> wake windows xp -> 1.exe Still keep all last memory data

    '====================

    Excuse me

    Is there a way to do the following ?

    ( or What software can achieve the following . Vmware is not the way I want , I only want hibernate 1.exe not is whole windows xp )

    run 1.exe -> 1.exe Calculate a lot of data and stored in memory -> stored 1.exe whole memoroy data to dsik file ( named 1.map ) as like windows XP Hibernate file -> terminate 1.exe -> use 1.map to wake 1.exe -> 1.exe Keep all last memory data
    Last edited by quickbbbb; Nov 19th, 2019 at 08:49 AM.

  2. #2
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,619

    Re: how to let .exe into Hibernate and wake 1.exe

    Do you want to hibernate a single application?
    If not can you please rephrase your question...

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2017
    Posts
    74

    Re: how to let .exe into Hibernate and wake 1.exe

    .....
    Last edited by quickbbbb; Nov 19th, 2019 at 09:31 AM.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    Jun 2017
    Posts
    74

    Re: how to let .exe into Hibernate and wake 1.exe

    yes

    I want to hibernate a single application

    and when I wake 1.exe , 1.exe must be resume to Last state

  5. #5
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    1,999

    Re: how to let .exe into Hibernate and wake 1.exe

    If i understood him correctly:
    1) He runs 1.exe, which crunches a lot of data, which takes a lot of time
    2) For whatever reasons, he wants to "hibernate" (=stop) his 1.exe (User shuts down his computer, etc.)
    3) He wants to dump all of the Data into a "1.map" including the current STATE of the calculation
    4) terminate 1.exe
    5) next day (or whenever) he wants to restart 1.exe with the data from 1.map, and continue from where he left off

    Well, what comes to mind for
    3+4) catching the shutdown-signal of the OS --> If OSShutDown Then DumpData --> CloseProgram (-->OSShutDown continues)
    5) is reading the command-line-argument and/or associating the file-extension "*.map" with his program (entering his program and/or the "1.map" into the AutoStart of the computer not withstanding)
    One System to rule them all, One IDE to find them,
    One Code to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    For health reasons i try to avoid reading unformatted Code

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Jun 2017
    Posts
    74

    Re: how to let .exe into Hibernate and wake 1.exe

    Quote Originally Posted by Zvoni View Post
    If i understood him correctly:
    1) He runs 1.exe, which crunches a lot of data, which takes a lot of time
    2) For whatever reasons, he wants to "hibernate" (=stop) his 1.exe (User shuts down his computer, etc.)
    3) He wants to dump all of the Data into a "1.map" including the current STATE of the calculation
    4) terminate 1.exe
    5) next day (or whenever) he wants to restart 1.exe with the data from 1.map, and continue from where he left off

    Well, what comes to mind for
    3+4) catching the shutdown-signal of the OS --> If OSShutDown Then DumpData --> CloseProgram (-->OSShutDown continues)
    5) is reading the command-line-argument and/or associating the file-extension "*.map" with his program (entering his program and/or the "1.map" into the AutoStart of the computer not withstanding)
    100% Completely correct !!


    my english is very poor
    Last edited by quickbbbb; Nov 19th, 2019 at 09:45 AM.

  7. #7
    Frenzied Member
    Join Date
    Feb 2017
    Posts
    1,931

    Re: how to let .exe into Hibernate and wake 1.exe

    I think you have to make your own logic. What does this 1.exe do? How is that large data in memory, in byte arrays?
    If it is in a byte array, save the byte array to disk in a binary file when the program has to hibernate.
    Where are the "states", in variables? Save the variables in an INI file or similar.
    If the program has a couple of windows opened and some textboxs filled with some texts, you could save those states too.

    You also need to handle what happens if when the exe wakes up the conditions have changed, for example a file that it was analyzing doesn't exist any more or it changed.

    For Windows it is "easier" because it hibernates everything, it has no problem with the surrounding environment that could have changed.
    Still, if the user disconected an USB drive that some program was using, when it wakes-up I don't know how it handles that... (for example). Perhaps the program will raise an error or just crash.

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Jun 2017
    Posts
    74

    Re: how to let .exe into Hibernate and wake 1.exe

    Quote Originally Posted by Eduardo- View Post
    I think you have to make your own logic. What does this 1.exe do? How is that large data in memory, in byte arrays?
    If it is in a byte array, save the byte array to disk in a binary file when the program has to hibernate.
    Where are the "states", in variables? Save the variables in an INI file or similar.
    If the program has a couple of windows opened and some textboxs filled with some texts, you could save those states too.

    You also need to handle what happens if when the exe wakes up the conditions have changed, for example a file that it was analyzing doesn't exist any more or it changed.

    For Windows it is "easier" because it hibernates everything, it has no problem with the surrounding environment that could have changed.
    Still, if the user disconected an USB drive that some program was using, when it wakes-up I don't know how it handles that... (for example). Perhaps the program will raise an error or just crash.
    I have already thought about the method you mentioned, but this is the method that will be considered at the end. Because 1.exe about 100,000 lines of code, there is a very large number of variables, arrays, class that stored the results of the calculation process

    the method you mentioned Will be a very difficult job


    So I want to ask if there is a software similar to Vmware or vb6 codes, but only let a single application hibernate .

    Quote Originally Posted by Arnoutdv View Post
    To my knowledge most virtual machines can be suspended.
    So start your application in a virtual machine like vmware and when needed pause the vm and restart when needed
    I know it .

    I often use virtual machine vmware, but the virtual machine can only hibernate the entire operating system, not just a single application.
    Last edited by quickbbbb; Nov 20th, 2019 at 03:34 AM.

  9. #9
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,619

    Re: how to let .exe into Hibernate and wake 1.exe

    To my knowledge most virtual machines can be suspended.
    So start your application in a virtual machine like vmware and when needed pause the vm and restart when needed

  10. #10
    PowerPoster Zvoni's Avatar
    Join Date
    Sep 2012
    Location
    To the moon and then left
    Posts
    1,999

    Re: how to let .exe into Hibernate and wake 1.exe

    His requirement reminds me kinda of that BOINC-Thingy (in particular Seti@Home)
    One System to rule them all, One IDE to find them,
    One Code to bring them all, and to the Framework bind them,
    in the Land of Redmond, where the Windows lie
    ---------------------------------------------------------------------------------
    People call me crazy because i'm jumping out of perfectly fine airplanes.
    ---------------------------------------------------------------------------------
    For health reasons i try to avoid reading unformatted Code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width