* icall.c: Add icall to access char conversion tables.
[mono.git] / mono / tests / pinvoke10.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 public class Test {
5
6         [DllImport("libtest")]
7         [return: MarshalAs(UnmanagedType.LPWStr)]
8         private static extern string test_lpwstr_marshal(
9                 [MarshalAs(UnmanagedType.LPWStr)] string s,
10                 int length );
11
12
13         public static int Main () {
14
15                 string s = "ABC";
16                 
17                 Console.WriteLine(s.Length);
18                 string res = test_lpwstr_marshal (s, s.Length);
19
20                 Console.WriteLine (res);
21
22                 if (res != "ABC")
23                         return 1;
24                 
25                 return 0;               
26         }
27 }