I currently capture MiniDumps of unhandled exceptions using SetUnhandledExceptionFilter
however at times I am getting "R6025: pure virtual function".
I understand how a pure virtual function call happens I am just wondering if it is possible to capture them so I can create a MiniDump at that point.
Try defining the offending pure virtual. There is nothing in the C++ rules that prohibit you from defining a pure virtual, and you can use this for a number of reasons, the least of which is getting a backtrace on the call. The only caviat is the definition must be outside the declaration (
virtual void bla() = 0 { }
is not valid).If you want to catch all crashes you have to do more than just: SetUnhandledExceptionFilter
I would also set the abort handler, the purecall handler, unexpected, terminate, and invalid parameter handler.
And in your main put this:
The above will send all crashes to your unhandled exception handler.
See this answer here to the question where do “pure virtual function call” crashes come from?.
So, in your purecall handler, make your minidump.