2 using System.Runtime.InteropServices;
4 [module: DefaultCharSet (CharSet.Unicode)]
14 [StructLayout (LayoutKind.Sequential, CharSet = CharSet.Auto)]
19 [UnmanagedFunctionPointer (CallingConvention.Cdecl)]
33 public static extern void test ();
35 public static int Main ()
37 DllImportAttribute dia = Attribute.GetCustomAttribute (typeof (Program).GetMethod ("test"), typeof (DllImportAttribute)) as DllImportAttribute;
41 if (dia.CharSet != CharSet.Unicode)
44 if (!typeof (C).IsUnicodeClass)
47 if (!typeof (C.CC).IsUnicodeClass)
50 if (!typeof (D).IsUnicodeClass)
53 var ufp = typeof (D).GetCustomAttributes (false)[0] as UnmanagedFunctionPointerAttribute;
54 if (ufp.CharSet != CharSet.Unicode)
57 if (!typeof (E).IsUnicodeClass)
60 if (!typeof (foo1).IsUnicodeClass)
63 if (!typeof (foo2).IsAutoClass)