-- Autogenerated by MSIL2Ada v. 2
-- By: Martin C. Carlisle
--     Department of Computer Science
--     US Air Force Academy
--     carlislem@acm.org
pragma Extensions_Allowed(On);
with MSSyst.Object;
with MSIL_Types;
use MSIL_Types;
with type MSSyst.Object.Ref is access;
with type MSSyst.String.Ref is access;
with type MSSyst.Type_k.Ref is access;
with type MSSyst.Guid.Valuetype is tagged;
with type MSSyst.Reflection.MemberInfo.Ref is access;
with type MSSyst.Reflection.Module.Ref is access;
with type MSSyst.Exception_k.Ref is access;
with MSSyst.Runtime.InteropServices.ComMemberType;
with type MSSyst.Object.Ref_array is access;
with type MSSyst.Threading.Thread.Ref is access;
with type MSSyst.Runtime.InteropServices.UCOMITypeInfo.Ref is access;
with type MSSyst.Runtime.InteropServices.UCOMITypeLib.Ref is access;
with type MSSyst.Reflection.Assembly.Ref is access;
with type MSSyst.Reflection.MethodInfo.Ref is access;
with MSSyst.Guid;
with type MSSyst.Array_k.Ref is access;
with MSSyst.Object;
package MSSyst.Runtime.InteropServices.Marshal is
   type Typ;
   type Ref is access all Typ'Class;
   type Ref_addrof is access all Ref;
   type Ref_Arr is array(Natural range <>) of Ref;
   type Ref_Array is access all Ref_Arr;
   type Ref_Array_addrof is access all Ref_Array;
   type Typ is new MSSyst.Object.Typ with record
      null;
   end record;
   SystemDefaultCharSize : Integer;
   pragma Import(MSIL,SystemDefaultCharSize,"SystemDefaultCharSize");
   SystemMaxDBCSCharSize : Integer;
   pragma Import(MSIL,SystemMaxDBCSCharSize,"SystemMaxDBCSCharSize");
   function AddRef(
      pUnk : MSIL_Types.native_int) return Integer;
   function AllocCoTaskMem(
      cb : Integer) return MSIL_Types.native_int;
   function AllocHGlobal(
      cb : Integer) return MSIL_Types.native_int;
   function AllocHGlobal(
      cb : MSIL_Types.native_int) return MSIL_Types.native_int;
   function BindToMoniker(
      monikerName : MSSyst.String.Ref) return MSSyst.Object.Ref;
   procedure ChangeWrapperHandleStrength(
      otp : MSSyst.Object.Ref;
      fIsWeak : Standard.Boolean);
   procedure Copy(
      source : MSIL_Types.Int64_Arr;
      startIndex : Integer;
      destination : MSIL_Types.native_int;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.Float64_Arr;
      startIndex : Integer;
      destination : MSIL_Types.native_int;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.Float32_Arr;
      startIndex : Integer;
      destination : MSIL_Types.native_int;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.Int32_Arr;
      startIndex : Integer;
      destination : MSIL_Types.native_int;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.Char_Arr;
      startIndex : Integer;
      destination : MSIL_Types.native_int;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.Int16_Arr;
      startIndex : Integer;
      destination : MSIL_Types.native_int;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.unsigned_int8_Arr;
      startIndex : Integer;
      destination : MSIL_Types.native_int;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.native_int;
      destination : MSIL_Types.Float32_Arr;
      startIndex : Integer;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.native_int;
      destination : MSIL_Types.Float64_Arr;
      startIndex : Integer;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.native_int;
      destination : MSIL_Types.unsigned_int8_Arr;
      startIndex : Integer;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.native_int;
      destination : MSIL_Types.Int64_Arr;
      startIndex : Integer;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.native_int;
      destination : MSIL_Types.Int32_Arr;
      startIndex : Integer;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.native_int;
      destination : MSIL_Types.Char_Arr;
      startIndex : Integer;
      length : Integer);
   procedure Copy(
      source : MSIL_Types.native_int;
      destination : MSIL_Types.Int16_Arr;
      startIndex : Integer;
      length : Integer);
   function CreateWrapperOfType(
      o : MSSyst.Object.Ref;
      t : MSSyst.Type_k.Ref) return MSSyst.Object.Ref;
   procedure DestroyStructure(
      ptr : MSIL_Types.native_int;
      structuretype : MSSyst.Type_k.Ref);
   procedure FreeBSTR(
      ptr : MSIL_Types.native_int);
   procedure FreeCoTaskMem(
      ptr : MSIL_Types.native_int);
   procedure FreeHGlobal(
      hglobal : MSIL_Types.native_int);
   function GenerateGuidForType(
      type_k : MSSyst.Type_k.Ref) return MSSyst.Guid.Valuetype;
   function GenerateProgIdForType(
      type_k : MSSyst.Type_k.Ref) return MSSyst.String.Ref;
   function GetActiveObject(
      progID : MSSyst.String.Ref) return MSSyst.Object.Ref;
   function GetComInterfaceForObject(
      o : MSSyst.Object.Ref;
      T : MSSyst.Type_k.Ref) return MSIL_Types.native_int;
   function GetComObjectData(
      obj : MSSyst.Object.Ref;
      key : MSSyst.Object.Ref) return MSSyst.Object.Ref;
   function GetComSlotForMethodInfo(
      m : MSSyst.Reflection.MemberInfo.Ref) return Integer;
   function GetEndComSlot(
      t : MSSyst.Type_k.Ref) return Integer;
   function GetExceptionCode return Integer;
   function GetExceptionPointers return MSIL_Types.native_int;
   function GetHINSTANCE(
      m : MSSyst.Reflection.Module.Ref) return MSIL_Types.native_int;
   function GetHRForException(
      e : MSSyst.Exception_k.Ref) return Integer;
   function GetHRForLastWin32Error return Integer;
   function GetIDispatchForObject(
      o : MSSyst.Object.Ref) return MSIL_Types.native_int;
   function GetITypeInfoForType(
      t : MSSyst.Type_k.Ref) return MSIL_Types.native_int;
   function GetIUnknownForObject(
      o : MSSyst.Object.Ref) return MSIL_Types.native_int;
   function GetLastWin32Error return Integer;
   function GetManagedThunkForUnmanagedMethodPtr(
      pfnMethodToWrap : MSIL_Types.native_int;
      pbSignature : MSIL_Types.native_int;
      cbSignature : Integer) return MSIL_Types.native_int;
   function GetMethodInfoForComSlot(
      t : MSSyst.Type_k.Ref;
      slot : Integer;
      memberType : MSSyst.Runtime.InteropServices.ComMemberType.Valuetype_addrof) return MSSyst.Reflection.MemberInfo.Ref;
   procedure GetNativeVariantForObject(
      obj : MSSyst.Object.Ref;
      pDstNativeVariant : MSIL_Types.native_int);
   function GetObjectForIUnknown(
      pUnk : MSIL_Types.native_int) return MSSyst.Object.Ref;
   function GetObjectForNativeVariant(
      pSrcNativeVariant : MSIL_Types.native_int) return MSSyst.Object.Ref;
   function GetObjectsForNativeVariants(
      aSrcNativeVariant : MSIL_Types.native_int;
      cVars : Integer) return MSSyst.Object.Ref_array;
   function GetStartComSlot(
      t : MSSyst.Type_k.Ref) return Integer;
   function GetThreadFromFiberCookie(
      cookie : Integer) return MSSyst.Threading.Thread.Ref;
   function GetTypedObjectForIUnknown(
      pUnk : MSIL_Types.native_int;
      t : MSSyst.Type_k.Ref) return MSSyst.Object.Ref;
   function GetTypeForITypeInfo(
      piTypeInfo : MSIL_Types.native_int) return MSSyst.Type_k.Ref;
   function GetTypeInfoName(
      pTI : MSSyst.Runtime.InteropServices.UCOMITypeInfo.Ref) return MSSyst.String.Ref;
   function GetTypeLibGuid(
      pTLB : MSSyst.Runtime.InteropServices.UCOMITypeLib.Ref) return MSSyst.Guid.Valuetype;
   function GetTypeLibGuidForAssembly(
      asm : MSSyst.Reflection.Assembly.Ref) return MSSyst.Guid.Valuetype;
   function GetTypeLibLcid(
      pTLB : MSSyst.Runtime.InteropServices.UCOMITypeLib.Ref) return Integer;
   function GetTypeLibName(
      pTLB : MSSyst.Runtime.InteropServices.UCOMITypeLib.Ref) return MSSyst.String.Ref;
   function GetUnmanagedThunkForManagedMethodPtr(
      pfnMethodToWrap : MSIL_Types.native_int;
      pbSignature : MSIL_Types.native_int;
      cbSignature : Integer) return MSIL_Types.native_int;
   function IsComObject(
      o : MSSyst.Object.Ref) return Standard.Boolean;
   function IsTypeVisibleFromCom(
      t : MSSyst.Type_k.Ref) return Standard.Boolean;
   function NumParamBytes(
      m : MSSyst.Reflection.MethodInfo.Ref) return Integer;
   function OffsetOf(
      t : MSSyst.Type_k.Ref;
      fieldName : MSSyst.String.Ref) return MSIL_Types.native_int;
   procedure Prelink(
      m : MSSyst.Reflection.MethodInfo.Ref);
   procedure PrelinkAll(
      c : MSSyst.Type_k.Ref);
   function PtrToStringAnsi(
      ptr : MSIL_Types.native_int;
      len : Integer) return MSSyst.String.Ref;
   function PtrToStringAnsi(
      ptr : MSIL_Types.native_int) return MSSyst.String.Ref;
   function PtrToStringAuto(
      ptr : MSIL_Types.native_int) return MSSyst.String.Ref;
   function PtrToStringAuto(
      ptr : MSIL_Types.native_int;
      len : Integer) return MSSyst.String.Ref;
   function PtrToStringBSTR(
      ptr : MSIL_Types.native_int) return MSSyst.String.Ref;
   function PtrToStringUni(
      ptr : MSIL_Types.native_int) return MSSyst.String.Ref;
   function PtrToStringUni(
      ptr : MSIL_Types.native_int;
      len : Integer) return MSSyst.String.Ref;
   procedure PtrToStructure(
      ptr : MSIL_Types.native_int;
      structure : MSSyst.Object.Ref);
   function PtrToStructure(
      ptr : MSIL_Types.native_int;
      structureType : MSSyst.Type_k.Ref) return MSSyst.Object.Ref;
   function QueryInterface(
      pUnk : MSIL_Types.native_int;
      iid : MSSyst.Guid.Valuetype_addrof;
      ppv : MSSyst.IntPtr.Valuetype_addrof) return Integer;
   function ReadByte(
      ptr : MSIL_Types.native_int) return MSIL_Types.unsigned_int8;
   function ReadByte(
      ptr : MSSyst.Object.Ref;
      ofs : Integer) return MSIL_Types.unsigned_int8;
   function ReadByte(
      ptr : MSIL_Types.native_int;
      ofs : Integer) return MSIL_Types.unsigned_int8;
   function ReadInt16(
      ptr : MSIL_Types.native_int) return MSIL_Types.int16;
   function ReadInt16(
      ptr : MSSyst.Object.Ref;
      ofs : Integer) return MSIL_Types.int16;
   function ReadInt16(
      ptr : MSIL_Types.native_int;
      ofs : Integer) return MSIL_Types.int16;
   function ReadInt32(
      ptr : MSIL_Types.native_int) return Integer;
   function ReadInt32(
      ptr : MSSyst.Object.Ref;
      ofs : Integer) return Integer;
   function ReadInt32(
      ptr : MSIL_Types.native_int;
      ofs : Integer) return Integer;
   function ReadInt64(
      ptr : MSIL_Types.native_int) return Long_Long_Integer;
   function ReadInt64(
      ptr : MSIL_Types.native_int;
      ofs : Integer) return Long_Long_Integer;
   function ReadInt64(
      ptr : MSSyst.Object.Ref;
      ofs : Integer) return Long_Long_Integer;
   function ReadIntPtr(
      ptr : MSIL_Types.native_int) return MSIL_Types.native_int;
   function ReadIntPtr(
      ptr : MSIL_Types.native_int;
      ofs : Integer) return MSIL_Types.native_int;
   function ReadIntPtr(
      ptr : MSSyst.Object.Ref;
      ofs : Integer) return MSIL_Types.native_int;
   function ReAllocCoTaskMem(
      pv : MSIL_Types.native_int;
      cb : Integer) return MSIL_Types.native_int;
   function ReAllocHGlobal(
      pv : MSIL_Types.native_int;
      cb : MSIL_Types.native_int) return MSIL_Types.native_int;
   function Release(
      pUnk : MSIL_Types.native_int) return Integer;
   function ReleaseComObject(
      o : MSSyst.Object.Ref) return Integer;
   procedure ReleaseThreadCache;
   function SetComObjectData(
      obj : MSSyst.Object.Ref;
      key : MSSyst.Object.Ref;
      data : MSSyst.Object.Ref) return Standard.Boolean;
   function SizeOf(
      t : MSSyst.Type_k.Ref) return Integer;
   function SizeOf(
      structure : MSSyst.Object.Ref) return Integer;
   function StringToBSTR(
      s : MSSyst.String.Ref) return MSIL_Types.native_int;
   function StringToCoTaskMemAnsi(
      s : MSSyst.String.Ref) return MSIL_Types.native_int;
   function StringToCoTaskMemAuto(
      s : MSSyst.String.Ref) return MSIL_Types.native_int;
   function StringToCoTaskMemUni(
      s : MSSyst.String.Ref) return MSIL_Types.native_int;
   function StringToHGlobalAnsi(
      s : MSSyst.String.Ref) return MSIL_Types.native_int;
   function StringToHGlobalAuto(
      s : MSSyst.String.Ref) return MSIL_Types.native_int;
   function StringToHGlobalUni(
      s : MSSyst.String.Ref) return MSIL_Types.native_int;
   procedure StructureToPtr(
      structure : MSSyst.Object.Ref;
      ptr : MSIL_Types.native_int;
      fDeleteOld : Standard.Boolean);
   procedure ThrowExceptionForHR(
      errorCode : Integer;
      errorInfo : MSIL_Types.native_int);
   procedure ThrowExceptionForHR(
      errorCode : Integer);
   function UnsafeAddrOfPinnedArrayElement(
      arr : MSSyst.Array_k.Ref;
      index : Integer) return MSIL_Types.native_int;
   procedure WriteByte(
      ptr : MSIL_Types.native_int;
      val : MSIL_Types.unsigned_int8);
   procedure WriteByte(
      ptr : MSSyst.Object.Ref;
      ofs : Integer;
      val : MSIL_Types.unsigned_int8);
   procedure WriteByte(
      ptr : MSIL_Types.native_int;
      ofs : Integer;
      val : MSIL_Types.unsigned_int8);
   procedure WriteInt16(
      ptr : MSIL_Types.native_int;
      ofs : Integer;
      val : Wide_Character);
   procedure WriteInt16(
      ptr : MSSyst.Object.Ref;
      ofs : Integer;
      val : Wide_Character);
   procedure WriteInt16(
      ptr : MSIL_Types.native_int;
      val : Wide_Character);
   procedure WriteInt16(
      ptr : MSIL_Types.native_int;
      ofs : Integer;
      val : MSIL_Types.int16);
   procedure WriteInt16(
      ptr : MSSyst.Object.Ref;
      ofs : Integer;
      val : MSIL_Types.int16);
   procedure WriteInt16(
      ptr : MSIL_Types.native_int;
      val : MSIL_Types.int16);
   procedure WriteInt32(
      ptr : MSIL_Types.native_int;
      ofs : Integer;
      val : Integer);
   procedure WriteInt32(
      ptr : MSSyst.Object.Ref;
      ofs : Integer;
      val : Integer);
   procedure WriteInt32(
      ptr : MSIL_Types.native_int;
      val : Integer);
   procedure WriteInt64(
      ptr : MSIL_Types.native_int;
      ofs : Integer;
      val : Long_Long_Integer);
   procedure WriteInt64(
      ptr : MSSyst.Object.Ref;
      ofs : Integer;
      val : Long_Long_Integer);
   procedure WriteInt64(
      ptr : MSIL_Types.native_int;
      val : Long_Long_Integer);
   procedure WriteIntPtr(
      ptr : MSIL_Types.native_int;
      ofs : Integer;
      val : MSIL_Types.native_int);
   procedure WriteIntPtr(
      ptr : MSSyst.Object.Ref;
      ofs : Integer;
      val : MSIL_Types.native_int);
   procedure WriteIntPtr(
      ptr : MSIL_Types.native_int;
      val : MSIL_Types.native_int);
