diff -rup cli_ure-bak/source/climaker/climaker_csharp.cs cli_ure/source/climaker/climaker_csharp.cs
--- cli_ure-bak/source/climaker/climaker_csharp.cs	2007-03-29 16:22:58.000000000 +0200
+++ cli_ure/source/climaker/climaker_csharp.cs	2007-03-29 16:28:44.000000000 +0200
@@ -160,15 +160,16 @@ class TypeEmitter : IDisposable
 		Type ret = mModuleBuilder.GetType (args.Name, false);
 		//Console.WriteLine ("mModuleBuilder.GetType yields {0}", ret);
 
+#if __MonoCS__
		if (ret is TypeBuilder) {
			TypeBuilder tb = ret as TypeBuilder;
			//Console.WriteLine ("{0} is type builder", tb);
			if (tb.IsCreated ()) {
				ret = tb.CreateType ();
				//Console.WriteLine ("resolving to created {0} {1}", ret, tb);
			}
		}
-
+#endif
 		if (ret == null) {
 			IFaceEntry entry = mIncompleteIFaces [args.Name] as IFaceEntry;
 			if (entry != null)
@@ -201,15 +192,16 @@ class TypeEmitter : IDisposable
 		Type ret = mModuleBuilder.GetType (name, false);
 		//Console.WriteLine ("mModuleBuilder.GetType yields {0}", ret);
 
+#if __MonoCS__
		if (ret is TypeBuilder) {
			TypeBuilder tb = ret as TypeBuilder;
			//Console.WriteLine ("{0} is type builder", tb);
			if (tb.IsCreated ()) {
				ret = tb.CreateType ();
				//Console.WriteLine ("resolving to created {0} {1}", ret, tb);
			}
		}
-
+#endif
 		if (ret == null) {
 			//Console.WriteLine ("looking name {0}", name);
 			IFaceEntry entry = mIncompleteIFaces [name] as IFaceEntry;
@@ -1164,23 +1146,26 @@ class TypeEmitter : IDisposable
 					}
 
 					if (method.ReturnsStruct) {
-						//Console.WriteLine ("returns struct");
+						// Console.WriteLine ("returns struct");
 
 						UnoXStructTypeDescription std = method.ReturnType as UnoXStructTypeDescription;
-						Type[] ats = new Type [std.TypeArguments];
-
-						//Console.WriteLine ("type arguments: {0}", std.TypeArguments);
-
-						for (j = 0; j < std.TypeArguments; j ++) {
-							ats [j] = GetType (std.TypeArgument (j));
-							//Console.WriteLine ("ats [{0}] = {1}", j, ats [j]);
-						}
+						if (std.TypeArguments != 0) {
+							// Console.WriteLine ("std: '{0}' '{1}' {2}", std, method.ReturnType, method.ReturnType.Name);
+							Type[] ats = new Type [std.TypeArguments];
+
+							// Console.WriteLine ("type arguments: {0}", std.TypeArguments);
+
+							for (j = 0; j < std.TypeArguments; j ++) {
+								ats [j] = GetType (std.TypeArgument (j));
+								//Console.WriteLine ("ats [{0}] = {1}", j, ats [j]);
+							}
 
-						object[] atso = { ats };
-						Type[] ctor = { typeof (Type[]) };
-						attrBuilder = new CustomAttributeBuilder (typeof (uno.TypeArgumentsAttribute).GetConstructor (ctor),
+							object[] atso = { ats };
+							Type[] ctor = { typeof (Type[]) };
+							attrBuilder = new CustomAttributeBuilder (typeof (uno.TypeArgumentsAttribute).GetConstructor (ctor),
 																  atso);
-						methodBuilder.SetCustomAttribute (attrBuilder);
+							methodBuilder.SetCustomAttribute (attrBuilder);
+						}
 					}
 
 					// define UNO exception attribute (exceptions) --------------------------------------
@@ -2051,7 +2036,7 @@ class UnoXTypeDescription : UnoObject
     {
 		get
 		{
-			return cmm_x_type_description_get_name (mHandle);
+			return Marshal.PtrToStringAnsi (cmm_x_type_description_get_name (mHandle));
 		}
     }
 
@@ -2064,7 +2049,7 @@ class UnoXTypeDescription : UnoObject
     }
 
     [DllImport("climaker")]
-    private static extern string cmm_x_type_description_get_name (IntPtr handle);
+    private static extern IntPtr cmm_x_type_description_get_name (IntPtr handle);
 
     [DllImport("climaker")]
     private static extern UnoTypeClass cmm_x_type_description_get_type_class (IntPtr handle);
@@ -2086,7 +2071,7 @@ class UnoXEnumTypeDescription : UnoXType
 
     public string ValueName (int idx)
     {
-		return cmm_x_enum_type_description_get_name (mHandle, idx);
+		return Marshal.PtrToStringAnsi (cmm_x_enum_type_description_get_name (mHandle, idx));
     }
 
     public int Value (int idx)
@@ -2101,7 +2086,7 @@ class UnoXEnumTypeDescription : UnoXType
     private static extern int cmm_x_enum_type_description_get_value (IntPtr handle, int idx);
 
     [DllImport("climaker")]
-    private static extern string cmm_x_enum_type_description_get_name (IntPtr handle, int idx);
+    private static extern IntPtr cmm_x_enum_type_description_get_name (IntPtr handle, int idx);
 }
 
 class UnoXInterfaceTypeDescription : UnoXTypeDescription
