Beispiel #1
0
 /// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Win32Exception" /> class with the specified error.</summary>
 /// <param name="error">The Win32 error code associated with this exception. </param>
 public Win32Exception(int error) : base(Win32Exception.W32ErrorMessage(error))
 {
     this.native_error_code = error;
 }
Beispiel #2
0
 /// <summary>Initializes a new instance of the <see cref="T:System.ComponentModel.Win32Exception" /> class with the last Win32 error that occurred.</summary>
 public Win32Exception() : base(Win32Exception.W32ErrorMessage(Marshal.GetLastWin32Error()))
 {
     this.native_error_code = Marshal.GetLastWin32Error();
 }