public static extern herr_t get_elink_cb (hid_t lapl_id, ref H5L.elink_traverse_t func, ref IntPtr op_data);
// Callback for H5L.iterate and H5L.iterate_by_name // We expect an array list as op_data, add the attribute names to the // array list as we go public herr_t DelegateMethod ( hid_t group, IntPtr name, ref H5L.info_t info, IntPtr op_data ) { GCHandle hnd = (GCHandle)op_data; ArrayList al = (hnd.Target as ArrayList); int len = 0; while (Marshal.ReadByte(name, len) != 0) { ++len; } byte[] name_buf = new byte[len]; Marshal.Copy(name, name_buf, 0, len); al.Add(Encoding.UTF8.GetString(name_buf)); return 0; }