+
+ [DllImport ("libtest")]
+ public static extern int mono_return_int (int i);
+
+ [DllImport ("libtest", EntryPoint="not_found")]
+ public static extern int not_found (int i);
+
+ public delegate int SimpleDelegate (int i);
+
+ [DllImport ("libtest")]
+ public static extern int mono_invoke_simple_delegate (SimpleDelegate d);
+
+ public static int test_4_native_function_to_ftnptr () {
+ return mono_invoke_simple_delegate (mono_return_int);
+ }
+
+ public static int test_0_native_function_to_ftnptr_not_found () {
+ try {
+ return mono_invoke_simple_delegate (not_found);
+ } catch (EntryPointNotFoundException) {
+ return 0;
+ }
+ }
+