* CurrencyWrapper.cs: Fix file name.
[mono.git] / mcs / class / corlib / System.Runtime.InteropServices / Marshal.cs
index 57f6713530882723bc03a6634b572c083a8021aa..a3be56b43fe644f8c64e4beb45640f19fbd2e026 100644 (file)
@@ -8,11 +8,13 @@
 
 using System.Runtime.CompilerServices;
 using System;
+using System.Security;
 using System.Reflection;
 using System.Threading;
 
 namespace System.Runtime.InteropServices
 {
+       [SuppressUnmanagedCodeSecurity ()]
        public sealed class Marshal
        {
                /* fields */
@@ -308,15 +310,11 @@ namespace System.Runtime.InteropServices
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern static IntPtr OffsetOf (Type t, string fieldName);
 
-               [MonoTODO]
-               public static void Prelink (MethodInfo m) {
-                       throw new NotImplementedException ();
-               }
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               public extern static void Prelink (MethodInfo m);
 
-               [MonoTODO]
-               public static void PrelinkAll (Type c) {
-                       throw new NotImplementedException ();
-               }
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               public extern static void PrelinkAll (Type c);
 
                [MethodImplAttribute(MethodImplOptions.InternalCall)]
                public extern static string PtrToStringAnsi (IntPtr ptr);
@@ -358,7 +356,7 @@ namespace System.Runtime.InteropServices
                public extern static byte ReadByte (IntPtr ptr, int ofs);
 
                [MonoTODO]
-               public static byte ReadByte (object ptr, int ofs) {
+               public static byte ReadByte ([In] object ptr, int ofs) {
                        throw new NotImplementedException ();
                }
 
@@ -370,7 +368,7 @@ namespace System.Runtime.InteropServices
                public extern static short ReadInt16 (IntPtr ptr, int ofs);
 
                [MonoTODO]
-               public static short ReadInt16 (object ptr, int ofs) {
+               public static short ReadInt16 ([In] object ptr, int ofs) {
                        throw new NotImplementedException ();
                }
 
@@ -382,7 +380,7 @@ namespace System.Runtime.InteropServices
                public extern static int ReadInt32 (IntPtr ptr, int ofs);
 
                [MonoTODO]
-               public static int ReadInt32 (object ptr, int ofs) {
+               public static int ReadInt32 ([In] object ptr, int ofs) {
                        throw new NotImplementedException ();
                }
 
@@ -394,7 +392,7 @@ namespace System.Runtime.InteropServices
                public extern static long ReadInt64 (IntPtr ptr, int ofs);
 
                [MonoTODO]
-               public static long ReadInt64(object ptr, int ofs) {
+               public static long ReadInt64([In] object ptr, int ofs) {
                        throw new NotImplementedException ();
                }
 
@@ -406,7 +404,7 @@ namespace System.Runtime.InteropServices
                public extern static IntPtr ReadIntPtr (IntPtr ptr, int ofs);
 
                [MonoTODO]
-               public static IntPtr ReadIntPtr(object ptr, int ofs) {
+               public static IntPtr ReadIntPtr([In] object ptr, int ofs) {
                        throw new NotImplementedException ();
                }
 
@@ -500,7 +498,7 @@ namespace System.Runtime.InteropServices
                public extern static void WriteByte (IntPtr ptr, int ofs, byte val);
 
                [MonoTODO]
-               public static void WriteByte(object ptr, int ofs, byte val) {
+               public static void WriteByte([In,Out] object ptr, int ofs, byte val) {
                        throw new NotImplementedException ();
                }
 
@@ -512,7 +510,7 @@ namespace System.Runtime.InteropServices
                public extern static void WriteInt16 (IntPtr ptr, int ofs, short val);
 
                [MonoTODO]
-               public static void WriteInt16(object ptr, int ofs, short val) {
+               public static void WriteInt16([In,Out] object ptr, int ofs, short val) {
                        throw new NotImplementedException ();
                }
 
@@ -524,7 +522,7 @@ namespace System.Runtime.InteropServices
                public extern static void WriteInt32 (IntPtr ptr, int ofs, int val);
 
                [MonoTODO]
-               public static void WriteInt32(object ptr, int ofs, int val) {
+               public static void WriteInt32([In,Out] object ptr, int ofs, int val) {
                        throw new NotImplementedException ();
                }
 
@@ -536,7 +534,7 @@ namespace System.Runtime.InteropServices
                public extern static void WriteInt64 (IntPtr ptr, int ofs, long val);
 
                [MonoTODO]
-               public static void WriteInt64(object ptr, int ofs, long val) {
+               public static void WriteInt64([In] object ptr, int ofs, long val) {
                        throw new NotImplementedException ();
                }
 
@@ -548,7 +546,7 @@ namespace System.Runtime.InteropServices
                public extern static void WriteIntPtr (IntPtr ptr, int ofs, IntPtr val);
 
                [MonoTODO]
-               public static void WriteIntPtr(object ptr, int ofs, IntPtr val) {
+               public static void WriteIntPtr([In] object ptr, int ofs, IntPtr val) {
                        throw new NotImplementedException ();
                }