@@ -2175,12 +2160,12 @@ class UnoXInterfaceMemberTypeDescription
     {
 		get
 		{
-			return cmm_x_interface_member_type_description_get_member_name (mHandle);
+			return Marshal.PtrToStringAnsi (cmm_x_interface_member_type_description_get_member_name (mHandle));
 		}
     }
 
     [DllImport("climaker")]
-    private static extern string cmm_x_interface_member_type_description_get_member_name (IntPtr handle);
+    private static extern IntPtr cmm_x_interface_member_type_description_get_member_name (IntPtr handle);
 }
 
 class UnoXInterfaceAttributeTypeDescription : UnoXInterfaceMemberTypeDescription
@@ -2262,10 +2247,10 @@ class UnoXInterfaceAttributeTypeDescript
     [DllImport("climaker")]
     private static extern IntPtr cmm_x_interface_attribute_type_description_get_type (IntPtr handle);
 
-    [DllImport("climaker")]
+    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
     private static extern bool cmm_x_interface_attribute_type_description_is_bound (IntPtr handle);
 
-    [DllImport("climaker")]
+    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
     private static extern bool cmm_x_interface_attribute_type_description_is_read_only (IntPtr handle);
 
     [DllImport("climaker")]
@@ -2389,10 +2374,10 @@ class UnoXInterfaceMethodTypeDescription
     [DllImport("climaker")]
     private static extern IntPtr cmm_x_interface_method_type_description_get_return_type (IntPtr handle);
 
-    [DllImport("climaker")]
+    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
     private static extern bool cmm_x_interface_method_type_description_returns_struct (IntPtr handle);
 
-    [DllImport("climaker")]
+    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
     private static extern bool cmm_x_interface_method_type_description_is_oneway (IntPtr handle);
 }
 
@@ -2429,7 +2414,7 @@ class UnoXCompoundTypeDescription : UnoX
 		if (idx < 0 || idx >= mMemberNames)
 			return null;
 
-		return cmm_x_compound_type_description_get_member_name (mMemberNamesHandle, idx);
+		return Marshal.PtrToStringAnsi (cmm_x_compound_type_description_get_member_name (mMemberNamesHandle, idx));
     }
 
     public int MemberNames
@@ -2475,7 +2460,7 @@ class UnoXCompoundTypeDescription : UnoX
     private static extern int cmm_x_compound_type_description_get_member_names (IntPtr handle, out IntPtr memberNamesHandle);
 
     [DllImport("climaker")]
-    private static extern string cmm_x_compound_type_description_get_member_name (IntPtr handle, int idx);
+    private static extern IntPtr cmm_x_compound_type_description_get_member_name (IntPtr handle, int idx);
 
     [DllImport("climaker")]
     private static extern int cmm_x_compound_type_description_get_member_types (IntPtr handle, out IntPtr memberTypesHandle);
@@ -2517,7 +2502,7 @@ class UnoXStructTypeDescription : UnoXCo
 		if (idx < 0 || idx >= mTypeParameters)
 			return null;
 
-		return cmm_x_struct_type_description_get_type_parameter (mTypeParametersHandle, idx);
+		return Marshal.PtrToStringAnsi (cmm_x_struct_type_description_get_type_parameter (mTypeParametersHandle, idx));
     }
 
     public int TypeParameters
@@ -2560,7 +2545,7 @@ class UnoXStructTypeDescription : UnoXCo
     private static extern int cmm_x_struct_type_description_get_type_parameters (IntPtr handle, out IntPtr typeParametersHandle);
 
     [DllImport("climaker")]
