Why not just use 'ref IntPtr'? No special marshalling would then be
required. :-)

> [StructLayout(LayoutKind.Sequential)] public class HDF {}
> [StructLayout(LayoutKind.Sequential)] public class LPHDF {
>   //[MarshalAs(UnmanagedType.LPStruct)]
>   //public HDF hdf;
>   public int hdf;
> }
>
> public class Hdf {
>   // NEOERR* hdf_init (_HDF **hdf);
>
>   [DllImport("libneo.so", EntryPoint="hdf_init")]
>   [return: MarshalAs(UnmanagedType.LPStruct)]
>   private static extern void hdf_init(
>        [ MarshalAs(UnmanagedType.LPStruct)]
>          LPHDF hdf);
>
> public static int Main(string[] argv) {
>    Console.WriteLine("start test");
>
>     LPHDF lphdf = new LPHDF();
>     hdf_init(lphdf);
>     Console.WriteLine(lphdf.hdf);
>
>
>    return 0;
>  }

_______________________________________________
Mono-list maillist  -  [EMAIL PROTECTED]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to