Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

User exception handler in C (Developers)

posted by tom Homepage, Germany (West), 30.07.2020, 23:54

> I'm not sure what all functions I can call from the handler, I would need
> just printf.
(f)printf requires a FILE object, which is at exception time possibly in use or not available.
use sprintf(), and your own logging to file, memory, or (windows) debug print monitor.



> I would also need to implement this mechanism in my windows kernel driver
> because it's annoying to let exception BSOD and restart whole computer. I
> don't know if kernel winapi have support of similar function to hook
> exception handler or would I have to do it in assembler.

most exceptions can be handled by
__try {...}
__except {...}

in userspace.

those that can't, often can't in the kernel. IMO the kernel/driver is supposed to check the arguments for correctness before executing on it.

AFAIK there is no 'catch all, log and ignore' method in Windows

Tom

 

Complete thread:

Back to the forum
Board view  Mix view
22049 Postings in 2034 Threads, 396 registered users, 244 users online (1 registered, 243 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum