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