c++ - How can you get more detailed exception information from a vectored exception handler? -


in windows application, if have vectored exception handler:

long winapi vectoredexceptionhandler(pexception_pointers exception) {  } 

...and add in this...

addvectoredexceptionhandler(1, vectoredexceptionhandler); 

if handler called, contextual information on exception such exception code, exception->exceptionrecord->exceptioncode , exception information, exception->exceptionrecord->exceptioninformation. how translate information string type (such tchar) tells user exact problem occurred was? example, if write mini-dump using winapi method, minidumpwritedump write dump file, show details in dump file:

exception code: 0xc0000005

exception information: thread tried read or write virtual address not have appropriate access.

i can convert exception code quite easily, how such detailed exception information? exception->exceptionrecord->exceptioninformation, in environment ulong_ptr (windows 8.1 x64 running application built in release / x64 platform / multi-byte character set) looks when write out tstringstream: 0000000000a2df80

the information documented part of the documentation of exception_record structure:

exceptioninformation

an array of additional arguments describe exception. ... following table describes exception codes array elements defined.

exception_access_violation

the first element of array contains read-write flag indicates type of operation caused access violation. if value zero, thread attempted read inaccessible data. if value 1, thread attempted write inaccessible address. if value 8, thread causes user-mode data execution prevention (dep) violation.

the second array element specifies virtual address of inaccessible data.


Comments

Popular posts from this blog

java - WrongTypeOfReturnValue exception thrown when unit testing using mockito -

php - Magento - Deleted Base url key -

android - How to disable Button if EditText is empty ? -