vb6 application: how can i create crash dump (drwatson)?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3

Thread: vb6 application: how can i create crash dump (drwatson)?

  1. #1
    Join Date
    Apr 2009

    vb6 application: how can i create crash dump (drwatson)?

    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)

  2. #2
    Join Date
    Jan 2006
    Chicago, IL

    Re: vb6 application: how can i create crash dump (drwatson)?

    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

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    DataMiser is offline Super Moderator Power Poster
    Join Date
    Jul 2008

    Re: vb6 application: how can i create crash dump (drwatson)?

    I found this online http://www.vbaccelerator.com/home/VB...ng/article.asp

    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!
    Best bet is to add error handlers and logging info into your app
    Always use [code][/code] tags when posting code.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Azure Activities Information Page

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


HTML5 Development Center