Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/class/corlib/System.Runtime.InteropServices')
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/AssemblyRegistrationFlags.cs18
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/AutomationProxyAttribute.cs28
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/BINDPTR.cs20
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/COMException.cs39
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/CallingConvention.cs41
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/ChangeLog172
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/CharSet.cs35
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/ClassInterfaceAttribute.cs30
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/ClassInterfaceType.cs24
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/CoClassAttribute.cs26
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ComAliasNameAttribute.cs27
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ComConversionLossAttribute.cs21
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ComEventInterfaceAttribute.cs34
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ComImportAttribute.cs21
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ComInterfaceType.cs17
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ComMemberType.cs19
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ComRegisterFunctionAttribute.cs18
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.cs20
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/ComVisible.cs25
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/DESCKIND.cs24
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/DISPPARAMS.cs21
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/DispIdAttribute.cs25
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/DllImportAttribute.cs33
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/EXCEPINFO.cs25
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/ExporterEventKind.cs18
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ExternalException.cs50
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/FieldOffsetAttribute.cs17
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs108
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/GCHandleType.cs38
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/GuidAttribute.cs25
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ICustomAdapter.cs15
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ICustomFactory.cs15
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ICustomMarshaler.cs19
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/INVOKEKIND.cs22
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/IRegistrationServices.cs25
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/ITypeLibConverter.cs22
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ITypeLibExporterNameProvider.cs18
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/ITypeLibExporterNotifySink.cs20
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ITypeLibImporterNotifySink.cs20
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ImportedFromTypeLibAttribute.cs26
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ImporterEventKind.cs17
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/InAttribute.cs18
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/InterfaceTypeAttribute.cs29
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/LCIDConversionAttribute.cs27
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/LayoutKind.cs33
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs556
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/MarshalAsAttribute.cs27
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/OptionalAttribute.cs10
-rw-r--r--mcs/class/corlib/System.Runtime.InteropServices/OutAttribute.cs19
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/PreserveSigAttribute.cs19
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/PrimaryInteropAssemblyAttribute.cs32
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/ProgIdAttribute.cs28
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/StructLayoutAttribute.cs23
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/TYPEKIND.cs27
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/TypeLibExporterFlags.cs16
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncAttribute.cs32
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncFlags.cs25
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeAttribute.cs32
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeFlags.cs26
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/TypeLibVarAttribute.cs32
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/TypeLibVarFlags.cs26
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/UCOMTypeComp.cs20
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/UCOMTypeInfo.cs37
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/UCOMTypeLib.cs27
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/UnmanagedType.cs170
-rwxr-xr-xmcs/class/corlib/System.Runtime.InteropServices/VarEnum.cs50
66 files changed, 2579 insertions, 0 deletions
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/AssemblyRegistrationFlags.cs b/mcs/class/corlib/System.Runtime.InteropServices/AssemblyRegistrationFlags.cs
new file mode 100755
index 00000000000..479122692c7
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/AssemblyRegistrationFlags.cs
@@ -0,0 +1,18 @@
+//
+// System.Runtime.InteropServices.AssemblyRegistrationFlags.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+namespace System.Runtime.InteropServices
+{
+ [Flags]
+ [Serializable]
+ public enum AssemblyRegistrationFlags {
+ None = 0,
+ SetCodeBase,
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/AutomationProxyAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/AutomationProxyAttribute.cs
new file mode 100755
index 00000000000..3dfdc572adb
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/AutomationProxyAttribute.cs
@@ -0,0 +1,28 @@
+//
+// System.Runtime.InteropServices.AutomationProxyAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class |
+ AttributeTargets.Interface)]
+ public sealed class AutomationProxyAttribute : Attribute
+ {
+ bool val;
+
+ public AutomationProxyAttribute (bool val)
+ {
+ this.val = val;
+ }
+
+ public bool Value {
+ get { return val; }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/BINDPTR.cs b/mcs/class/corlib/System.Runtime.InteropServices/BINDPTR.cs
new file mode 100755
index 00000000000..7bb93ac6769
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/BINDPTR.cs
@@ -0,0 +1,20 @@
+
+// System.Runtime.InteropServices/BINDPTR.cs
+//
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2002 Ximian, Inc.
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+
+ [ComVisible(false)]
+ public struct BINDPTR {
+ public IntPtr lpfuncdesc;
+ public IntPtr lptcomp;
+ public IntPtr lpvardesc;
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/COMException.cs b/mcs/class/corlib/System.Runtime.InteropServices/COMException.cs
new file mode 100644
index 00000000000..0d720b04967
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/COMException.cs
@@ -0,0 +1,39 @@
+//
+// COMException.cs - COM Exception
+//
+// Author:
+// Sebastien Pouliot (spouliot@motus.com)
+//
+// (C) 2002 Motus Technologies Inc. (http://www.motus.com)
+//
+
+using System.Runtime.Serialization;
+
+namespace System.Runtime.InteropServices {
+
+[Serializable]
+public class COMException : ExternalException {
+
+ public COMException ()
+ : base () {}
+
+ public COMException (string message)
+ : base (message) {}
+
+ public COMException (string message, Exception inner)
+ : base (message, inner) {}
+
+ public COMException (string message, int errorCode)
+ : base (message, errorCode) {}
+
+ protected COMException (SerializationInfo info, StreamingContext context)
+ : base (info, context) {}
+
+ [MonoTODO()]
+ public override string ToString ()
+ {
+ return null;
+ }
+}
+
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/CallingConvention.cs b/mcs/class/corlib/System.Runtime.InteropServices/CallingConvention.cs
new file mode 100644
index 00000000000..7f2c24d2b0c
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/CallingConvention.cs
@@ -0,0 +1,41 @@
+// CallingConvention.cs
+//
+// This code was automatically generated from
+// ECMA CLI XML Library Specification.
+// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
+// Created: Fri, 7 Sep 2001 16:33:29 UTC
+// Source file: AllTypes.xml
+// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+
+
+namespace System.Runtime.InteropServices {
+
+
+ /// <summary>
+ /// </summary>
+ public enum CallingConvention {
+
+ /// <summary>
+ /// </summary>
+ Winapi = 1,
+
+ /// <summary>
+ /// </summary>
+ Cdecl = 2,
+
+ /// <summary>
+ /// </summary>
+ StdCall = 3,
+
+ /// <summary>
+ /// </summary>
+ ThisCall = 4,
+
+ /// <summary>
+ /// </summary>
+ FastCall = 5,
+ } // CallingConvention
+
+} // System.Runtime.InteropServices
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog b/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
new file mode 100644
index 00000000000..e446fca55c9
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ChangeLog
@@ -0,0 +1,172 @@
+2003-01-05 Sebastien Pouliot <spouliot@videotron.ca>
+
+ * COMException.cs: New. Minimal (incomplete - i'm not using COM)
+ implementation because this is thrown when dealing with Software
+ Publisher Certificates (SPC) in X509Certificate.
+
+2002-08-22 Nick Drochak <ndrochak@gol.com>
+
+ * OutAttribute.cs: TypeID isn't overriden from Attribute here.
+ * PInvokeMap.cs: Non-existent enum. Must be from beta days.
+
+2002-06-24 root <dietmar@ximian.com>
+
+ * Marshal.cs: impl. Copy()
+
+Fri Jun 14 16:18:50 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+ * UnmanagedType.cs, Marshal.cs: minor fixes.
+
+Wed Jun 12 16:32:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+ * Marshal.c: stubbed out all the methods and filled in some
+ implementation.
+ * BINDPTR.cs, ComMemberType.cs, DESCKIND.cs, DISPPARAMS.cs,
+ EXCEPINFO.cs, INVOKEKIND.cs, TYPEKIND.cs, UCOMTypeInfo.cs,
+ UCOMTypeLib.cs: enums, interfaces and structs needed in Marshal class.
+
+Tue Jun 4 18:05:30 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+ * GCHandle.cs: changed to fit spec and implementation needs.
+
+Tue May 14 16:35:13 CEST 2002 Paolo Molaro <lupus@ximian.com>
+
+ * CharSet.cs: added missing None enum item.
+
+2002-04-26 Joe Shaw <joe@ximian.com>
+
+ * Marshal.cs (StructureToPtr): stub this out.
+
+2002-04-23 Joe Shaw <joe@ximian.com>
+
+ * Marshal.cs: Stub out a few functions to get gtk# to build.
+
+2002-04-22 Duncan Mak <duncan@ximian.com>
+
+ * ImporterEventKind.cs:
+ * TypeLibFuncFlags.cs:
+ * TypeLibTypeFlags.cs:
+ * TypeLibVarFlags.cs: Fixed various typos and added missing elements.
+
+ * ComConventionLossAttribute.cs: Removed, there's a typo.
+ * ComConversionLossAttribute.cs: Same attribute, slight change of name.
+
+ * PreserveSigAttribute.cs:
+ * ImportedFromTypeLibAttribute.cs: Added missing AttributeUsage
+ attribute.
+
+ * TypeLibFuncAttribute.cs:
+ * TypeLibTypeAttribute.cs:
+ * TypeLibVarAttribute.cs: Added missing constructors.
+
+
+2002-04-22 Duncan Mak <duncan@ximian.com>
+
+ * AutomationProxyAttribute.cs:
+ * CoClassAttribute.cs:
+ * ComAliasNameAttribute.cs:
+ * ComConventionLossAttribute.cs:
+ * ComEventInterfaceAttribute.cs:
+ * ComImportAttribute.cs:
+ * ComRegisterFunctionAttribute.cs:
+ * ComUnregisterFunctionAttribute.cs:
+ * DispIdAttribute.cs:
+ * ImportedFromTypeLibAttribute.cs:
+ * LCIDConversionAttribute.cs:
+ * PreserveSigAttribute.cs:
+ * PrimaryInteropAssemblyAttribute.cs:
+ * ProgIdAttribute.cs:
+ * TypeLibFuncAttribute.cs:
+ * TypeLibFuncFlags.cs:
+ * TypeLibTypeAttribute.cs:
+ * TypeLibTypeFlags.cs:
+ * TypeLibVarAttribute.cs:
+ * TypeLibVarFlags.cs: Added to CVS.
+
+2002-04-08 Nick Drochak <ndrochak@gol.com>
+
+ * Marshal.cs: Make class public.
+ * ComVisible.cs: New File.
+
+2002-03-24 Nick Drochak <ndrochak@gol.com>
+
+ * ClassInterfaceAttribute.cs:
+ * ClassInterfaceType.cs: New Files.
+
+2002-02-27 Duncan Mak <duncan@ximian.com>
+
+ * ExporterEventKind.cs:
+ * ITypeLibConverter.cs:
+ * ITypeLibImporterNotifySink.cs: Added to CVS for Kevin Winchester <kwin@ns.sympatico.ca>.
+
+2002-02-26 Duncan Mak <duncan@ximian.com>
+
+ * ComInterfaceType.cs: Added to CVS.
+
+ * AssemblyRegistrationFlags.cs:
+ * GuidAttribute.cs:
+ * ICustomAdapter.cs:
+ * ICustomFactory.cs:
+ * ICustomMarshaler.cs:
+ * IRegistrationServices.cs:
+ * ITypeLibExporterNameProvider.cs:
+ * ITypeLibImporterNotifySink.cs:
+ * InterfaceTypeAttribute.cs:
+ * TypeLibExporterFlags.cs: Committed for Kevin Winchester <kwin@ns.sympatico.ca>.
+
+ * GCHandle.cs: Added to CVS. Patch from Ajay kumar Dwivedi.
+
+ * GCHandleType.cs: Committed patch from Ajay.
+
+ * ImporterEventKind.cs: Added to CVS.
+
+2002-01-24 Miguel de Icaza <miguel@ximian.com>
+
+ * StructLayoutAttribute.cs: Flag attribute as targetting structs
+ or classes.
+
+ * InAttribute.cs: Flag attribute as targettting a paramter
+
+ * OutAttribute.cs: ditto.
+
+ * DllImportAttribute.cs: Flag attribute as targetting methods.
+
+ * MarshalAsAttribute.cs: Flag attribute as targetting fields,
+ parameters and returnvalues.
+
+2002-01-23 Dick Porter <dick@ximian.com>
+
+ * Marshal.cs: Added GetLastWin32Error()
+
+ * ExternalException.cs: Implemented
+
+2002-01-17 Miguel de Icaza <miguel@ximian.com>
+
+ * ExternalException.cs: Add ExternalException.
+
+2002-01-05 Ravi Pratap <ravi@ximian.com>
+
+ * OutAttribute.cs : Decorate with MonoTODO.
+
+Thu Dec 20 15:46:31 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+ * FieldOffsetAttribute.cs, InAttribute.cs, MarshalAsAttribute.cs,
+ OptionalAttribute.cs, StructLayoutAttribute.cs, VarEnum.cs:
+ more stuff needed by the compiler.
+
+Thu Dec 13 20:22:18 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+ * DllImportAttribute.cs: added.
+ * MethodImplOptions.cs: removed: this is already in CompilerServices.
+
+Wed Nov 14 17:02:57 CET 2001 Paolo Molaro <lupus@ximian.com>
+
+ * CallingConvention.cs: add missing Winapi.
+
+2001-07-20 Miguel de Icaza <miguel@ximian.com>
+
+ * OutAttribute.cs: New file.
+
+2001-07-18 Michael Lambert <michaellambert@email.com>
+
+ * CallingConvention.cs.cs, CharSet.cs, GCHandleType.cs, LayoutKind.cs: Add.
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/CharSet.cs b/mcs/class/corlib/System.Runtime.InteropServices/CharSet.cs
new file mode 100644
index 00000000000..27ae60765e6
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/CharSet.cs
@@ -0,0 +1,35 @@
+// CharSet.cs
+//
+// This code was automatically generated from
+// ECMA CLI XML Library Specification.
+// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
+// Created: Fri, 7 Sep 2001 16:33:35 UTC
+// Source file: AllTypes.xml
+// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+
+
+namespace System.Runtime.InteropServices {
+
+
+ /// <summary>
+ /// </summary>
+ public enum CharSet {
+
+ None = 1,
+
+ /// <summary>
+ /// </summary>
+ Ansi = 2,
+
+ /// <summary>
+ /// </summary>
+ Unicode = 3,
+
+ /// <summary>
+ /// </summary>
+ Auto = 4,
+ } // CharSet
+
+} // System.Runtime.InteropServices
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ClassInterfaceAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/ClassInterfaceAttribute.cs
new file mode 100644
index 00000000000..47aa4ebed92
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ClassInterfaceAttribute.cs
@@ -0,0 +1,30 @@
+//
+// System.Runtime.InteropServices.ClassInterfaceAttribute.cs
+//
+// Author:
+// Nick Drochak (ndrochak@gol.com)
+//
+// (C) 2002 Nick Drochak
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class)]
+ public sealed class ClassInterfaceAttribute : Attribute {
+ private ClassInterfaceType ciType;
+
+ public ClassInterfaceAttribute ( short classInterfaceType ) {
+ ciType = (ClassInterfaceType)classInterfaceType;
+ }
+
+ public ClassInterfaceAttribute ( ClassInterfaceType classInterfaceType ) {
+ ciType = classInterfaceType;
+ }
+
+ public ClassInterfaceType Value {
+ get {return ciType;}
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ClassInterfaceType.cs b/mcs/class/corlib/System.Runtime.InteropServices/ClassInterfaceType.cs
new file mode 100644
index 00000000000..963c2880a1a
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ClassInterfaceType.cs
@@ -0,0 +1,24 @@
+//
+// System.Runtime.InteropServices.ClassInterfaceType.cs
+//
+// Author:
+// Nick Drochak (ndrochak@gol.com)
+//
+// (C) 2002 Nick Drochak
+//
+
+
+namespace System.Runtime.InteropServices {
+
+ [Serializable]
+ public enum ClassInterfaceType
+ {
+ None = 0,
+
+ AutoDispatch = 1,
+
+ AutoDual = 2
+
+ } // ClassInterfaceType
+
+} // System.Runtime.InteropServices
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/CoClassAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/CoClassAttribute.cs
new file mode 100755
index 00000000000..c947887612d
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/CoClassAttribute.cs
@@ -0,0 +1,26 @@
+//
+// System.Runtime.InteropServices.CoClassAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Interface)]
+ public sealed class CoClassAttribute : Attribute
+ {
+
+ Type klass;
+
+ public CoClassAttribute (Type coClass)
+ {
+ klass = coClass;
+ }
+
+ public Type CoClass {
+ get { return klass; }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComAliasNameAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComAliasNameAttribute.cs
new file mode 100755
index 00000000000..60119849175
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ComAliasNameAttribute.cs
@@ -0,0 +1,27 @@
+//
+// System.Runtime.InteropServices.ComAliasNameAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+ [AttributeUsage (AttributeTargets.Property | AttributeTargets.Field |
+ AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
+ public sealed class ComAliasNameAttribute : Attribute
+ {
+ string val;
+
+ public ComAliasNameAttribute (string alias)
+ {
+ val = alias;
+ }
+
+ public string Value {
+ get { return val; }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComConversionLossAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComConversionLossAttribute.cs
new file mode 100755
index 00000000000..2260d5ae488
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ComConversionLossAttribute.cs
@@ -0,0 +1,21 @@
+//
+// System.Runtime.InteropServices.ComConversionLossAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.All)]
+ public sealed class ComConversionLossAttribute : Attribute
+ {
+ public ComConversionLossAttribute ()
+ {
+ }
+ }
+
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComEventInterfaceAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComEventInterfaceAttribute.cs
new file mode 100755
index 00000000000..f03e371c898
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ComEventInterfaceAttribute.cs
@@ -0,0 +1,34 @@
+//
+// System.Runtime.InteropServices.ComEventInterfaceAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Interface)]
+ public sealed class ComEventInterfaceAttribute : Attribute
+ {
+ Type si, ep;
+
+ public ComEventInterfaceAttribute (Type SourceInterface,
+ Type EventProvider)
+ {
+ si = SourceInterface;
+ ep = EventProvider;
+ }
+
+ public Type EventProvider {
+ get { return ep; }
+ }
+
+ public Type SourceInterface {
+ get { return si; }
+ }
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComImportAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComImportAttribute.cs
new file mode 100755
index 00000000000..325c5091f7b
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ComImportAttribute.cs
@@ -0,0 +1,21 @@
+//
+// System.Runtime.InteropServices.ComImportAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Class |
+ AttributeTargets.Interface)]
+ public sealed class ComImportAttribute : Attribute
+ {
+ public ComImportAttribute ()
+ {
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComInterfaceType.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComInterfaceType.cs
new file mode 100755
index 00000000000..8d7c7a6b669
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ComInterfaceType.cs
@@ -0,0 +1,17 @@
+//
+// System.Runtime.InteropServices.ComInterfaceType.cs
+//
+// Author: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Runtime.InteropServices
+{
+ [Serializable] public enum ComInterfaceType
+ {
+ InterfaceIsDual = 0,
+ InterfaceIsIUnknown = 1,
+ InterfaceIsIDispatch = 2,
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComMemberType.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComMemberType.cs
new file mode 100755
index 00000000000..8e66ff211d1
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ComMemberType.cs
@@ -0,0 +1,19 @@
+
+// System.Runtime.InteropServices/ComMemberType.cs
+//
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2002 Ximian, Inc.
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+ [Serializable]
+ public enum ComMemberType {
+ Method = 0,
+ PropGet = 1,
+ PropSet = 2
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComRegisterFunctionAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComRegisterFunctionAttribute.cs
new file mode 100755
index 00000000000..27a27076213
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ComRegisterFunctionAttribute.cs
@@ -0,0 +1,18 @@
+//
+// System.Runtime.InteropServices.ComRegisterFunctionAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Method)]
+ public sealed class ComRegisterFunctionAttribute : Attribute
+ {
+ public ComRegisterFunctionAttribute ()
+ {
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.cs
new file mode 100755
index 00000000000..6d2fc1ed2e1
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ComUnregisterFunctionAttribute.cs
@@ -0,0 +1,20 @@
+//
+// System.Runtime.InteropServices.ComUnregisterFunctionAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Method)]
+ public sealed class ComUnregisterFunctionAttribute : Attribute
+ {
+ public ComUnregisterFunctionAttribute ()
+ {
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComVisible.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComVisible.cs
new file mode 100644
index 00000000000..ad22b254c23
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ComVisible.cs
@@ -0,0 +1,25 @@
+//
+// System.Runtime.InteropServices.ComVisible.cs
+//
+// Author:
+// Nick Drochak (ndrochak@gol.com)
+//
+// (C) 2002 Nick Drochak
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class
+ | AttributeTargets.Struct | AttributeTargets.Enum |
+ AttributeTargets.Method | AttributeTargets.Property |
+ AttributeTargets.Field | AttributeTargets.Interface |
+ AttributeTargets.Delegate)]
+ public sealed class ComVisibleAttribute : Attribute
+ {
+ private bool Visible = false;
+ public ComVisibleAttribute(bool value) {Visible = value;}
+ public bool Value { get {return Visible;} }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/DESCKIND.cs b/mcs/class/corlib/System.Runtime.InteropServices/DESCKIND.cs
new file mode 100755
index 00000000000..b312119c6f1
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/DESCKIND.cs
@@ -0,0 +1,24 @@
+
+// System.Runtime.InteropServices/DESCKIND.cs
+//
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2002 Ximian, Inc.
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+
+ [Serializable]
+ [ComVisible(false)]
+ public enum DESCKIND {
+ DESCKIND_NONE = 0,
+ DESCKIND_FUNCDESC = 1,
+ DESCKIND_VARDESC = 2,
+ DESCKIND_TYPECOMP = 3,
+ DESCKIND_IMPLICITAPPOBJ = 4,
+ DESCKIND_MAX = 5
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/DISPPARAMS.cs b/mcs/class/corlib/System.Runtime.InteropServices/DISPPARAMS.cs
new file mode 100755
index 00000000000..c84dde79aa8
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/DISPPARAMS.cs
@@ -0,0 +1,21 @@
+
+// System.Runtime.InteropServices/DISPPARAMS.cs
+//
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2002 Ximian, Inc.
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+
+ [ComVisible(false)]
+ public struct DISPPARAMS {
+ public int cArgs;
+ public int cNamedArgs;
+ public IntPtr rgdispidNamedArgs;
+ public IntPtr rgvarg;
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/DispIdAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/DispIdAttribute.cs
new file mode 100755
index 00000000000..139c331bb53
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/DispIdAttribute.cs
@@ -0,0 +1,25 @@
+//
+// System.Runtime.InteropServices.DispIdAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Method | AttributeTargets.Property |
+ AttributeTargets.Field | AttributeTargets.Event)]
+ public sealed class DispIdAttribute : Attribute
+ {
+ int id;
+
+ public DispIdAttribute (int dispId)
+ {
+ id = dispId;
+ }
+
+ public int Value {
+ get { return id; }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/DllImportAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/DllImportAttribute.cs
new file mode 100755
index 00000000000..9d6466527ea
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/DllImportAttribute.cs
@@ -0,0 +1,33 @@
+//
+// System.Runtime.InteropServices/DllImportAttribute.cs
+//
+// Author:
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+using System;
+
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Method)]
+ public sealed class DllImportAttribute: Attribute {
+ public CallingConvention CallingConvention;
+ public CharSet CharSet;
+ public string EntryPoint;
+ public bool ExactSpelling;
+ public bool PreserveSig;
+ public bool SetLastError;
+ private string Dll;
+
+ public string Value {
+ get {return Dll;}
+ }
+
+ public DllImportAttribute (string dllName) {
+ Dll = dllName;
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/EXCEPINFO.cs b/mcs/class/corlib/System.Runtime.InteropServices/EXCEPINFO.cs
new file mode 100755
index 00000000000..1c29b3223a6
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/EXCEPINFO.cs
@@ -0,0 +1,25 @@
+
+// System.Runtime.InteropServices/EXCEPINFO.cs
+//
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2002 Ximian, Inc.
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+
+ [ComVisible(false)]
+ public struct EXCEPINFO {
+ public string bstrDescription;
+ public string bstrHelpFile;
+ public string bstrSource;
+ public int dwHelpContext;
+ public IntPtr pfnDeferredFillIn;
+ public IntPtr pvReserved;
+ public short wCode;
+ public short wReserved;
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ExporterEventKind.cs b/mcs/class/corlib/System.Runtime.InteropServices/ExporterEventKind.cs
new file mode 100644
index 00000000000..d80e2ed847d
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ExporterEventKind.cs
@@ -0,0 +1,18 @@
+//
+// System.Runtime.InteropServices.ExporterEventKind.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+namespace System.Runtime.InteropServices
+{
+ [Serializable] public enum ExporterEventKind
+ {
+ NOTIF_TYPECONVERTED = 0,
+ NOTIF_CONVERTWARNING = 1,
+ ERROR_REFTOINVALIDASSEMBLY = 2,
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ExternalException.cs b/mcs/class/corlib/System.Runtime.InteropServices/ExternalException.cs
new file mode 100755
index 00000000000..014074cef21
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ExternalException.cs
@@ -0,0 +1,50 @@
+//
+// System.Runtime.InteropServices.ExternalException.cs
+//
+// Author:
+// Miguel De Icaza (miguel@ximian.com)
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+//
+
+using System.Runtime.Serialization;
+using System.Globalization;
+
+namespace System.Runtime.InteropServices {
+ [Serializable]
+ public class ExternalException : SystemException {
+ private int error_code;
+
+ // Constructors
+ public ExternalException ()
+ : base (Locale.GetText ("External exception"))
+ {
+ }
+
+ public ExternalException (string message)
+ : base (message)
+ {
+ }
+
+ protected ExternalException(SerializationInfo info, StreamingContext context)
+ : base (info, context) {
+ }
+
+ public ExternalException (string message, Exception inner)
+ : base (message, inner)
+ {
+ }
+
+ public ExternalException (string message, int errorCode)
+ : base (message)
+ {
+ error_code = errorCode;
+ }
+
+ public virtual int ErrorCode {
+ get {
+ return error_code;
+ }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/FieldOffsetAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/FieldOffsetAttribute.cs
new file mode 100755
index 00000000000..a5deebb0675
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/FieldOffsetAttribute.cs
@@ -0,0 +1,17 @@
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Field)]
+ public sealed class FieldOffsetAttribute : Attribute {
+ private int val;
+
+ public FieldOffsetAttribute( int offset) {
+ val = offset;
+ }
+ public int Value {
+ get {return val;}
+ }
+
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs b/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs
new file mode 100755
index 00000000000..cd277c63a53
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/GCHandle.cs
@@ -0,0 +1,108 @@
+//
+// System.Runtime.InteropServices/GCHandle.cs
+//
+// Authors:
+// Ajay kumar Dwivedi (adwiv@yahoo.com) ??
+// Paolo Molaro (lupus@ximian.com)
+//
+
+using System;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+namespace System.Runtime.InteropServices
+{
+ /// <summary>
+ /// Summary description for GCHandle.
+ /// </summary>
+ public struct GCHandle
+ {
+ // fields
+ private int handle;
+
+ private GCHandle(IntPtr h)
+ {
+ handle = (int)h;
+ }
+
+ // Constructors
+ private GCHandle(object obj)
+ : this(obj, GCHandleType.Normal)
+ {}
+
+ private GCHandle(object value, GCHandleType type)
+ {
+ handle = GetTargetHandle (value, 0, type);
+ }
+
+ // Properties
+
+ public bool IsAllocated
+ {
+ get
+ {
+ return (handle != 0);
+ }
+ }
+
+ public object Target
+ {
+ get
+ {
+ return GetTarget (handle);
+ }
+ set
+ {
+ handle = GetTargetHandle (value, handle, (GCHandleType)(-1));
+ }
+ }
+
+ // Methods
+ public IntPtr AddrOfPinnedObject()
+ {
+ IntPtr res = GetAddrOfPinnedObject(handle);
+ if (res == IntPtr.Zero)
+ throw new InvalidOperationException("The handle is not of Pinned type");
+ return res;
+ }
+
+ public static System.Runtime.InteropServices.GCHandle Alloc(object value)
+ {
+ return new GCHandle (value);
+ }
+
+ public static System.Runtime.InteropServices.GCHandle Alloc(object value, GCHandleType type)
+ {
+ return new GCHandle (value,type);
+ }
+
+ public void Free()
+ {
+ FreeHandle(handle);
+ handle = 0;
+ }
+
+ public static explicit operator IntPtr (GCHandle value)
+ {
+ return (IntPtr) value.handle;
+ }
+
+ public static explicit operator GCHandle(IntPtr value)
+ {
+ return new GCHandle (value);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ private extern static object GetTarget(int handle);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ private extern static int GetTargetHandle(object obj, int handle, GCHandleType type);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ private extern static void FreeHandle(int handle);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ private extern static IntPtr GetAddrOfPinnedObject(int handle);
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/GCHandleType.cs b/mcs/class/corlib/System.Runtime.InteropServices/GCHandleType.cs
new file mode 100644
index 00000000000..bee7c8b8436
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/GCHandleType.cs
@@ -0,0 +1,38 @@
+// GCHandleType.cs
+//
+// This code was automatically generated from
+// ECMA CLI XML Library Specification.
+// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
+// Created: Fri, 7 Sep 2001 16:33:42 UTC
+// Source file: AllTypes.xml
+// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+
+
+namespace System.Runtime.InteropServices {
+
+
+ /// <summary>
+ /// </summary>
+ public enum GCHandleType {
+
+
+ /// <summary>
+ /// </summary>
+ Weak = 0,
+
+ /// <summary>
+ /// </summary>
+ WeakTrackResurrection = 1,
+
+ /// <summary>
+ /// </summary>
+ Normal = 2,
+
+ /// <summary>
+ /// </summary>
+ Pinned = 3,
+ } // GCHandleType
+
+} // System.Runtime.InteropServices
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/GuidAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/GuidAttribute.cs
new file mode 100755
index 00000000000..1fd1a44f85e
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/GuidAttribute.cs
@@ -0,0 +1,25 @@
+//
+// System.Runtime.InteropServices.InAttribute.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Delegate)]
+ public sealed class GuidAttribute : Attribute {
+
+ private string guidValue;
+
+ public GuidAttribute (string guid) {
+ guidValue = guid;
+ }
+
+ public string Value {
+ get {return guidValue;}
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ICustomAdapter.cs b/mcs/class/corlib/System.Runtime.InteropServices/ICustomAdapter.cs
new file mode 100755
index 00000000000..edde7b22cc0
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ICustomAdapter.cs
@@ -0,0 +1,15 @@
+//
+// System.Runtime.InteropServices.ICustomAdapter.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+namespace System.Runtime.InteropServices {
+
+ public interface ICustomAdapter {
+ object GetUnderlyingObject ();
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ICustomFactory.cs b/mcs/class/corlib/System.Runtime.InteropServices/ICustomFactory.cs
new file mode 100755
index 00000000000..c5f1cb23eea
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ICustomFactory.cs
@@ -0,0 +1,15 @@
+//
+// System.Runtime.InteropServices.ICustomFactory.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+namespace System.Runtime.InteropServices {
+
+ public interface ICustomFactory {
+ MarshalByRefObject CreateInstance (Type serverType);
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ICustomMarshaler.cs b/mcs/class/corlib/System.Runtime.InteropServices/ICustomMarshaler.cs
new file mode 100755
index 00000000000..90a2b29b619
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ICustomMarshaler.cs
@@ -0,0 +1,19 @@
+//
+// System.Runtime.InteropServices.ICustomMarshaler.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+namespace System.Runtime.InteropServices {
+
+ public interface ICustomMarshaler {
+ void CleanUpManagedData (object ManagedObj);
+ void CleanUpNativeData (IntPtr pNativeData);
+ int GetNativeDataSize ();
+ IntPtr MarshalManagedToNative (object ManagedObj);
+ object MarshalNativeToManaged (IntPtr pNativeData);
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/INVOKEKIND.cs b/mcs/class/corlib/System.Runtime.InteropServices/INVOKEKIND.cs
new file mode 100755
index 00000000000..4c318507e5f
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/INVOKEKIND.cs
@@ -0,0 +1,22 @@
+
+// System.Runtime.InteropServices/INVOKEKIND.cs
+//
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2002 Ximian, Inc.
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+
+ [Serializable]
+ [ComVisible(false)]
+ public enum INVOKEKIND {
+ INVOKE_FUNC = 1,
+ INVOKE_PROPERTYGET = 2,
+ INVOKE_PROPERTYPUT = 4,
+ INVOKE_PROPERTYPUTREF = 8
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/IRegistrationServices.cs b/mcs/class/corlib/System.Runtime.InteropServices/IRegistrationServices.cs
new file mode 100755
index 00000000000..a42e935895c
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/IRegistrationServices.cs
@@ -0,0 +1,25 @@
+//
+// System.Runtime.InteropServices.IRegistrationServices.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+using System.Reflection;
+
+namespace System.Runtime.InteropServices {
+
+ //[Guid("")]
+ public interface IRegistrationServices {
+ Guid GetManagedCategoryGuid ();
+ string GetProgIdForType (Type type);
+ Type[] GetRegistrableTypesInAssembly (Assembly assembly);
+ bool RegisterAssembly (Assembly assembly, AssemblyRegistrationFlags flags);
+ void RegisterTypeForComClients (Type type, ref Guid g);
+ bool TypeRepresentsComType (Type type);
+ bool TypeRequiresRegistration (Type type);
+ bool UnregisterAssembly (Assembly assembly);
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibConverter.cs b/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibConverter.cs
new file mode 100644
index 00000000000..78be2912f6b
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibConverter.cs
@@ -0,0 +1,22 @@
+//
+// System.Runtime.InteropServices.ITypeLibConverter.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+using System.Reflection;
+using System.Reflection.Emit;
+
+namespace System.Runtime.InteropServices {
+
+ //[Guid("")]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ public interface ITypeLibConverter {
+ object ConvertAssemblyToTypeLib (Assembly assembly, string typeLibName, TypeLibExporterFlags flags, ITypeLibExporterNotifySink notifySink);
+ AssemblyBuilder ConvertTypeLibToAssembly (object typeLib, string asmFileName, int flags, ITypeLibImporterNotifySink notifySink, byte[] publicKey, StrongNameKeyPair keyPair, bool unsafeInterfaces);
+ bool GetPrimaryInteropAssembly (Guid g, int major, int minor, int lcid, out string asmName, out string asmCodeBase);
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibExporterNameProvider.cs b/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibExporterNameProvider.cs
new file mode 100755
index 00000000000..3e937ae4b22
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibExporterNameProvider.cs
@@ -0,0 +1,18 @@
+//
+// System.Runtime.InteropServices.ITypeLibExporterNameProvider.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+namespace System.Runtime.InteropServices {
+
+ //[Guid("")]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ public interface ITypeLibExporterNameProvider {
+ string[] GetNames ();
+
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibExporterNotifySink.cs b/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibExporterNotifySink.cs
new file mode 100644
index 00000000000..547b87d73d3
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibExporterNotifySink.cs
@@ -0,0 +1,20 @@
+//
+// System.Runtime.InteropServices.ITypeLibExporterNotifySink.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+using System.Reflection;
+
+namespace System.Runtime.InteropServices {
+
+ //[Guid("")]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ public interface ITypeLibExporterNotifySink {
+ void ReportEvent (ExporterEventKind eventKind, int eventCode, string eventMsg);
+ object ResolveRef (Assembly assembly);
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibImporterNotifySink.cs b/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibImporterNotifySink.cs
new file mode 100755
index 00000000000..3c9199e4063
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ITypeLibImporterNotifySink.cs
@@ -0,0 +1,20 @@
+//
+// System.Runtime.InteropServices.ITypeLibImporterNotifySink.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+using System.Reflection;
+
+namespace System.Runtime.InteropServices {
+
+ //[Guid("")]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ public interface ITypeLibImporterNotifySink {
+ void ReportEvent(ImporterEventKind eventKind, int eventCode, string eventMsg);
+ Assembly ResolveRef(object typeLib);
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ImportedFromTypeLibAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/ImportedFromTypeLibAttribute.cs
new file mode 100755
index 00000000000..f4403eb8c27
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ImportedFromTypeLibAttribute.cs
@@ -0,0 +1,26 @@
+//
+// System.Runtime.InteropServices.ImportedFromTypeLibAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Assembly)]
+ public sealed class ImportedFromTypeLibAttribute : Attribute
+ {
+ string TlbFile;
+ public ImportedFromTypeLibAttribute (string tlbFile)
+ {
+ TlbFile = tlbFile;
+ }
+
+ public string Value {
+ get { return TlbFile; }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ImporterEventKind.cs b/mcs/class/corlib/System.Runtime.InteropServices/ImporterEventKind.cs
new file mode 100755
index 00000000000..c896b7e053f
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ImporterEventKind.cs
@@ -0,0 +1,17 @@
+//
+// System.Runtime.InteropServices.ImporterEventKind.cs
+//
+// Author: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Runtime.InteropServices
+{
+ [Serializable] public enum ImporterEventKind
+ {
+ NOTIF_TYPECONVERTED = 0,
+ NOTIF_CONVERTWARNING = 1,
+ ERROR_REFTOINVALIDTYPELIB = 2,
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/InAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/InAttribute.cs
new file mode 100755
index 00000000000..b141d9dbc49
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/InAttribute.cs
@@ -0,0 +1,18 @@
+//
+// System.Runtime.InteropServices.InAttribute.cs
+//
+// Author:
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) Ximian, Inc. http://www.ximian.com
+//
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Parameter)]
+ public sealed class InAttribute : Attribute {
+ public InAttribute () {
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/InterfaceTypeAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/InterfaceTypeAttribute.cs
new file mode 100755
index 00000000000..e8cbd5ae9b7
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/InterfaceTypeAttribute.cs
@@ -0,0 +1,29 @@
+//
+// System.Runtime.InteropServices.InterfaceTypeAttribute.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage(AttributeTargets.Interface)]
+ public sealed class InterfaceTypeAttribute : Attribute {
+
+ private ComInterfaceType intType;
+
+ public InterfaceTypeAttribute (ComInterfaceType interfaceType){
+ intType = interfaceType;
+ }
+
+ public InterfaceTypeAttribute (short interfaceType) {
+ intType = (ComInterfaceType)interfaceType;
+ }
+
+ public ComInterfaceType Value {
+ get {return intType;}
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/LCIDConversionAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/LCIDConversionAttribute.cs
new file mode 100755
index 00000000000..af04cccc1e4
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/LCIDConversionAttribute.cs
@@ -0,0 +1,27 @@
+//
+// System.Runtime.InteropServices.LCIDConversionAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Method)]
+ public sealed class LCIDConversionAttribute : Attribute
+ {
+ int id;
+
+ public LCIDConversionAttribute (int lcid)
+ {
+ id = lcid;
+ }
+
+ public int Value {
+ get { return id; }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/LayoutKind.cs b/mcs/class/corlib/System.Runtime.InteropServices/LayoutKind.cs
new file mode 100644
index 00000000000..960cc3d551e
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/LayoutKind.cs
@@ -0,0 +1,33 @@
+// LayoutKind.cs
+//
+// This code was automatically generated from
+// ECMA CLI XML Library Specification.
+// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
+// Created: Fri, 7 Sep 2001 16:33:48 UTC
+// Source file: AllTypes.xml
+// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+
+
+namespace System.Runtime.InteropServices {
+
+
+ /// <summary>
+ /// </summary>
+ public enum LayoutKind {
+
+ /// <summary>
+ /// </summary>
+ Sequential = 0,
+
+ /// <summary>
+ /// </summary>
+ Explicit = 2,
+
+ /// <summary>
+ /// </summary>
+ Auto = 3,
+ } // LayoutKind
+
+} // System.Runtime.InteropServices
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
new file mode 100644
index 00000000000..57f67135308
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
@@ -0,0 +1,556 @@
+// System.Runtime.InteropServices.Marshal
+//
+// Sean MacIsaac (macisaac@ximian.com)
+// Paolo Molaro (lupus@ximian.com)
+// Dietmar Maurer (dietmar@ximian.com)
+//
+// (C) 2001-2002 Ximian, Inc.
+
+using System.Runtime.CompilerServices;
+using System;
+using System.Reflection;
+using System.Threading;
+
+namespace System.Runtime.InteropServices
+{
+ public sealed class Marshal
+ {
+ /* fields */
+ public static readonly int SystemMaxDBCSCharSize = 2; // don't know what this is
+ public static readonly int SystemDefaultCharSize = 2;
+
+ private Marshal () {}
+
+ [MonoTODO]
+ public static int AddRef (IntPtr pUnk) {
+ throw new NotImplementedException ();
+ }
+ [MonoTODO]
+ public static IntPtr AllocCoTaskMem (int cb) {
+ throw new NotImplementedException ();
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static IntPtr AllocHGlobal (IntPtr cb);
+
+ public static IntPtr AllocHGlobal (int cb) {
+ return AllocHGlobal ((IntPtr)cb);
+ }
+
+ [MonoTODO]
+ public static object BindToMoniker (string monikerName) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static void ChangeWrapperHandleStrength (object otp, bool fIsWeak) {
+ throw new NotImplementedException ();
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ extern static void copy_to_unmanaged (Array source, int startIndex,
+ IntPtr destination, int length);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ extern static void copy_from_unmanaged (IntPtr source, int startIndex,
+ Array destination, int length);
+
+ public static void Copy (byte[] source, int startIndex, IntPtr destination, int length) {
+ copy_to_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (char[] source, int startIndex, IntPtr destination, int length) {
+ copy_to_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (short[] source, int startIndex, IntPtr destination, int length) {
+ copy_to_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (int[] source, int startIndex, IntPtr destination, int length) {
+ copy_to_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (long[] source, int startIndex, IntPtr destination, int length) {
+ copy_to_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (float[] source, int startIndex, IntPtr destination, int length) {
+ copy_to_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (double[] source, int startIndex, IntPtr destination, int length) {
+ copy_to_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (IntPtr source, byte[] destination, int startIndex, int length) {
+ copy_from_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (IntPtr source, char[] destination, int startIndex, int length) {
+ copy_from_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (IntPtr source, short[] destination, int startIndex, int length) {
+ copy_from_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (IntPtr source, int[] destination, int startIndex, int length) {
+ copy_from_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (IntPtr source, long[] destination, int startIndex, int length) {
+ copy_from_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (IntPtr source, float[] destination, int startIndex, int length) {
+ copy_from_unmanaged (source, startIndex, destination, length);
+ }
+
+ public static void Copy (IntPtr source, double[] destination, int startIndex, int length) {
+ copy_from_unmanaged (source, startIndex, destination, length);
+ }
+
+ [MonoTODO]
+ public static object CreateWrapperOfType (object o, Type t) {
+ throw new NotImplementedException ();
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void DestroyStructure (IntPtr ptr, Type structuretype);
+
+ [MonoTODO]
+ public static void FreeBSTR (IntPtr ptr) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static void FreeCoTaskMem (IntPtr ptr) {
+ throw new NotImplementedException ();
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void FreeHGlobal (IntPtr hglobal);
+
+ [MonoTODO]
+ public static Guid GenerateGuidForType (Type type) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static string GenerateProgIdForType (Type type) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static object GetActiveObject (string progID) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr GetComInterfaceForObject (object o, Type T) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static object GetComObjectData (object obj, object key) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static int GetComSlotForMethodInfo (MemberInfo m) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static int GetEndComSlot (Type t) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static int GetExceptionCode() {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr GetExceptionPointers() {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr GetHINSTANCE (Module m) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static int GetHRForException (Exception e) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static int GetHRForLastWin32Error() {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr GetIDispatchForObject (object o) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr GetITypeInfoForType (Type t) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr GetIUnknownForObject (object o) {
+ throw new NotImplementedException ();
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public static extern int GetLastWin32Error();
+
+ [MonoTODO]
+ public static IntPtr GetManagedThunkForUnmanagedMethodPtr (IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static MemberInfo GetMethodInfoForComSlot (Type t, int slot, ref ComMemberType memberType) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static void GetNativeVariantForObject (object obj, IntPtr pDstNativeVariant) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static object GetObjectForIUnknown (IntPtr pUnk) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static object GetObjectForNativeVariant (IntPtr pSrcNativeVariant) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static object[] GetObjectsForNativeVariants (IntPtr aSrcNativeVariant, int cVars) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static int GetStartComSlot (Type t) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static Thread GetThreadFromFiberCookie (int cookie) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static object GetTypedObjectForIUnknown (IntPtr pUnk, Type t) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static Type GetTypeForITypeInfo (IntPtr piTypeInfo) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static string GetTypeInfoName (UCOMITypeInfo pTI) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static Guid GetTypeLibGuid (UCOMITypeLib pTLB) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static Guid GetTypeLibGuidForAssembly (Assembly asm) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static int GetTypeLibLcid (UCOMITypeLib pTLB) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static string GetTypeLibName (UCOMITypeLib pTLB) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr GetUnmanagedThunkForManagedMethodPtr (IntPtr pfnMethodToWrap, IntPtr pbSignature, int cbSignature) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static bool IsComObject (object o) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static bool IsTypeVisibleFromCom (Type t) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static int NumParamBytes (MethodInfo m) {
+ throw new NotImplementedException ();
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static IntPtr OffsetOf (Type t, string fieldName);
+
+ [MonoTODO]
+ public static void Prelink (MethodInfo m) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static void PrelinkAll (Type c) {
+ throw new NotImplementedException ();
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static string PtrToStringAnsi (IntPtr ptr);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static string PtrToStringAnsi (IntPtr ptr, int len);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static string PtrToStringAuto (IntPtr ptr);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static string PtrToStringAuto (IntPtr ptr, int len);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static string PtrToStringUni (IntPtr ptr);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static string PtrToStringUni (IntPtr ptr, int len);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static string PtrToStringBSTR (IntPtr ptr);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void PtrToStructure (IntPtr ptr, object structure);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static object PtrToStructure (IntPtr ptr, Type structureType);
+
+ [MonoTODO]
+ public static int QueryInterface (IntPtr pUnk, ref Guid iid, out IntPtr ppv) {
+ throw new NotImplementedException ();
+ }
+
+ public static byte ReadByte (IntPtr ptr) {
+ return ReadByte (ptr, 0);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static byte ReadByte (IntPtr ptr, int ofs);
+
+ [MonoTODO]
+ public static byte ReadByte (object ptr, int ofs) {
+ throw new NotImplementedException ();
+ }
+
+ public static short ReadInt16 (IntPtr ptr) {
+ return ReadInt16 (ptr, 0);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static short ReadInt16 (IntPtr ptr, int ofs);
+
+ [MonoTODO]
+ public static short ReadInt16 (object ptr, int ofs) {
+ throw new NotImplementedException ();
+ }
+
+ public static int ReadInt32 (IntPtr ptr) {
+ return ReadInt32 (ptr, 0);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static int ReadInt32 (IntPtr ptr, int ofs);
+
+ [MonoTODO]
+ public static int ReadInt32 (object ptr, int ofs) {
+ throw new NotImplementedException ();
+ }
+
+ public static long ReadInt64 (IntPtr ptr) {
+ return ReadInt64 (ptr, 0);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static long ReadInt64 (IntPtr ptr, int ofs);
+
+ [MonoTODO]
+ public static long ReadInt64(object ptr, int ofs) {
+ throw new NotImplementedException ();
+ }
+
+ public static IntPtr ReadIntPtr (IntPtr ptr) {
+ return ReadIntPtr (ptr, 0);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static IntPtr ReadIntPtr (IntPtr ptr, int ofs);
+
+ [MonoTODO]
+ public static IntPtr ReadIntPtr(object ptr, int ofs) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr ReAllocCoTaskMem (IntPtr pv, int cb) {
+ throw new NotImplementedException ();
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static IntPtr ReAllocHGlobal (IntPtr pv, IntPtr cb);
+
+ [MonoTODO]
+ public static int Release (IntPtr pUnk) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static int ReleaseComObject (object o) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static void ReleaseThreadCache() {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static bool SetComObjectData (object obj, object key, object data) {
+ throw new NotImplementedException ();
+ }
+
+ public static int SizeOf (object structure) {
+ return SizeOf (structure.GetType ());
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static int SizeOf (Type t);
+
+ [MonoTODO]
+ public static IntPtr StringToBSTR (string s) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr StringToCoTaskMemAnsi (string s) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr StringToCoTaskMemAuto (string s) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr StringToCoTaskMemUni (string s) {
+ throw new NotImplementedException ();
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static IntPtr StringToHGlobalAnsi (string s);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static IntPtr StringToHGlobalAuto (string s);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static IntPtr StringToHGlobalUni (string s);
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void StructureToPtr (object structure, IntPtr ptr, bool fDeleteOld);
+
+ [MonoTODO]
+ public static void ThrowExceptionForHR (int errorCode) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static void ThrowExceptionForHR (int errorCode, IntPtr errorInfo) {
+ throw new NotImplementedException ();
+ }
+
+ [MonoTODO]
+ public static IntPtr UnsafeAddrOfPinnedArrayElement (Array arr, int index) {
+ throw new NotImplementedException ();
+ }
+
+ public static void WriteByte (IntPtr ptr, byte val) {
+ WriteByte (ptr, 0, val);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void WriteByte (IntPtr ptr, int ofs, byte val);
+
+ [MonoTODO]
+ public static void WriteByte(object ptr, int ofs, byte val) {
+ throw new NotImplementedException ();
+ }
+
+ public static void WriteInt16 (IntPtr ptr, short val) {
+ WriteInt16 (ptr, 0, val);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void WriteInt16 (IntPtr ptr, int ofs, short val);
+
+ [MonoTODO]
+ public static void WriteInt16(object ptr, int ofs, short val) {
+ throw new NotImplementedException ();
+ }
+
+ public static void WriteInt32 (IntPtr ptr, int val) {
+ WriteInt32 (ptr, 0, val);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void WriteInt32 (IntPtr ptr, int ofs, int val);
+
+ [MonoTODO]
+ public static void WriteInt32(object ptr, int ofs, int val) {
+ throw new NotImplementedException ();
+ }
+
+ public static void WriteInt64 (IntPtr ptr, long val) {
+ WriteInt64 (ptr, 0, val);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void WriteInt64 (IntPtr ptr, int ofs, long val);
+
+ [MonoTODO]
+ public static void WriteInt64(object ptr, int ofs, long val) {
+ throw new NotImplementedException ();
+ }
+
+ public static void WriteIntPtr (IntPtr ptr, IntPtr val) {
+ WriteIntPtr (ptr, 0, val);
+ }
+
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void WriteIntPtr (IntPtr ptr, int ofs, IntPtr val);
+
+ [MonoTODO]
+ public static void WriteIntPtr(object ptr, int ofs, IntPtr val) {
+ throw new NotImplementedException ();
+ }
+
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/MarshalAsAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/MarshalAsAttribute.cs
new file mode 100755
index 00000000000..48e9f523d07
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/MarshalAsAttribute.cs
@@ -0,0 +1,27 @@
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.ReturnValue)]
+ public sealed class MarshalAsAttribute : Attribute {
+ private UnmanagedType utype;
+ public UnmanagedType ArraySubType;
+ public string MarshalCookie;
+ public string MarshalType;
+ public Type MarshalTypeRef;
+ public VarEnum SafeArraySubType;
+ public int SizeConst;
+ public short SizeParamIndex;
+
+ public MarshalAsAttribute (short unmanagedType) {
+ utype = (UnmanagedType)unmanagedType;
+ }
+ public MarshalAsAttribute( UnmanagedType unmanagedType) {
+ utype = unmanagedType;
+ }
+ public UnmanagedType Value {
+ get {return utype;}
+ }
+
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/OptionalAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/OptionalAttribute.cs
new file mode 100755
index 00000000000..d53f5291fa0
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/OptionalAttribute.cs
@@ -0,0 +1,10 @@
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Parameter)]
+ public sealed class OptionalAttribute : Attribute {
+ public OptionalAttribute () {
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/OutAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/OutAttribute.cs
new file mode 100644
index 00000000000..98b843497ac
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/OutAttribute.cs
@@ -0,0 +1,19 @@
+//
+// System.Runtime.InteropServices.OutAttribute.cs
+//
+// Author:
+// Miguel de Icaza (miguel@ximian.com)
+//
+// (C) Ximian, Inc. http://www.ximian.com
+//
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Parameter)]
+ public sealed class OutAttribute : Attribute {
+
+ public OutAttribute ()
+ {
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/PreserveSigAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/PreserveSigAttribute.cs
new file mode 100755
index 00000000000..691cef7c7df
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/PreserveSigAttribute.cs
@@ -0,0 +1,19 @@
+// System.Runtime.InteropServices.PreserveSigAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Method)]
+ public sealed class PreserveSigAttribute : Attribute
+ {
+ public PreserveSigAttribute ()
+ {
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/PrimaryInteropAssemblyAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/PrimaryInteropAssemblyAttribute.cs
new file mode 100755
index 00000000000..b39858e6cde
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/PrimaryInteropAssemblyAttribute.cs
@@ -0,0 +1,32 @@
+//
+// System.Runtime.InteropServices.PrimaryInteropAssemblyAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Assembly)]
+ public sealed class PrimaryInteropAssemblyAttribute : Attribute
+ {
+ int major, minor;
+
+ public PrimaryInteropAssemblyAttribute (int major, int minor)
+ {
+ this.major = major;
+ this.minor = minor;
+ }
+
+ public int MajorVersion {
+ get { return major; }
+ }
+
+ public int MinorVersion {
+ get { return minor; }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ProgIdAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/ProgIdAttribute.cs
new file mode 100755
index 00000000000..7db764fef0c
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/ProgIdAttribute.cs
@@ -0,0 +1,28 @@
+//
+// System.Runtime.InteropServices.ProgIdAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Class)]
+ public sealed class ProgIdAttribute : Attribute
+ {
+ string pid;
+
+ public ProgIdAttribute (string progId)
+ {
+ pid = progId;
+ }
+
+ public string Value {
+ get { return pid; }
+ }
+ }
+
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/StructLayoutAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/StructLayoutAttribute.cs
new file mode 100755
index 00000000000..420e70efa0c
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/StructLayoutAttribute.cs
@@ -0,0 +1,23 @@
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Class | AttributeTargets.Struct)]
+ public sealed class StructLayoutAttribute : Attribute {
+ public CharSet CharSet = CharSet.Auto;
+ public int Pack = 8;
+ public int Size = 0;
+ private LayoutKind lkind;
+
+ public StructLayoutAttribute( short layoutKind) {
+ lkind = (LayoutKind)layoutKind;
+ }
+ public StructLayoutAttribute( LayoutKind layoutKind) {
+ lkind = layoutKind;
+ }
+ public LayoutKind Value {
+ get {return lkind;}
+ }
+
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TYPEKIND.cs b/mcs/class/corlib/System.Runtime.InteropServices/TYPEKIND.cs
new file mode 100755
index 00000000000..58c91af6788
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/TYPEKIND.cs
@@ -0,0 +1,27 @@
+
+// System.Runtime.InteropServices/TYPEKIND.cs
+//
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2002 Ximian, Inc.
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+
+ [Serializable]
+ [ComVisible(false)]
+ public enum TYPEKIND {
+ TKIND_ENUM = 0,
+ TKIND_RECORD = 1,
+ TKIND_MODULE = 2,
+ TKIND_INTERFACE = 3,
+ TKIND_DISPATCH = 4,
+ TKIND_COCLASS = 5,
+ TKIND_ALIAS = 6,
+ TKIND_UNION = 7,
+ TKIND_MAX = 8
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TypeLibExporterFlags.cs b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibExporterFlags.cs
new file mode 100755
index 00000000000..7f7c7695412
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibExporterFlags.cs
@@ -0,0 +1,16 @@
+//
+// System.Runtime.InteropServices.TypeLibExporterFlags.cs
+//
+// Author:
+// Kevin Winchester (kwin@ns.sympatico.ca)
+//
+// (C) 2002 Kevin Winchester
+//
+
+namespace System.Runtime.InteropServices
+{
+ [Flags] [Serializable]
+ public enum TypeLibExporterFlags {
+ OnlyReferenceRegistered = 1,
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncAttribute.cs
new file mode 100755
index 00000000000..c58eaccbec2
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncAttribute.cs
@@ -0,0 +1,32 @@
+//
+// System.Runtime.InteropServices.TypeLibFuncAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Method)]
+ public sealed class TypeLibFuncAttribute : Attribute
+ {
+ TypeLibFuncFlags flags;
+
+ public TypeLibFuncAttribute (short flags)
+ {
+ this.flags = (TypeLibFuncFlags) flags;
+ }
+
+ public TypeLibFuncAttribute (TypeLibFuncFlags flags)
+ {
+ this.flags = flags;
+ }
+
+ public TypeLibFuncFlags Value {
+ get { return flags; }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncFlags.cs b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncFlags.cs
new file mode 100755
index 00000000000..b0768bca301
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibFuncFlags.cs
@@ -0,0 +1,25 @@
+// System.Runtime.InteropServices.TypeLibFuncFlags.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Runtime.InteropServices {
+ [Flags] [Serializable]
+ public enum TypeLibFuncFlags {
+ FRestricted = 1,
+ FSource = 2,
+ FBindable = 4,
+ FRequestEdit = 8,
+ FDisplayBind = 16,
+ FDefaultBind = 32,
+ FHidden = 64,
+ FUsesGetLastError = 128,
+ FDefaultCollelem = 256,
+ FUiDefault = 512,
+ FNonBrowsable = 1024,
+ FReplaceable = 2048,
+ FImmediateBind = 4096,
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeAttribute.cs
new file mode 100755
index 00000000000..d76bfcd814b
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeAttribute.cs
@@ -0,0 +1,32 @@
+//
+// System.Runtime.InteropServices.TypeLibTypeAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Method)]
+ public sealed class TypeLibTypeAttribute : Attribute
+ {
+ TypeLibTypeFlags flags;
+
+ public TypeLibTypeAttribute (short flags)
+ {
+ this.flags = (TypeLibTypeFlags) flags;
+ }
+
+ public TypeLibTypeAttribute (TypeLibTypeFlags flags)
+ {
+ this.flags = flags;
+ }
+
+ public TypeLibTypeFlags Value {
+ get { return flags; }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeFlags.cs b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeFlags.cs
new file mode 100755
index 00000000000..adf5297698a
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibTypeFlags.cs
@@ -0,0 +1,26 @@
+// System.Runtime.InteropServices.TypeLibTypeFlags.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Runtime.InteropServices {
+ [Flags] [Serializable]
+ public enum TypeLibTypeFlags {
+ FAppObject = 1,
+ FCanCreate = 2,
+ FLicensed = 4,
+ FPreDeclId = 8,
+ FHidden= 16,
+ FControl = 32,
+ FDual = 64,
+ FNonExtensible = 128,
+ FOleAutomation = 256,
+ FRestricted = 512,
+ FAggregatable = 1024,
+ FReplaceable = 2048,
+ FDispatchable = 4096,
+ FReverseBind = 8192,
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TypeLibVarAttribute.cs b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibVarAttribute.cs
new file mode 100755
index 00000000000..1e5f2a4792c
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibVarAttribute.cs
@@ -0,0 +1,32 @@
+//
+// System.Runtime.InteropServices.TypeLibTypeAttribute.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+using System;
+
+namespace System.Runtime.InteropServices {
+
+ [AttributeUsage (AttributeTargets.Method)]
+ public sealed class TypeLibVarAttribute : Attribute
+ {
+ TypeLibVarFlags flags;
+
+ public TypeLibVarAttribute (short flags)
+ {
+ this.flags = (TypeLibVarFlags) flags;
+ }
+
+ public TypeLibVarAttribute (TypeLibVarFlags flags)
+ {
+ this.flags = flags;
+ }
+
+ public TypeLibVarFlags Value {
+ get { return flags; }
+ }
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/TypeLibVarFlags.cs b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibVarFlags.cs
new file mode 100755
index 00000000000..5bf60e5a03a
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/TypeLibVarFlags.cs
@@ -0,0 +1,26 @@
+// System.Runtime.InteropServices.TypeLibVarFlags.cs
+//
+// Name: Duncan Mak (duncan@ximian.com)
+//
+// (C) Ximian, Inc.
+//
+
+namespace System.Runtime.InteropServices {
+
+ [Flags] [Serializable]
+ public enum TypeLibVarFlags {
+ FReadOnly = 1,
+ FSource = 2,
+ FBindable = 4,
+ FRequestEdit = 8,
+ FDisplayBind = 16,
+ FDefaultBind = 32,
+ FHidden = 64,
+ FRestricted = 128,
+ FDefaultCollelem = 256,
+ FUiDefault = 512,
+ FNonBrowsable = 1024,
+ FReplaceable = 2048,
+ FImmediateBind = 4096,
+ }
+}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/UCOMTypeComp.cs b/mcs/class/corlib/System.Runtime.InteropServices/UCOMTypeComp.cs
new file mode 100755
index 00000000000..8bb02c82f49
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/UCOMTypeComp.cs
@@ -0,0 +1,20 @@
+
+// System.Runtime.InteropServices/UCOMITypeComp.cs
+//
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2002 Ximian, Inc.
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+
+ //[Guid("")]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ public interface UCOMITypeComp {
+ void Bind( string szName, int lHashVal, short wFlags, out UCOMITypeInfo ppTInfo, out DESCKIND pDescKind, out BINDPTR pBindPtr);
+ void BindType( string szName, int lHashVal, out UCOMITypeInfo ppTInfo, out UCOMITypeComp ppTComp);
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/UCOMTypeInfo.cs b/mcs/class/corlib/System.Runtime.InteropServices/UCOMTypeInfo.cs
new file mode 100755
index 00000000000..1e36703c46d
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/UCOMTypeInfo.cs
@@ -0,0 +1,37 @@
+
+// System.Runtime.InteropServices/UCOMITypeInfo.cs
+//
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2002 Ximian, Inc.
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+
+ //[Guid("")]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ public interface UCOMITypeInfo {
+ void AddressOfMember (int memid, INVOKEKIND invKind, out IntPtr ppv);
+ void CreateInstance (object pUnkOuter, ref Guid riid, out object ppvObj);
+ void GetContainingTypeLib (out UCOMITypeLib ppTLB, out int pIndex);
+ void GetDllEntry (int memid, INVOKEKIND invKind, out string pBstrDllName, out string pBstrName, out short pwOrdinal);
+ void GetDocumentation (int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile);
+ void GetFuncDesc (int index, out IntPtr ppFuncDesc);
+ void GetIDsOfNames (string[] rgszNames, int cNames, int[] pMemId);
+ void GetImplTypeFlags (int index, out int pImplTypeFlags);
+ void GetMops (int memid, out string pBstrMops);
+ void GetNames (int memid, string[] rgBstrNames, int cMaxNames, out int pcNames);
+ void GetRefTypeInfo (int hRef, out UCOMITypeInfo ppTI);
+ void GetRefTypeOfImplType (int index, out int href);
+ void GetTypeAttr (out IntPtr ppTypeAttr);
+ void GetTypeComp (out UCOMITypeComp ppTComp);
+ void GetVarDesc (int index, out IntPtr ppVarDesc);
+ void Invoke (object pvInstance, int memid, short wFlags, ref DISPPARAMS pDispParams, out object pVarResult, out EXCEPINFO pExcepInfo, out int puArgErr);
+ void ReleaseFuncDesc (IntPtr pFuncDesc);
+ void ReleaseTypeAttr (IntPtr pTypeAttr);
+ void ReleaseVarDesc (IntPtr pVarDesc);
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/UCOMTypeLib.cs b/mcs/class/corlib/System.Runtime.InteropServices/UCOMTypeLib.cs
new file mode 100755
index 00000000000..73a2d29570f
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/UCOMTypeLib.cs
@@ -0,0 +1,27 @@
+
+// System.Runtime.InteropServices/UCOMITypeLib.cs
+//
+// Paolo Molaro (lupus@ximian.com)
+//
+// (C) 2002 Ximian, Inc.
+
+using System;
+
+namespace System.Runtime.InteropServices
+{
+
+ //[Guid("")]
+ [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
+ public interface UCOMITypeLib {
+ void FindName( string szNameBuf, int lHashVal, UCOMITypeInfo[] ppTInfo, int[] rgMemId, ref short pcFound);
+ void GetDocumentation( int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile);
+ void GetLibAttr( out IntPtr ppTLibAttr);
+ void GetTypeComp( out UCOMITypeComp ppTComp);
+ void GetTypeInfo( int index, out UCOMITypeInfo ppTI);
+ void GetTypeInfoOfGuid( ref Guid guid, out UCOMITypeInfo ppTInfo);
+ void GetTypeInfoType( int index, out TYPEKIND pTKind);
+ bool IsName( string szNameBuf, int lHashVal);
+ void ReleaseTLibAttr( IntPtr pTLibAttr);
+ }
+}
+
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/UnmanagedType.cs b/mcs/class/corlib/System.Runtime.InteropServices/UnmanagedType.cs
new file mode 100755
index 00000000000..b6f0fe5a7c8
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/UnmanagedType.cs
@@ -0,0 +1,170 @@
+// UnmanagedType.cs
+//
+// This code was automatically generated from
+// ECMA CLI XML Library Specification.
+// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
+// Source file: all.xml
+// URL: http://devresource.hp.com/devresource/Docs/TechPapers/CSharp/all.xml
+//
+// (C) 2001 Ximian, Inc. http://www.ximian.com
+
+
+namespace System.Runtime.InteropServices {
+
+
+ /// <summary>
+ /// </summary>
+ public enum UnmanagedType {
+
+ /// <summary>
+ /// </summary>
+ Bool = 2,
+
+ /// <summary>
+ /// </summary>
+ I1 = 3,
+
+ /// <summary>
+ /// </summary>
+ U1 = 4,
+
+ /// <summary>
+ /// </summary>
+ I2 = 5,
+
+ /// <summary>
+ /// </summary>
+ U2 = 6,
+
+ /// <summary>
+ /// </summary>
+ I4 = 7,
+
+ /// <summary>
+ /// </summary>
+ U4 = 8,
+
+ /// <summary>
+ /// </summary>
+ I8 = 9,
+
+ /// <summary>
+ /// </summary>
+ U8 = 10,
+
+ /// <summary>
+ /// </summary>
+ R4 = 11,
+
+ /// <summary>
+ /// </summary>
+ R8 = 12,
+
+ Currency = 15,
+
+ /// <summary>
+ /// </summary>
+ BStr = 19,
+
+ /// <summary>
+ /// </summary>
+ LPStr = 20,
+
+ /// <summary>
+ /// </summary>
+ LPWStr = 21,
+
+ /// <summary>
+ /// </summary>
+ LPTStr = 22,
+
+ /// <summary>
+ /// </summary>
+ ByValTStr = 23,
+
+ /// <summary>
+ /// </summary>
+ IUnknown = 25,
+
+ /// <summary>
+ /// </summary>
+ IDispatch = 26,
+
+ /// <summary>
+ /// </summary>
+ Struct = 27,
+
+ /// <summary>
+ /// </summary>
+ Interface = 28,
+
+ /// <summary>
+ /// </summary>
+ SafeArray = 29,
+
+ /// <summary>
+ /// </summary>
+ ByValArray = 30,
+
+ /// <summary>
+ /// </summary>
+ SysInt = 31,
+
+ /// <summary>
+ /// </summary>
+ SysUInt = 32,
+
+ /// <summary>
+ /// </summary>
+ VBByRefStr = 34,
+
+ /// <summary>
+ /// </summary>
+ AnsiBStr = 35,
+
+ /// <summary>
+ /// </summary>
+ TBStr = 36,
+
+ /// <summary>
+ /// </summary>
+ VariantBool = 37,
+
+ /// <summary>
+ /// </summary>
+ FunctionPtr = 38,
+
+ /// <summary>
+ /// </summary>
+ // LPVoid = 39,
+
+ /// <summary>
+ /// </summary>
+ AsAny = 40,
+
+ /// <summary>
+ /// </summary>
+ //RPrecise = 41,
+
+ /// <summary>
+ /// </summary>
+ LPArray = 42,
+
+ /// <summary>
+ /// </summary>
+ LPStruct = 43,
+
+ /// <summary>
+ /// </summary>
+ CustomMarshaler = 44,
+
+ /// <summary>
+ /// </summary>
+ Error = 45,
+
+ /// <summary>
+ /// </summary>
+ //NativeTypeMax = 80,
+ } // UnmanagedType
+
+} // System.Runtime.InteropServices
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/VarEnum.cs b/mcs/class/corlib/System.Runtime.InteropServices/VarEnum.cs
new file mode 100755
index 00000000000..4a8dc4168c1
--- /dev/null
+++ b/mcs/class/corlib/System.Runtime.InteropServices/VarEnum.cs
@@ -0,0 +1,50 @@
+using System;
+
+namespace System.Runtime.InteropServices {
+ public enum VarEnum {
+ VT_EMPTY = 0,
+ VT_NULL = 1,
+ VT_I2 = 2,
+ VT_I4 = 3,
+ VT_R4 = 4,
+ VT_R8 = 5,
+ VT_CY = 6,
+ VT_DATE = 7,
+ VT_BSTR = 8,
+ VT_DISPATCH = 9,
+ VT_ERROR = 10,
+ VT_BOOL = 11,
+ VT_VARIANT = 12,
+ VT_UNKNOWN = 13,
+ VT_DECIMAL = 14,
+ VT_I1 = 16,
+ VT_UI1 = 17,
+ VT_UI2 = 18,
+ VT_UI4 = 19,
+ VT_I8 = 20,
+ VT_UI8 = 21,
+ VT_INT = 22,
+ VT_UINT = 23,
+ VT_VOID = 24,
+ VT_HRESULT = 25,
+ VT_PTR = 26,
+ VT_SAFEARRAY = 27,
+ VT_CARRAY = 28,
+ VT_USERDEFINED = 29,
+ VT_LPSTR = 30,
+ VT_LPWSTR = 31,
+ VT_RECORD = 36,
+ VT_FILETIME = 64,
+ VT_BLOB = 65,
+ VT_STREAM = 66,
+ VT_STORAGE = 67,
+ VT_STREAMED_OBJECT = 68,
+ VT_STORED_OBJECT = 69,
+ VT_BLOB_OBJECT = 70,
+ VT_CF = 71,
+ VT_CLSID = 72,
+ VT_VECTOR = 4096,
+ VT_ARRAY = 8192,
+ VT_BYREF = 16384
+ }
+}