Esempio n. 1
0
 internal static void ConvertException(Win32Exception.Operation operation)
 {
     try
     {
         operation();
     }
     catch (System.ComponentModel.Win32Exception e)
     {
         throw Win32Exception.Create(e.NativeErrorCode);
     }
 }
Esempio n. 2
0
 internal static int CatchException(Win32Exception.Operation operation)
 {
     try
     {
         operation();
         return(0);
     }
     catch (System.ComponentModel.Win32Exception e)
     {
         return(e.NativeErrorCode);
     }
 }