Developer, Former MVP, now at Microsoft - Best of 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013
private void button1_Click(object sender, EventArgs e) { // simulate crash Environment.FailFast("bye bye"); }
internal const int WerRegFileTypeOther = 2; internal const int WER_FILE_ANONYMOUS_DATA = 2; [System.Runtime.InteropServices.DllImport("kernel32.dll", CharSet = CharSet.Auto)] internal static extern int WerRegisterFile(string pwzFile, int regFileType, int dwFlags);
WerRegisterFile("danielmoth.txt", WerRegFileTypeOther, WER_FILE_ANONYMOUS_DATA);