I try to know why there's a problem with Gda.Value; and searching I found that some one change the code made from CodeGenerator to use FieldOffset in cero for each element in the union that exist in GdaValue struct:
typedef struct GdaValue { GdaValueType type; union { gint64 v_bigint; guint64 v_biguint; gpointer v_binary; GdaBlob v_blob; gboolean v_boolean; GdaDate v_date; gdouble v_double; GdaGeometricPoint v_point; GObject *v_gobj; gint v_integer; GdaValueList *v_list; GdaMoney v_money; GdaNumeric v_numeric; gfloat v_single; gshort v_smallint; gushort v_smalluint; gchar *v_string; GdaTime v_time; GdaTimestamp v_timestamp; gchar v_tinyint; guchar v_tinyuint; GdaValueType v_type; guint v_uinteger; } value; } There's no code to generate a union like in C# using CodeGenerator. The StructBase object write the code but define: [StructLayout(LayoutKind.Sequential)] And in the case of union mus be: [StructLayout(LayoutKind.Explicit)] Then may need to create a UnionBase class to write the correct code, or modify the StructBase class to admit in the constructor an argument telling him the type of object (struct or union) and write the correct sentence. But now, the Field class, must have a metod to write the FiledOffset attribute (allways in cero) to have a C union in C#. _______________________________________________ Mono-devel-list mailing list Mono-devel-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-devel-list