AddERExcludedApplication function (Windows)

Switch View :
ScriptFree
AddERExcludedApplication function

[The AddERExcludedApplication function is available for use in the operating systems specified in the Requirements section. It may be altered or unavailable in subsequent versions. Instead, use the WerAddExcludedApplication function.]

Applies to: desktop apps only

Excludes the specified application from error reporting.

Syntax

BOOL APIENTRY AddERExcludedApplication(
  __in  LPCTSTR szApplication
);

Parameters

szApplication [in]

The name of the executable file for the application, including the file name extension. The name cannot contain path information.

Return value

If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, see GetLastError.

Remarks

This function stores the excluded application list under the HKEY_LOCAL_MACHINE hive. The calling process must have permissions to write to this registry hive.

Requirements

Minimum supported client

Windows XP

Minimum supported server

Windows Server 2003

Header

ErrorRep.h

Library

Faultrep.lib

DLL

Faultrep.dll

Unicode and ANSI names

AddERExcludedApplicationW (Unicode) and AddERExcludedApplicationA (ANSI)

See also

ReportFault
WER Functions
Windows Error Reporting

 

 

Send comments about this topic to Microsoft

Build date: 2/7/2012

Community Content

dmex
vb.net syntax
<DllImport("faultrep.dll", EntryPoint:="AddERExcludedApplication", CharSet:=CharSet.Unicode)> _
Public Shared Function AddERExcludedApplication(ByVal ProcName As String) As Boolean End Function Place this code somewhere in your Application Load, New or Sub Main functions to exclude your application: AddERExcludedApplication(System.Reflection.Assembly.GetExecutingAssembly.GetModules()(0).Name)

dmex
C# syntax
[DllImport("faultrep.dll", EntryPoint="AddERExcludedApplication", CharSet=CharSet.Unicode)]
public static extern bool AddWERExcludedApplication(string ProcName);