adderexcludedapplication (faultrep)
Last changed: anonymous

.
Summary
Adds an application to the list of apps that should be excluded from automatic error reporting by Windows Error Reporting or .NET Error Reporting.

C# Signature:

[DllImport("faultrep.dll", SetLastError=true, CharSet=CharSet.Unicode)]
static extern bool AddERExcludedApplication(string name);

VB Signature:

Declare Unicode Function AddERExcludedApplication Lib "faultrep.dll" (name as string) As Boolean

User-Defined Types:

None.

Alternative Managed API:

Do you know one? Please contribute it!

Notes:

Works in WinXP and up.

Tips & Tricks:

Please add some!

Sample Code:

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using System.Text;

namespace ExcludeCrash
{
    class Program
    {
    [DllImport("faultrep.dll", CharSet=CharSet.Unicode)]
    private static extern bool AddERExcludedApplication(string name);

    static void Main(string[] args)
    {
        bool result = AddERExcludedApplication("myapp.exe");

        throw new Exception();
    }
    }
}

Documentation