-    private static extern string cmm_x_struct_type_description_get_type_parameter (IntPtr typeParametersHandle, int idx);
+    private static extern IntPtr cmm_x_struct_type_description_get_type_parameter (IntPtr typeParametersHandle, int idx);
 
     [DllImport("climaker")]
     private static extern int cmm_x_struct_type_description_get_type_arguments (IntPtr handle, out IntPtr typeArgumentsHandle, out IntPtr typeArgumentsArrayHandle);
@@ -2595,7 +2580,7 @@ class UnoXMethodParameter : UnoObject
     {
 		get
 	    {
-			return cmm_x_method_parameter_name (mHandle);
+			return Marshal.PtrToStringAnsi (cmm_x_method_parameter_name (mHandle));
 		}
     }
 
@@ -2615,17 +2600,17 @@ class UnoXMethodParameter : UnoObject
 		}
     }
 
-    [DllImport("climaker")]
+    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
     private static extern bool cmm_x_method_parameter_is_out (IntPtr handle);
 
-    [DllImport("climaker")]
+    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
     private static extern bool cmm_x_method_parameter_is_in (IntPtr handle);
 
     [DllImport("climaker")]
     private static extern int cmm_x_method_parameter_position (IntPtr handle);
 
     [DllImport("climaker")]
-    private static extern string cmm_x_method_parameter_name (IntPtr handle);
+    private static extern IntPtr cmm_x_method_parameter_name (IntPtr handle);
 
     [DllImport("climaker")]
     private static extern IntPtr cmm_x_method_parameter_type (IntPtr handle);
@@ -2645,7 +2630,7 @@ class UnoXParameter : UnoXMethodParamete
 		}
     }
 
-    [DllImport("climaker")]
+    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
     private static extern bool cmm_x_parameter_is_rest (IntPtr handle);
 }
 
@@ -2724,7 +2709,7 @@ class UnoXServiceTypeDescription : UnoXT
 	[DllImport("climaker")]
 	private static extern IntPtr cmm_x_service_type_description_get_constructor (IntPtr constructorsHandle, int idx);
 
-    [DllImport("climaker")]
+    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
     private static extern bool cmm_x_service_type_description_is_single_interface_based (IntPtr handle);
 
     [DllImport("climaker")]
@@ -2756,7 +2741,7 @@ class UnoXSingletonTypeDescription : Uno
     [DllImport("climaker")]
     private static extern IntPtr cmm_x_singleton_type_description_get_interface (IntPtr handle);
 
-    [DllImport("climaker")]
+    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
     private static extern bool cmm_x_singleton_type_description_is_interface_based (IntPtr handle);
 }
 
@@ -2777,7 +2762,7 @@ class UnoXConstantTypeDescription : UnoX
 			System.UInt16 tUInt16;
 			Int32 tInt32;
 			System.UInt32 tUInt32;
-			Int16 tInt64;
+			Int64 tInt64;
 			System.UInt64 tUInt64;
 			System.Single tFloat;
 			double tDouble;
@@ -2824,7 +2809,7 @@ class UnoXConstantTypeDescription : UnoX
 								out byte tByte,
 								out Int16 tInt16, out System.UInt16 tUInt16,
 								out Int32 tInt32, out System.UInt32 tUInt32,
-								out Int16 tInt64, out System.UInt64 tUInt64,
+								out Int64 tInt64, out System.UInt64 tUInt64,
 								out System.Single tFloat, out double tDouble);
 }
 
@@ -2909,7 +2894,7 @@ class UnoXServiceConstructorDescription 
     {
 		get
 	    {
-			return cmm_x_service_constructor_description_get_name (mHandle);
+			return Marshal.PtrToStringAnsi (cmm_x_service_constructor_description_get_name (mHandle));
 		}
     }
 
@@ -2949,9 +2934,9 @@ class UnoXServiceConstructorDescription 
 	private static extern IntPtr cmm_x_service_constructor_description_get_parameter (IntPtr parametersHandle, int idx);
 
     [DllImport("climaker")]
-    private static extern string cmm_x_service_constructor_description_get_name (IntPtr handle);
+    private static extern IntPtr cmm_x_service_constructor_description_get_name (IntPtr handle);
 
-    [DllImport("climaker")]
+    [DllImport("climaker")][return:MarshalAs(UnmanagedType.I1)]
     private static extern bool cmm_x_service_constructor_description_is_default_constructor (IntPtr handle);
 
     [DllImport("climaker")]
