diff --git a/trunk/ProcessHacker.Native/Api/Functions.cs b/trunk/ProcessHacker.Native/Api/Functions.cs index 828f23525..cc20a37c3 100644 --- a/trunk/ProcessHacker.Native/Api/Functions.cs +++ b/trunk/ProcessHacker.Native/Api/Functions.cs @@ -126,7 +126,7 @@ namespace ProcessHacker.Native.Api /// /// The process.exe or the path\process.exe to be excluded /// True if successfully excluded - [DllImport("faultrep.dll", CharSet = CharSet.Unicode)] + [DllImport("faultrep.dll", CharSet = CharSet.Unicode, SetLastError = true)] public static extern bool AddERExcludedApplication( [In] string ExeName ); diff --git a/trunk/ProcessHacker/Program/Program.cs b/trunk/ProcessHacker/Program/Program.cs index 82d094355..d5525cd26 100644 --- a/trunk/ProcessHacker/Program/Program.cs +++ b/trunk/ProcessHacker/Program/Program.cs @@ -131,7 +131,9 @@ namespace ProcessHacker { if (!Native.Api.Win32.AddERExcludedApplication(AppDomain.CurrentDomain.FriendlyName)) { - PhUtils.ShowWarning("Process Hacker was not excluded from Windows Error Reporting"); + PhUtils.ShowWarning( + "Process Hacker was not excluded from Windows Error Reporting: " + + Win32.GetLastErrorMessage()); } } else