Prev: Managed/unmanaged code exceptions handling tool (C# / С++)
Next: Display portion of my code starved
From: Ben Voigt [C++ MVP] on 22 Mar 2010 13:06 "Renat Letfullin" <rletfullin(a)gmail.com> wrote in message news:02a338c8-1dc6-44ae-9315-dca11226d755(a)l25g2000yqd.googlegroups.com... > Hi, > We have application combining managed and unmanaged code (C# / C++). > It is neccessary to implement exceptions handling for this > application. We planning to implement it as a tool (or couple - for > managed and unmanaged parts) that will catch unhandled exceptions, > all > information about them (including process, thread info, call stack > and > so on). > Maybe someone can prompt the best way to implement this? Managed exceptions are built on top of Win32 Structured Exception Handling. C++ exceptions are too, if you compile with /EHa (or /clr, which forces /EHa). Win32 generates some exceptions of its own (access violation, etc). These also appear as SHE. If you have an SEH exception filter active (use Visual C++ __try/__except or SetUnhandledExceptionFilter) then you can use the GetExceptionCode and GetExceptionInformation built-ins to get an exception context. Then imagehlp and some other APIs can get you the call stack including function names and line numbers, etc. > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4965 (20100322) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > __________ Information from ESET NOD32 Antivirus, version of virus signature database 4965 (20100322) __________ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
|
Pages: 1 Prev: Managed/unmanaged code exceptions handling tool (C# / С++) Next: Display portion of my code starved |