hi!
i need create crash dumps (such as drwatson) after vb6 application was crashed
by any reason (such as access violation , zero divide , out of bounds , etc )
what is the way to do that? (do not teach me turn drwnsn plz)
thanks
Printable View
hi!
i need create crash dumps (such as drwatson) after vb6 application was crashed
by any reason (such as access violation , zero divide , out of bounds , etc )
what is the way to do that? (do not teach me turn drwnsn plz)
thanks
pretty sure there's an app in systernals (now Microsoft) toolkit. Not sure what kind of dump you expect from VB6, as it never did report that. Event logs might help
I found this online http://www.vbaccelerator.com/home/VB...ng/article.asp
Best bet is to add error handlers and logging info into your appQuote:
On The Subject of Stack Traces
It is possible to generate stack traces from a VB runtime. However, you're probably not going to like it. The technique is described in the May 2002 issue of Visual Studio Magazine in the article Get Debug Info From Production Apps by Dan Fergus. It uses a host of techniques from Matt Curland's excellent "Advanced Visual Basic 6" book to allow VB to determine the program's Instruction Pointer, Stack Pointer and Base Pointer and then use dbghelp.dll to translate these into readable descriptions (assuming that you have generated a Symbolic Debug Info file (PDB) when compiling the application - which means it doesn't work for P-Code apps).
To use the code you need to include a class and 7 modules into the VB code you want stack tracking for, although they are all quite small. Then provided you are running outside the IDE, the VB code is compiled as Native Code and a PDB file has been created you can get a stack trace at any time by calling m_oSymbols.GetCallStack(). As far as I can tell it seems to work, but it is a shame it is impossible to isolate the code out of your project (I tried, but without success).
The world would have been a much nicer place if VB provided an App.StackTrace method which worked at any time, but there you go. Actually, the world would have been better if the App object did anything properly!
thanks for your answer.
i have no difficulty to use windbg with vb6-application dumps and dbghelp.dll with vb6-runtime.
it is not a matter.
i just need to get dumps vb6-apps crash after it said MessageBox(e.g.) "Zero divizion".
Now: when i catch exception, i cannt find its ExceptionCode because its _EXCEPTION_RECORD->ExceptionCode always is 0x8f (flt_inext_result). Because it i have to catch window with message about exception and save it's message and then cause access violation to crash application to get dump. Then in this dump i can see true reason of crash - the locaton of "zero divizion"(in this example).
But it is very bad (stupid) method (i get not enough information, i can lose information at all). I need transparent method.