I wrote a code that is able to create data about the coverage of myself with a map file without having to debug another application, and also able to generate an xml report compatible with Cobertura and OpenCover for further analytical and graphical reports.
However, so far I need to call the function to create the report manually, and the idea is to automatically generate it as soon as the process exits.
My first approach was to try writing hooks in RtlExitUserProcess / RtlExitUserThread / ExitProcess, but each function closes a specific case if you force the process to terminate (for example, kill it with taskkill) or close the application console window using CTRL + C behavior changes.
Is there a way to create a reliable callback that will always be called when the application is about to end? Just as if you are debugging another application and when the process dies, you get a debugging event with detailed information.
Thanks in advance
source
share