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 */
throw new NotImplementedException ();
}
- [MonoTODO]
- public static void DestroyStructure (IntPtr ptr, Type structuretype) {
- 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 IntPtr OffsetOf (Type t, string fieldName) {
- throw new NotImplementedException ();
- }
-
- [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 IntPtr OffsetOf (Type t, string fieldName);
- [MonoTODO]
- public static string PtrToStringAnsi (IntPtr ptr) {
- throw new NotImplementedException ();
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void Prelink (MethodInfo m);
- [MonoTODO]
- public static string PtrToStringAnsi (IntPtr ptr, int len) {
- throw new NotImplementedException ();
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static void PrelinkAll (Type c);
- [MonoTODO]
- public static string PtrToStringAuto (IntPtr ptr, int len) {
- 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 static extern string PtrToStringAuto (IntPtr ptr);
+ public extern static string PtrToStringAuto (IntPtr ptr);
- [MonoTODO]
- public static string PtrToStringBSTR (IntPtr ptr) {
- throw new NotImplementedException ();
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static string PtrToStringAuto (IntPtr ptr, int len);
- [MonoTODO]
- public static string PtrToStringUni (IntPtr ptr) {
- throw new NotImplementedException ();
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static string PtrToStringUni (IntPtr ptr);
- [MonoTODO]
- public static string PtrToStringUni (IntPtr ptr, int len) {
- throw new NotImplementedException ();
- }
+ [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);
- [MonoTODO]
- public static object PtrToStructure (IntPtr ptr, Type structureType) {
- throw new NotImplementedException ();
- }
+ [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) {
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 ();
}
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 ();
}
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 ();
}
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 ();
}
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 ();
}
throw new NotImplementedException ();
}
- [MonoTODO]
- public static IntPtr StringToHGlobalAnsi (string s) {
- throw new NotImplementedException ();
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static IntPtr StringToHGlobalAnsi (string s);
- [MonoTODO]
- public static IntPtr StringToHGlobalAuto (string s) {
- throw new NotImplementedException ();
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static IntPtr StringToHGlobalAuto (string s);
- [MonoTODO]
- public static IntPtr StringToHGlobalUni (string s) {
- throw new NotImplementedException ();
- }
+ [MethodImplAttribute(MethodImplOptions.InternalCall)]
+ public extern static IntPtr StringToHGlobalUni (string s);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
public extern static void StructureToPtr (object structure, IntPtr ptr, bool fDeleteOld);
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 ();
}
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 ();
}
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 ();
}
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 ();
}
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 ();
}