Google Search

Google
 

Wednesday, July 23, 2008

Video: Using Application Restart and Recovery

Presenter:Mike Taulty

Windows Vista has new capabilities around detecting application crashes, and providing the application with the ability to restart itself in the event of a crash and to recover the user's data. In this session we explore these new Restart and Recovery APIs.

The following text is a software generated transcript of the video. Click on a minute link to jump to a location within the video


Minute 0

Well and will consist on an added session is one in a series of short services will look at how it induces visual studio net framework minus like Tolkien working the developer and platform group in Microsoft in the UK and in this section is one of a number around me features within the sister so here I visual studio developers on the application are already built and if we just go ahead and

Minute 1

Run application and running this was control a fire surrounds that side of the debugger deification unloving has a label and can see a time is ticking away here town is how long the applications are running for after 60 seconds it will enable Scotland Bosnia would let me crash the application the video is that we can get in a 62nd mark rather than having to wait for it okay applications run to nearly 60 seconds and now we get is a button enables and we can crash the application but where do that before the crash on the application Windows error reporting kicks in Malaga switches off actually got left on and off the track over their reporting will cancel their and any application crashes and that s the end of the application to this is the standard and illegally deceiving not using something I ve application restart and recovery

Minute 2

Up there that will deliver the code but the government is found in a code at the moment let s firstly go ahead on common literature and thought register the restart is not uncommon that Ireland must go to the definition for a two at operating system method and a Win32 function register application restart and be just built a platform invocation wrap of other and what this is a tasty fantasy one is a string second round here is that some flags with

Minute 3

Down if a hand and at the law will be to save restart the application even if it seems to be getting into a cyclical loop where it restarts clashes restart crashes and so on and so forth know you could do is you can use this Yugoslav something that we do here we get every farm every time the application starts up and we passed into register application restart so every 10 seconds or so we can be selling stated that every file and if the application clashes with it is little and ultimately to go via I ve had another routine here

Minute 4

File and findings at a label to note the fact that we were restarted rather than started at her head and rerun at this point and single atoms are run as debugger 20 application as it was started rather than restarted but certainly it against a 62nd Villa so why is evacuated to 60 seconds is essentially the operating system once it is an confidence of the application loonies running successfully before it allows it to the restart recovery and the winners are reporting with the adding council that and is standing a different energy we can see a

Minute 5

Is used pasta supper and parameter to the application to say this is your say file and you have been restarted so there was a previously we could do is save states of every 10 seconds of something like that into this terribly file and then in the eventuality where the application crashes in its restarted we can all look at that and refile we can reload data from that and would provide the user with a better experience of crashing but read ultimately recovering their data from so we can do in code is we can also register for application recovery is uncommon and will take a look at the definitions function sold again this is symptomatic or withdrawal of the Win32 API register application recovered callback and we provide

Minute 6

Is a callback routine is always saying here in search of the application crash just before it s shut down by the operating system we want to come back in this routine here on application recovery so that we can try and save any data that we need to save on his behalf is about having to speculatively save data

Minute 7

To say we did manage to do the application recovery and are finally all we do in our particular routine here is the right to temporary file detects that the user has poured into the textbooks on screen in our little framework one clash with a golden application recovery was so validated to the file when we restart will get past that file name and will go to reload it show the use of the data ago so let s go ahead and rerun the application again with recovery in place that is little evidence when that s life and again similar videos of it after what is 60 seconds back after 55 seconds away from

Minute 8

The application restarts we get our recovery routine called and you can see that we have managed to assess the note the application knows it was restarted it has gathered at the data that was saved on the user s behalf solidarity users application crash we knew that we saved off the estate fallen we got restarted by the operating system and we went in and gathered to stay on the half of the user were sent to the bottom of this file I went ahead and imported them using the of import from Col 32 they all live in the can

Minute 9

That studio allow and you can use the invoked pretty much to bring these things in and it works where you expected to work our thing to say about bringing the standard routines in especially to the application recovery callback is unique to think about where your code may be at the point where you actually get callback because your application is crashed over just how I d overthrow the file in my particular recovery routine I tried to make sure that I don t depend on very much in this routines and is to beat fading ink and file and capture text they are both static pieces of data they don t belong to any particular member on any class that a static data as of the dependencies of this routing in a very small

Minute 10

Is recovery that is the user justice arrival is even a short session winners this person knew a guys around what to do an applications crash we can register ourselves for application restart we provide a spring that will be customers in the event of a restart as an additional command line parameter needed at further with application recovery is and the thing is that it is these together to build a nice little framework

Minute 11

Has well and you can make these three things tied together quite nicely thought it was all follow up and subsequent session will talk about what happened with Windows error reporting what s changed there and trying time back to application restart a recovery and bring those two things together what should you do if you want more information on this topic on others in MSDN developer sent to them it is a screen for Windows is it more information of the cystic video and a freestanding e mail my e mail address is onscreen and that thank you for listening the event is useful and will catch

Click here to go to original video page

No comments: