Announcement

Collapse
No announcement yet.

SDK Resume Next

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • SDK Resume Next

    As many of you know, I have been working on some error-handling routines, and just about have it, but the latest problem I have is the SDK equivalent for "RESUME NEXT"

    The Docs say that
    "EXCEPTION_CONTINUE_EXECUTION" = Return from UnhandledExceptionFilter and continue execution from the point of the exception. Note that the filter function is free to modify the continuation state by modifying the exception information supplied through its LPEXCEPTION_POINTERS parameter.
    But that equates to a "RESUME"

    I tried modifying the address of the error, but did not work. Am I going about it the wrong way??? or does anyone have code that can show me how to correctly continue execution, but at the line after the line that caused the problem???
    Engineer's Motto: If it aint broke take it apart and fix it

    "If at 1st you don't succeed... call it version 1.0"

    "Half of Programming is coding"....."The other 90% is DEBUGGING"

    "Document my code????" .... "WHYYY??? do you think they call it CODE? "

  • #2
    Cliff,
    look here:


    The 3rd exammple, which resumes at an error trap, can equally resume at any other user supplied address.

    Paul.

    Comment


    • #3
      That was exactly the point where I got stuck when I tried this several years ago.

      But the link supplied by Mr. Dixon may let me pick up where I left off... assuming I can even find my original code or even what I posted here as a starting point. Oh, well, it can't hurt to start over, it's not like it's a lot of code or anything.

      [LATER]
      Found it, from 12/16/04

      [/LATER]
      Last edited by Michael Mattias; 18 May 2009, 09:11 AM.
      Michael Mattias
      Tal Systems (retired)
      Port Washington WI USA
      [email protected]
      http://www.talsystems.com

      Comment


      • #4
        Originally posted by Michael Mattias View Post
        That was exactly the point where I got stuck when I tried this several years ago.

        But the link supplied by Mr. Dixon may let me pick up where I left off... assuming I can even find my original code or even what I posted here as a starting point. Oh, well, it can't hurt to start over, it's not like it's a lot of code or anything.
        An advantage I find to starting over "fresh" (as opposed to updating/reworking previous code) is that I often have a new/different perspective on things. The problem (and old code) has been running around in the deep recesses of my brain. Plus in the meantime I have (probably) lerarned new/better/cleaner coding techniques that allow me to approach the problem from a (slightly?) different angle.
        Oh, ... so sad. You just lost the advantage of a "fresh start" and are now trapped in old thinking/coding/processes. {shiver}

        =====================================
        We owe to the Middle Ages
        the two worst inventions of humanity
        romantic love and gunpowder.
        André Maurois
        =====================================
        It's a pretty day. I hope you enjoy it.

        Gösta

        JWAM: (Quit Smoking): http://www.SwedesDock.com/smoking
        LDN - A Miracle Drug: http://www.SwedesDock.com/LDN/

        Comment


        • #5
          I'll start with "what I had," but by the time I'm done with it I'll usually have rewritten all the real code anyway.

          "What I had" does, however, cut out some of the 'grunt work'... e.g., looking up the declares and the UDT member names; and if you wrote yourself notes when you first did it (as I do) , some of the 'gotchas' for which you must test.
          Michael Mattias
          Tal Systems (retired)
          Port Washington WI USA
          [email protected]
          http://www.talsystems.com

          Comment


          • #6
            Thank you

            Paul,
            1st off I must say THANK YOU, THANK YOU, THANK YOU!!!!!!!

            Your code (although PBCC and Assembly) was enough to show me a VERY stuck point. that from the docs I would NEVER have gotten because I decided to ignore assembly for the time being.
            (There may be a way in windows, but not tested yet)

            Anyways, realizing I was on track with my thought of RESUME NEXT was correct that the next line was the Exception Address + the size of the address.

            I am back on my way to Error handling at runtime (and hoping to post tonight, if I can)

            For General...
            MCM may want to find his "Sure its a GPF but" post (I can not find it at the moment)
            and the fun part is my perch on the fence between 2 camps is I can see each volley of fire. (As long as I do not accidently get caught in the crossfire)

            I have a bit of cleaning up to do, and commenting, but hopefully tonight or tomorrow expect a posting on my findings, and shortcomings.
            Engineer's Motto: If it aint broke take it apart and fix it

            "If at 1st you don't succeed... call it version 1.0"

            "Half of Programming is coding"....."The other 90% is DEBUGGING"

            "Document my code????" .... "WHYYY??? do you think they call it CODE? "

            Comment

            Working...
            X