[Mono-bugs] [Bug 45898][Wis] New - P\Invoke cannot implement attriube DllImportAttribute.SetLastError

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sun, 6 Jul 2003 21:38:04 -0400 (EDT)


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 hfhe@stryon.com.

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

--- shadow/45898	Sun Jul  6 21:38:04 2003
+++ shadow/45898.tmp.9650	Sun Jul  6 21:38:04 2003
@@ -0,0 +1,48 @@
+Bug#: 45898
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: Windows2000
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Wishlist
+Component: misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: hfhe@stryon.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: P\Invoke cannot implement attriube DllImportAttribute.SetLastError
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+Call unmanaged function with P\Invoke, and assigned  attriube 
+DllImportAttribute.SetlastError, but cannot implement attriube 
+DllImportAttribute.SetLastError
+
+Steps to reproduce the problem:
+1. Declare a funtion prototype to call unmanaged library
+2. Assigned attribute DllImportAttribute.SetlastError
+3. Call this function
+
+Actual Results:
+The last error before MessageBox is called: 0
+Calling MessageBox with wrong parameters...
+Call result: 24271400
+The last error after MessageBox is called: 0
+Error message: The operation completed successfully.
+
+Expected Results:
+The last error before MessageBox is called: 126
+Calling MessageBox with wrong parameters...
+Call result: 0
+The last error after MessageBox is called: 1438
+Error message: Invalid message box style.
+
+How often does this happen? 
+Each time
+
+Additional Information: