[Mono-bugs] [Bug 79115][Min] New - Win32Exception does not use win32 FormatMessage API

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Sun Aug 20 04:35:28 EDT 2006


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by gert.driesen at pandora.be.

http://bugzilla.ximian.com/show_bug.cgi?id=79115

--- shadow/79115	2006-08-20 04:35:28.000000000 -0400
+++ shadow/79115.tmp.606	2006-08-20 04:35:28.000000000 -0400
@@ -0,0 +1,45 @@
+Bug#: 79115
+Product: Mono: Class Libraries
+Version: 1.1
+OS: 
+OS Details: 
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Minor
+Component: System
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: gert.driesen at pandora.be               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: Win32Exception does not use win32 FormatMessage API
+
+Currently, (System.ComponentModel.)Win32Exception does not use the win32 
+FormatMessage API to lookup the message corresponding with the native 
+win32 error on Windows.
+
+Instead we're hardcoding a (small) set of known win32 error in the 
+W32ErrorMessage method. Hardcoding this list should only be necessary on 
+Linux (unless there's a solution for this too).
+
+To reproduce, compile and run the following code snippet:
+
+using System;
+using System.ComponentModel;
+
+public class Test {
+  static void Main () {
+    Win32Exception ex = new Win32Exception (10);
+    Console.WriteLine (ex.Message);
+  }
+}
+
+Expected result:
+
+The environment is incorrect
+
+Actual result:
+
+Some sort of w32 error occurred: 10


More information about the mono-bugs mailing list