protected override ProcSafeHandle GetProcessHandle()
        {
            ProcSafeHandle procSafeHandle  = new ProcSafeHandle();
            ProcSafeHandle procSafeHandle2 = base.EvaluateOrDefault <ProcSafeHandle>(() => DiagnosticsNativeMethods.OpenProcess(DiagnosticsNativeMethods.ProcessAccess.VmRead | DiagnosticsNativeMethods.ProcessAccess.QueryInformation | DiagnosticsNativeMethods.ProcessAccess.StandardRightsRead, false, base.ProcessId), procSafeHandle);

            if (procSafeHandle2 != procSafeHandle && procSafeHandle != null)
            {
                procSafeHandle.Dispose();
            }
            return(procSafeHandle2);
        }
 internal static extern void WerReportAddDump([In] WerSafeHandle reportHandle, [In] ProcSafeHandle processHandle, [In][Optional] IntPtr threadHandle, [In] DiagnosticsNativeMethods.WER_DUMP_TYPE dumpType, [In][Optional] DiagnosticsNativeMethods.WER_EXCEPTION_INFORMATION exceptionParam, [In][Optional] DiagnosticsNativeMethods.WER_DUMP_CUSTOM_OPTIONS dumpCustomOptions, [In] uint flags);