Переглянути джерело

2009-06-25 Sylvain Dupont <[email protected]>

	* cominterop.h cominterop.c marshal.c: Added support for marshalling out
	  parameters of type SAFEARRAY[VARIANT].

	* reflection.c (encode_marshal_blob): Properly generate element type
	  (SafeArraySubType marshal attribute option).

	* cominterop.cs libtest.c: Added tests for marshalling
	  out parameters of type SAFEARRAY[VARIANT].

	* CustomAttributeBuilder.cs: Properly handle element type for safe
	  arrays (SafeArraySubType marshal attribute option).

	Code is contributed under MIT/X11 license.


svn path=/trunk/mcs/; revision=136836
Bill Holmes 16 роки тому
батько
коміт
18399a6f79

+ 7 - 0
mcs/class/corlib/System.Reflection.Emit/ChangeLog

@@ -1,3 +1,10 @@
+2009-06-25  Sylvain Dupont <[email protected]>
+
+	* CustomAttributeBuilder.cs: Properly handle element type for safe 
+	  arrays (SafeArraySubType marshal attribute option).
+
+	Code is contributed under MIT/X11 license.
+
 2009-06-12  Jb Evain  <[email protected]>
 
 	* AssemblyBuilder.cs (Save): throw a NotImplementedException

+ 6 - 0
mcs/class/corlib/System.Reflection.Emit/CustomAttributeBuilder.cs

@@ -266,6 +266,12 @@ namespace System.Reflection.Emit {
 					hasSize = true;
 					break;
 				case "SafeArraySubType":
+					value = (int)data[pos++];
+					value |= ((int)data[pos++]) << 8;
+					value |= ((int)data[pos++]) << 16;
+					value |= ((int)data[pos++]) << 24;
+					subtype = (UnmanagedType)value;
+					break;
 				case "IidParameterIndex":
 					pos += 4;
 					break;