I was trying to track down a mysterious GPF in my dll that only occurs when I do a precise step of sequences, and have spent days verifying that pointers are good, and all threads are closed, and anything I could think of that might cause the crash, and still can not find it.
Then I was searching the forums for what else could be a corrupted memory location, or anything else that could GPF, and ran into one that MCM wrote about a year ago Sure its a GPF but....
In it the point was made that you could raise your own exceptions, so I started thinking. If you can raise one, then there must be a way to read one and act on it?
Sure enough looking in the Win32 help files, I found "GetExceptionInformation" which I think may be my answer, but could not find any examples to show me just how to use it (or if I even understand the documentation correctly)
Does anyone have some examples or point me the right direction? I would like to be able to build into my dll that when an unhandled exception occurs I can either take care of it, or log it when it occurs, and not later on (like when closing the program)
Side Note: Compiled as EXE I get no GPF, Compiled as DLL I get no GPF if I push a button that does my cleanup, but if I programmatically press the button from code, then I get a GPF when closing. (Which is really starting to make me think, that where I am looking is NOT where the exception occurred.
Then I was searching the forums for what else could be a corrupted memory location, or anything else that could GPF, and ran into one that MCM wrote about a year ago Sure its a GPF but....
In it the point was made that you could raise your own exceptions, so I started thinking. If you can raise one, then there must be a way to read one and act on it?
Sure enough looking in the Win32 help files, I found "GetExceptionInformation" which I think may be my answer, but could not find any examples to show me just how to use it (or if I even understand the documentation correctly)
Does anyone have some examples or point me the right direction? I would like to be able to build into my dll that when an unhandled exception occurs I can either take care of it, or log it when it occurs, and not later on (like when closing the program)
Side Note: Compiled as EXE I get no GPF, Compiled as DLL I get no GPF if I push a button that does my cleanup, but if I programmatically press the button from code, then I get a GPF when closing. (Which is really starting to make me think, that where I am looking is NOT where the exception occurred.
Comment