[Mono-bugs] [Bug 45897][Wis] New - Failed to load function when call P/Invoke

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Sun, 6 Jul 2003 21:29:55 -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=45897

--- shadow/45897	Sun Jul  6 21:29:55 2003
+++ shadow/45897.tmp.2291	Sun Jul  6 21:29:55 2003
@@ -0,0 +1,59 @@
+Bug#: 45897
+Product: Mono/Runtime
+Version: unspecified
+OS: 
+OS Details: Windows 2000
+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: Failed to load function when call P/Invoke
+
+Please fill in this template when reporting a bug, unless you know what 
+you are doing.
+Description of Problem:
+Failed to load function when call P/Invoke when specify function CharSet 
+attriubte as CharSet.Auto.
+
+Steps to reproduce the problem:
+1. Declare a prototype for call system function GetOpenFileName
+(ComDlg32.dll)
+2.Assign DllImportAttribute CharSet as CharSet.Auto
+3.Call the function in Main()
+
+Actual Results:
+
+** (OpenFileDlg.exe:596): WARNING **: Failed to load function 
+GetOpenFileName fr
+om Comdlg32.dll
+
+** (OpenFileDlg.exe:596): WARNING **: Failed to load function 
+GetOpenFileName fr
+om Comdlg32.dll
+
+** (OpenFileDlg.exe:596): WARNING **: Failed to load function 
+GetOpenFileName fr
+om Comdlg32.dll
+
+Unhandled Exception: System.MissingMethodException: A missing method 
+exception h
+as occurred.
+in <0x00042> 06 .LibWrap:GetOpenFileName (OpenFileName)
+in <0x000eb> 00 .App:Main ()
+
+Expected Results:
+Should popup a Open File dialog 
+How often does this happen? 
+Each time
+
+Additional Information:
+The prototype for P\Invoke is following:
+ [ DllImport( "Comdlg32.dll", CharSet=CharSet.Auto )]		
+  public static extern bool GetOpenFileName([ In, Out ] OpenFileName ofn );