diff -rup cli_ure-bak/source/climaker/climaker_mono.cxx cli_ure/source/climaker/climaker_mono.cxx
--- cli_ure-bak/source/climaker/climaker_mono.cxx	2007-03-29 16:22:58.000000000 +0200
+++ cli_ure/source/climaker/climaker_mono.cxx	2007-03-29 16:25:14.000000000 +0200
@@ -151,7 +151,7 @@ class UnoHelper
     Reference< XInterface > mxTD_provider;
     Reference< reflection::XTypeDescriptionEnumeration > mxTD_enum;
     Reference< reflection::XTypeDescription > mxTD;
-    sal_Int32 mnPos;
+    sal_uInt32 mnPos;
 
     vector< OUString > mMandatoryRegistries;
     vector< OUString > mExtraRegistries;
@@ -1001,7 +1001,7 @@ extern "C" {
                              sal_uInt8 *tByte,
                              sal_Int16 *tInt16, sal_uInt16 *tUInt16,
                              sal_Int32 *tInt32, sal_uInt32 *tUInt32,
-                             sal_Int16 *tInt64, sal_uInt64 *tUInt64,
+                             sal_Int64 *tInt64, sal_uInt64 *tUInt64,
                              float *tFloat, double *tDouble)
     {
         reflection::XConstantTypeDescription* xtd = (reflection::XConstantTypeDescription*) ptr;
diff -rup cli_ure-bak/source/climaker/makefile.mk cli_ure/source/climaker/makefile.mk
--- cli_ure-bak/source/climaker/makefile.mk	2007-03-29 16:22:58.000000000 +0200
+++ cli_ure/source/climaker/makefile.mk	2007-03-29 16:26:16.000000000 +0200
@@ -103,48 +103,26 @@ UNOTYPES = \
 	com.sun.star.reflection.XSingletonTypeDescription2		\
 	com.sun.star.reflection.XStructTypeDescription
 
-CFLAGSCXX +=-AI$(BIN)
-
-
-# When compiling for CLR, disable "warning C4339: use of undefined type detected
-# in CLR meta-data - use of this type may lead to a runtime exception":
-.IF "$(COMEX)"=="10"
-CFLAGSCXX += -clr:noAssembly -wd4339
-.ELSE
-CFLAGSCXX += -clr:oldSyntax -LN -wd4339 -wd4715
-.ENDIF
-
-OBJFILES = \
-	$(OBJ)$/climaker_app.obj	\
-	$(OBJ)$/climaker_emit.obj
-
-APP1TARGET = $(TARGET)
-APP1OBJS = $(OBJFILES)
-
-
-APP1STDLIBS = \
-	$(CPPUHELPERLIB)		\
-	$(CPPULIB)			\
-	$(SALLIB)			\
-	mscoree.lib
-
-.IF "$(CCNUMVER)" >= "001399999999"
-APP1STDLIBS += \
-	msvcmrt.lib
-.ENDIF
-
-.ENDIF
-
-
-
-.INCLUDE : $(PRJ)$/util$/target.pmk
-.INCLUDE :  target.mk
-
-.IF "$(BUILD_FOR_CLI)" != ""
-
-$(OBJFILES): $(BIN)$/cli_basetypes.dll
-
-ALLTAR : $(BIN)$/climaker.exe.config
+SLOFILES = $(SLO)$/climaker_mono.obj
+SHL1OBJS=$(SLOFILES)
+SHL1STDLIBS=$(CPPULIB) $(CPPUHELPERLIB) $(SALLIB)
+SHL1TARGET=$(TARGET)
+SHL1IMPLIB=i$(TARGET).lib
+SHL1DEF=$(MISC)$/$(SHL1TARGET).def
+SHL1VERSIONMAP=climaker.map
+
+DEF1NAME=$(SHL1TARGET)
+
+ALLTAR : $(BIN)/climaker.exe $(BIN)$/climaker.exe.config
+
+CSFILES = climaker_csharp.cs
+
+$(BIN)/climaker.exe:   $(CSFILES)
+        +$(CSC) $(CSCFLAGS) -debug:full \
+                -out:$@ \
+                -reference:$(OUT)$/bin$/cli_basetypes.dll \
+                -reference:System.dll \
+                $(CSFILES)
 
 $(BIN)$/climaker.exe.config : climaker.exe.config
 	$(GNUCOPY) -f $? $@
@@ -152,6 +130,9 @@ $(BIN)$/climaker.exe.config : climaker.e
 	+chmod +x $@
 .ENDIF
 
+.INCLUDE :  target.mk
+.INCLUDE : $(PRJ)$/util$/target.pmk
+
 .ENDIF
 
 .ENDIF
