[Mono-bugs] [Bug 70864][Blo] Changed - problems returning small structs from delegates on windows

bugzilla-daemon@bugzilla.ximian.com bugzilla-daemon@bugzilla.ximian.com
Sat, 19 Feb 2005 05:02:18 -0500 (EST)


Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by ddmk@r66.ru.

http://bugzilla.ximian.com/show_bug.cgi?id=70864

--- shadow/70864	2005-02-19 04:57:57.000000000 -0500
+++ shadow/70864.tmp.30767	2005-02-19 05:02:18.000000000 -0500
@@ -246,6 +246,46 @@
 
 Can you say that's changes since 1.1.3 in code that performs 
 function tables wrapping ? 
 
 THIS BUG introduced in 1.1.4!.
 
+
+------- Additional Comments From ddmk@r66.ru  2005-02-19 05:02 -------
+Sorry I forgot about PLUGIN_ID  and INTERFACE_ID  it is simple 
+structures declared as 
+
+		[Serializable]public struct PLUGIN_ID:ISerializable
+		{
+			public int id;
+			public PLUGIN_ID(int a){id=a;}
+	public static readonly PLUGIN_ID invalid=new PLUGIN_ID(-1);
+	PLUGIN_ID(SerializationInfo info, StreamingContext context)
+	{
+	int t=((int)info.GetValue("uid",typeof(int)));
+	id=t;
+	Console.WriteLine("func1 load");
+	}
+	public void GetObjectData(SerializationInfo info, 
+StreamingContext context)
+	{
+		info.AddValue("uid",id);
+		Console.WriteLine("func1 save");
+	}
+	public override bool Equals(object obj)	{	return 
+base.Equals (obj);	}
+
+	public static PLUGIN_ID Create(int _id){ return new PLUGIN_ID
+(_id);}
+
+	public override int GetHashCode(){	return id;	}
+
+	public static bool operator ==(PLUGIN_ID id1,PLUGIN_ID id2) 
+{return id1.id==id2.id;}
+	public static bool operator !=(PLUGIN_ID id1,PLUGIN_ID id2) 
+{return id1.id!=id2.id;}
+
+	public override string ToString(){return id.ToString ();}
+}
+
+
+