Exemple #1
0
 public WerStore(REPORT_STORE_TYPES type)
 {
     hStore = IntPtr.Zero;
     if (WerStoreOpen(type, ref hStore) != 0 || hStore == IntPtr.Zero)
     {
         throw new InvalidOperationException();
     }
     isDisposed = false;
 }
Exemple #2
0
 /// <summary>
 /// Opens a wer report store and allows you to enumerate the reports it contains.
 /// If called on an earlier operating system where the relevant APIs do not exist,
 /// it will return an empty enumerable.
 /// </summary>
 /// <param name="type"></param>
 /// <returns></returns>
 public static IWerStore GetStore(REPORT_STORE_TYPES type)
 {
     if (IsStoreInterfacePresent)
     {
         try
         {
             return(new WerStore(type));
         }
         catch (InvalidOperationException)
         {
             return(new EmptyStore());
         }
     }
     return(new EmptyStore());
 }
Exemple #3
0
 private static extern int WerStoreOpen(REPORT_STORE_TYPES storeType, ref IntPtr hResportStore);