private
   pragma Convention(MSIL,Typ);
   pragma Import(MSIL,AddRef,"AddRef");
   pragma Import(MSIL,AllocCoTaskMem,"AllocCoTaskMem");
   pragma Import(MSIL,AllocHGlobal,"AllocHGlobal");
   pragma Import(MSIL,BindToMoniker,"BindToMoniker");
   pragma Import(MSIL,ChangeWrapperHandleStrength,"ChangeWrapperHandleStrength");
   pragma Import(MSIL,Copy,"Copy");
   pragma Import(MSIL,CreateWrapperOfType,"CreateWrapperOfType");
   pragma Import(MSIL,DestroyStructure,"DestroyStructure");
   pragma Import(MSIL,FreeBSTR,"FreeBSTR");
   pragma Import(MSIL,FreeCoTaskMem,"FreeCoTaskMem");
   pragma Import(MSIL,FreeHGlobal,"FreeHGlobal");
   pragma Import(MSIL,GenerateGuidForType,"GenerateGuidForType");
   pragma Import(MSIL,GenerateProgIdForType,"GenerateProgIdForType");
   pragma Import(MSIL,GetActiveObject,"GetActiveObject");
   pragma Import(MSIL,GetComInterfaceForObject,"GetComInterfaceForObject");
   pragma Import(MSIL,GetComObjectData,"GetComObjectData");
   pragma Import(MSIL,GetComSlotForMethodInfo,"GetComSlotForMethodInfo");
   pragma Import(MSIL,GetEndComSlot,"GetEndComSlot");
   pragma Import(MSIL,GetExceptionCode,"GetExceptionCode");
   pragma Import(MSIL,GetExceptionPointers,"GetExceptionPointers");
   pragma Import(MSIL,GetHINSTANCE,"GetHINSTANCE");
   pragma Import(MSIL,GetHRForException,"GetHRForException");
   pragma Import(MSIL,GetHRForLastWin32Error,"GetHRForLastWin32Error");
   pragma Import(MSIL,GetIDispatchForObject,"GetIDispatchForObject");
   pragma Import(MSIL,GetITypeInfoForType,"GetITypeInfoForType");
   pragma Import(MSIL,GetIUnknownForObject,"GetIUnknownForObject");
   pragma Import(MSIL,GetLastWin32Error,"GetLastWin32Error");
   pragma Import(MSIL,GetManagedThunkForUnmanagedMethodPtr,"GetManagedThunkForUnmanagedMethodPtr");
   pragma Import(MSIL,GetMethodInfoForComSlot,"GetMethodInfoForComSlot");
   pragma Import(MSIL,GetNativeVariantForObject,"GetNativeVariantForObject");
   pragma Import(MSIL,GetObjectForIUnknown,"GetObjectForIUnknown");
   pragma Import(MSIL,GetObjectForNativeVariant,"GetObjectForNativeVariant");
   pragma Import(MSIL,GetObjectsForNativeVariants,"GetObjectsForNativeVariants");
   pragma Import(MSIL,GetStartComSlot,"GetStartComSlot");
   pragma Import(MSIL,GetThreadFromFiberCookie,"GetThreadFromFiberCookie");
   pragma Import(MSIL,GetTypedObjectForIUnknown,"GetTypedObjectForIUnknown");
   pragma Import(MSIL,GetTypeForITypeInfo,"GetTypeForITypeInfo");
   pragma Import(MSIL,GetTypeInfoName,"GetTypeInfoName");
   pragma Import(MSIL,GetTypeLibGuid,"GetTypeLibGuid");
   pragma Import(MSIL,GetTypeLibGuidForAssembly,"GetTypeLibGuidForAssembly");
   pragma Import(MSIL,GetTypeLibLcid,"GetTypeLibLcid");
   pragma Import(MSIL,GetTypeLibName,"GetTypeLibName");
   pragma Import(MSIL,GetUnmanagedThunkForManagedMethodPtr,"GetUnmanagedThunkForManagedMethodPtr");
   pragma Import(MSIL,IsComObject,"IsComObject");
   pragma Import(MSIL,IsTypeVisibleFromCom,"IsTypeVisibleFromCom");
   pragma Import(MSIL,NumParamBytes,"NumParamBytes");
   pragma Import(MSIL,OffsetOf,"OffsetOf");
   pragma Import(MSIL,Prelink,"Prelink");
   pragma Import(MSIL,PrelinkAll,"PrelinkAll");
   pragma Import(MSIL,PtrToStringAnsi,"PtrToStringAnsi");
   pragma Import(MSIL,PtrToStringAuto,"PtrToStringAuto");
   pragma Import(MSIL,PtrToStringBSTR,"PtrToStringBSTR");
   pragma Import(MSIL,PtrToStringUni,"PtrToStringUni");
   pragma Import(MSIL,PtrToStructure,"PtrToStructure");
   pragma Import(MSIL,QueryInterface,"QueryInterface");
   pragma Import(MSIL,ReadByte,"ReadByte");
   pragma Import(MSIL,ReadInt16,"ReadInt16");
   pragma Import(MSIL,ReadInt32,"ReadInt32");
   pragma Import(MSIL,ReadInt64,"ReadInt64");
   pragma Import(MSIL,ReadIntPtr,"ReadIntPtr");
   pragma Import(MSIL,ReAllocCoTaskMem,"ReAllocCoTaskMem");
   pragma Import(MSIL,ReAllocHGlobal,"ReAllocHGlobal");
   pragma Import(MSIL,Release,"Release");
   pragma Import(MSIL,ReleaseComObject,"ReleaseComObject");
   pragma Import(MSIL,ReleaseThreadCache,"ReleaseThreadCache");
   pragma Import(MSIL,SetComObjectData,"SetComObjectData");
   pragma Import(MSIL,SizeOf,"SizeOf");
   pragma Import(MSIL,StringToBSTR,"StringToBSTR");
   pragma Import(MSIL,StringToCoTaskMemAnsi,"StringToCoTaskMemAnsi");
   pragma Import(MSIL,StringToCoTaskMemAuto,"StringToCoTaskMemAuto");
   pragma Import(MSIL,StringToCoTaskMemUni,"StringToCoTaskMemUni");
   pragma Import(MSIL,StringToHGlobalAnsi,"StringToHGlobalAnsi");
   pragma Import(MSIL,StringToHGlobalAuto,"StringToHGlobalAuto");
   pragma Import(MSIL,StringToHGlobalUni,"StringToHGlobalUni");
   pragma Import(MSIL,StructureToPtr,"StructureToPtr");
   pragma Import(MSIL,ThrowExceptionForHR,"ThrowExceptionForHR");
   pragma Import(MSIL,UnsafeAddrOfPinnedArrayElement,"UnsafeAddrOfPinnedArrayElement");
   pragma Import(MSIL,WriteByte,"WriteByte");
   pragma Import(MSIL,WriteInt16,"WriteInt16");
   pragma Import(MSIL,WriteInt32,"WriteInt32");
   pragma Import(MSIL,WriteInt64,"WriteInt64");
   pragma Import(MSIL,WriteIntPtr,"WriteIntPtr");
end MSSyst.Runtime.InteropServices.Marshal;
pragma Extensions_Allowed(Off);
pragma Import(MSIL,MSSyst.Runtime.InteropServices.Marshal,
   ".ver 1:0:5000:0 .publickeytoken=( b7 7a 5c 56 19 34 e0 89 )",
   "[mscorlib]System.Runtime.InteropServices.Marshal");
