+2003-09-24 Bernie Solomon <bernard@ugsolutions.com>
+
+ * mono/tests/pinvoke*.cs, delegate4.cs, marshal10.cs, marshal4.cs
+ marshal5.cs: remove .so from DllImport of libtest to aid portability.
+
2003-09-08 Zoltan Varga <vargaz@freemail.hu>
* configure.in: Added check for valgrind headers.
class Test {
public delegate int SimpleDelegate (int a, int b);
- [DllImport ("libtest.so", EntryPoint="mono_invoke_delegate")]
+ [DllImport ("libtest", EntryPoint="mono_invoke_delegate")]
static extern int mono_invoke_delegate (SimpleDelegate d);
public static int Add (int a, int b) {
public class Testing
{
- [DllImport("libtest.so")]
+ [DllImport("libtest")]
[return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef = typeof(MyMarshal))]
private static extern string functionReturningString();
public class Test {
- [DllImport ("libtest.so", EntryPoint="mono_test_marshal_delegate_struct")]
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_delegate_struct")]
public static extern int mono_test_marshal_delegate_struct (DelegateStruct s);
public delegate int WndProc (int a);
public class Test
{
- [DllImport ("libtest.so", EntryPoint="mono_test_byvalstr_gen")]
+ [DllImport ("libtest", EntryPoint="mono_test_byvalstr_gen")]
public static extern IntPtr mono_test_byvalstr_gen();
- [DllImport ("libtest.so", EntryPoint="mono_test_byvalstr_check")]
+ [DllImport ("libtest", EntryPoint="mono_test_byvalstr_check")]
public static extern int mono_test_byvalstr_check(IntPtr data, string correctString);
[StructLayout (LayoutKind.Sequential)]
[DllImport("cygwin1.dll", EntryPoint="puts", CharSet=CharSet.Ansi)]
public static extern int puts (string name);
- [DllImport ("libtest.so", EntryPoint="mono_test_many_int_arguments")]
+ [DllImport ("libtest", EntryPoint="mono_test_many_int_arguments")]
public static extern int mono_test_many_int_arguments (int a, int b, int c, int d, int e,
int f, int g, int h, int i, int j);
- [DllImport ("libtest.so", EntryPoint="mono_test_many_short_arguments")]
+ [DllImport ("libtest", EntryPoint="mono_test_many_short_arguments")]
public static extern int mono_test_many_short_arguments (short a, short b, short c, short d, short e,
short f, short g, short h, short i, short j);
- [DllImport ("libtest.so", EntryPoint="mono_test_many_byte_arguments")]
+ [DllImport ("libtest", EntryPoint="mono_test_many_byte_arguments")]
public static extern int mono_test_many_byte_arguments (byte a, byte b, byte c, byte d, byte e,
byte f, byte g, byte h, byte i, byte j);
- [DllImport ("libtest.so", EntryPoint="mono_test_many_float_arguments")]
+ [DllImport ("libtest", EntryPoint="mono_test_many_float_arguments")]
public static extern float mono_test_many_float_arguments (float a, float b, float c, float d, float e,
float f, float g, float h, float i, float j);
- [DllImport ("libtest.so", EntryPoint="mono_test_many_double_arguments")]
+ [DllImport ("libtest", EntryPoint="mono_test_many_double_arguments")]
public static extern double mono_test_many_double_arguments (double a, double b, double c, double d, double e,
double f, double g, double h, double i, double j);
delegate int MyDelegate (string name);
- [DllImport ("libtest.so", EntryPoint="mono_test_puts_static")]
+ [DllImport ("libtest", EntryPoint="mono_test_puts_static")]
public static extern int puts_static (string name);
public static int Main () {
public class Test {
- [DllImport("libtest.so")]
+ [DllImport("libtest")]
[return: MarshalAs(UnmanagedType.LPWStr)]
private static extern string test_lpwstr_marshal(
[MarshalAs(UnmanagedType.LPWStr)] string s,
public class Test
{
- [DllImport ("libtest.so")]
+ [DllImport ("libtest")]
public static extern int mono_union_test_1 (cs a);
- [DllImport ("libtest.so")]
+ [DllImport ("libtest")]
public static extern int mono_return_int (int a);
- [DllImport ("libtest.so", EntryPoint="mono_return_int_ss")]
+ [DllImport ("libtest", EntryPoint="mono_return_int_ss")]
public static extern int mono_return_int_ss (ss a);
- [DllImport ("libtest.so", EntryPoint="mono_return_int_su")]
+ [DllImport ("libtest", EntryPoint="mono_return_int_su")]
public static extern int mono_return_int_su (su a);
static int Main()
public class DumpTest
{
/* this should call HexDumpA with ANSI encoded string */
- [DllImport("libtest.so", CharSet=CharSet.Ansi)]
+ [DllImport("libtest", CharSet=CharSet.Ansi)]
private static extern int HexDump (string data);
/* this should call HexDump default version with Unicode string */
- [DllImport("libtest.so", EntryPoint="HexDump", CharSet=CharSet.Unicode)]
+ [DllImport("libtest", EntryPoint="HexDump", CharSet=CharSet.Unicode)]
private static extern int HexDump2(string data);
/* this should call HexDump1W with unicode encoding */
- [DllImport("libtest.so", CharSet=CharSet.Unicode)]
+ [DllImport("libtest", CharSet=CharSet.Unicode)]
private static extern int HexDump1(string data);
public static int Main()
}
- [DllImport ("libtest.so", EntryPoint="mono_test_marshal_char")]
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_char")]
public static extern int mono_test_marshal_char (char a1);
- [DllImport ("libtest.so", EntryPoint="mono_test_marshal_array")]
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_array")]
public static extern int mono_test_marshal_array (int [] a1);
- [DllImport ("libtest.so", EntryPoint="mono_test_marshal_struct")]
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_struct")]
public static extern int mono_test_marshal_struct (SimpleStruct ss);
- [DllImport ("libtest.so", EntryPoint="mono_test_marshal_struct2")]
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_struct2")]
public static extern int mono_test_marshal_struct2 (SimpleStruct2 ss);
- [DllImport ("libtest.so", EntryPoint="mono_test_marshal_delegate")]
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_delegate")]
public static extern int mono_test_marshal_delegate (SimpleDelegate d);
public delegate int SimpleDelegate (int a);
return 1;
}
- [DllImport ("libtest.so", EntryPoint="mono_test_marshal_delegate2")]
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_delegate2")]
public static extern int mono_test_marshal_delegate2 (SimpleDelegate2 d);
public delegate int SimpleDelegate2 (SimpleStruct ss);
public string d;
}
- [DllImport ("libtest.so", EntryPoint="mono_test_return_vtype")]
+ [DllImport ("libtest", EntryPoint="mono_test_return_vtype")]
public static extern SimpleStruct mono_test_return_vtype ();
public class Test {
- [DllImport ("libtest.so", EntryPoint="mono_test_marshal_stringbuilder")]
+ [DllImport ("libtest", EntryPoint="mono_test_marshal_stringbuilder")]
public static extern void mono_test_marshal_stringbuilder (StringBuilder sb, int len);
public static int Main () {
public string d;
}
- [DllImport ("libtest.so", EntryPoint="mono_test_ref_vtype")]
+ [DllImport ("libtest", EntryPoint="mono_test_ref_vtype")]
public static extern int mono_test_ref_vtype (int a, ref SimpleStruct ss, int b, TestDelegate d);
public static int managed_test_ref_vtype (int a, ref SimpleStruct ss, int b)
public struct EmptyStruct {
}
- [DllImport ("libtest.so", EntryPoint="mono_test_empty_struct")]
+ [DllImport ("libtest", EntryPoint="mono_test_empty_struct")]
public static extern int mono_test_empty_struct (int a, EmptyStruct es, int b);
public static int Main () {
public string d;
}
- [DllImport ("libtest.so", EntryPoint="mono_test_return_vtype2")]
+ [DllImport ("libtest", EntryPoint="mono_test_return_vtype2")]
public static extern SimpleStruct mono_test_return_vtype2 (ReturnVTypeDelegate d);
public static SimpleStruct managed_return_vtype (SimpleStruct ss) {
public class Test {
- [DllImport ("libtest.so", EntryPoint="mono_test_return_string")]
+ [DllImport ("libtest", EntryPoint="mono_test_return_string")]
public static extern String mono_test_return_string (ReturnStringDelegate d);
public static String managed_return_string (String s) {