[Mono-bugs] [Bug 82810][Nor] New - DllImport failures on windows

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Tue Sep 11 20:41:13 EDT 2007

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 kojoadams at hotmail.com.


--- shadow/82810	2007-09-11 20:41:13.000000000 -0400
+++ shadow/82810.tmp.5339	2007-09-11 20:41:13.000000000 -0400
@@ -0,0 +1,60 @@
+Bug#: 82810
+Product: Mono: Runtime
+Version: 1.0
+OS Details: XP
+Status: NEW   
+Priority: Normal
+Component: interop
+AssignedTo: mono-bugs at ximian.com                            
+ReportedBy: kojoadams at hotmail.com               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: DllImport failures on windows
+Description of Problem:
+Some DllImports do not work for me on windows (XP).
+Steps to reproduce the problem:
+using System.Runtime.InteropServices;
+public class DllImport {
+        [DllImport ("cygwin1")]
+        static extern void system (string command);
+        public static int Main (string []args) {
+                system ("ls");
+                return 0;
+        }
+Actual Results:
+ mono dllimport.exe
+  at (wrapper managed-to-native) DllImport.system (string) <0x00004>
+  at (wrapper managed-to-native) DllImport.system (string) <0xffffffff>
+  at DllImport.Main (string[]) <0x0000c>
+  at (wrapper runtime-invoke) DllImport.runtime_invoke_int_string[]
+(object,intptr,intptr,intptr) <0xffffffff>
+This application has requested the Runtime to terminate it in an unusual way.
+Please contact the application's support team for more information.
+Expected Results:
+How often does this happen? 
+Additional Information:
+I can call some other functions that are defined in cygwin1.dll. I also get
+the same problem with some of the GTK libraries. I am able to pinvoke into
+some other functions in cygwin1.dll. For example getenv, srand and rand
+work for me.

More information about the mono-bugs mailing list