Does anybody know where there is some example code to hook
into a CPU exception, put in my own code, then pass onto the default
Windows handler?
I want to "talkback enable" my program, post an email with an
error report to me. I got inspired by Mozilla, which does this.
Regards,
into a CPU exception, put in my own code, then pass onto the default
Windows handler?
I want to "talkback enable" my program, post an email with an
error report to me. I got inspired by Mozilla, which does this.
Regards,
You can change ErrorHandler to suit your needs and extended its simple MessageBox error display.
Wow, that was quick, I just posted the question, got your reply
one minute later!
Thanks, comrade, I'll unzip and study the code!
one minute later!
Thanks, comrade, I'll unzip and study the code!
Hi All! It's my .try-.catch-.finally macro
Your comments...
Your comments...
I have just found some more example code at Programmer's Heaven:
http://www.programmersheaven.com/zone15/cat245/index.htm
It's called "except32.zip" and is in assembly code.
http://www.programmersheaven.com/zone15/cat245/index.htm
It's called "except32.zip" and is in assembly code.
I have worked out this really really really simple code:
final_handler PROC STDCALL USES ebx esi edi, pexcept:DWORD
invoke MessageBox,0,ADDR szfatalmess,0,MB_OK
mov eax,1 ;=1 terminate process without showing system message box
ret
final_handler ENDP
start:
;i want to hook the fatal crash of app...
invoke SetUnhandledExceptionFilter,ADDR final_handler
..................
Right at program entry, I call SetUnhandledExceptionFilter().
For any fatal exception, I get my own messagebox and termination of my app.
This is all I need, except that I now need to expand it
-- I have to get the register values when it crashed and give option to
email them to me. I know how to do the email part, but getting the crash
data -- I presume that parameter "pexcept" -- a pointer to a data structure
-- has something to do with it.
Regards,
Barry Kauler
final_handler PROC STDCALL USES ebx esi edi, pexcept:DWORD
invoke MessageBox,0,ADDR szfatalmess,0,MB_OK
mov eax,1 ;=1 terminate process without showing system message box
ret
final_handler ENDP
start:
;i want to hook the fatal crash of app...
invoke SetUnhandledExceptionFilter,ADDR final_handler
..................
Right at program entry, I call SetUnhandledExceptionFilter().
For any fatal exception, I get my own messagebox and termination of my app.
This is all I need, except that I now need to expand it
-- I have to get the register values when it crashed and give option to
email them to me. I know how to do the email part, but getting the crash
data -- I presume that parameter "pexcept" -- a pointer to a data structure
-- has something to do with it.
Regards,
Barry Kauler