Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles
(untagged)

Error Reporter - Enables Back-2-Base Error Reporting

0.00/5 (No votes)
25 Sep 2002 1  
Allows users to send bug reports to manufacturers without having to manually create bug reports. Requires only four lines of code to be added to your application and works with all versions of Microsoft Windows. No MFC.

Introduction

Error Reporter is an add-in that enables applications to report back faults to the manufacturers. Any problem from a simple memory overwrite to a hidden 'double free' can be detected and the information sent. It sends reports via the SMTP protocol to a server and email address defined by the code creator. It also features the ability to allow the user to save the reports if they want! This would be a boon to helping debug your applications!

Updates In This Version

Memory leaks have been taken care of. Resource files have been added to allow people to see the dialog box. Added Compile.BAT to demo application to simplify usage. Simple!

What Do I Get With This?

Huh? See the above section. That is what you get!

But You Said Four Lines Of Code!?! (AKA: How Can I Use It?)

It's as simple as this:

#include "exceptionhandler.h"


int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, 
                    LPSTR lpCmdLine, int nCmdShow)
{
    // Enable the exception handling...

    __try {
        // All your normal WinMain code goes in here...

        // :D Easy as that! 

    }

    // Catch any exceptions that occur.

    __except (ExceptionHandler (hInstance, GetExceptionInformation ())) {
        // No code; this block never executed.

    }

    return 0;
}

The system is very simple and self-explanatory so have a quick look through at the source to get an in-depth understanding!

Ok - That's Simple Enough; Anything Else

This is the usual nonsense - should you want to use it!

  1. Email me for permission to use/include (always given). I just want to know what purpose it is being used for. It is provided completely free for "Non-Commercial Usage."
  2. Include the files in your C++ project.
  3. Compile!
  4. Play!

Mentions

The code for this is loosely based on the MFC project "Dump Handler" by Shane Hyde. Except that this is easier to use and does not use MFC!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here