Descriptors for native types used for marshalling
Beispiel #1
0
 internal override void Resolve(PEReader buff)
 {
     field = buff.GetCodedElement(CIx.HasFieldMarshal,parentIx);
     nt = buff.GetBlobNativeType(ntIx);
     if (field is FieldDef) {
         ((FieldDef)field).SetMarshalType(nt);
     } else {
         ((Param)field).SetMarshalType(nt);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Set the marshalling info for a field
 /// </summary>
 /// <param name="mType"></param>
 public void SetMarshalType(NativeType mType)
 {
     flags |= HasFieldMarshal;
     marshalType = mType;
 }
Beispiel #3
0
 /*-------------------- Constructors ---------------------------------*/
 internal FieldMarshal(MetaDataElement field, NativeType nType)
 {
     this.field = field;
     this.nt = nType;
     sortTable = true;
     tabIx = MDTable.FieldMarshal;
 }
Beispiel #4
0
 /// <summary>
 /// Add marshalling information about this parameter
 /// </summary>
 public void SetMarshalType(NativeType mType)
 {
     marshalType = mType;
     parMode |= hasFieldMarshal;
 }
Beispiel #5
0
 public void RemoveMarshalType()
 {
     marshalType = null; flags &= NoFieldMarshal;
 }
Beispiel #6
0
 /// <summary>
 /// Remove any marshalling information for this parameter
 /// </summary>
 public void RemoveMashalType()
 {
     marshalType = null; parMode &= noFieldMarshal;
 }
Beispiel #7
0
 internal NativeArray(NativeType elemType, uint pNum, uint elemMult, uint numElem)
     : base((byte)NativeTypeIx.Array)
 {
     this.elemType = elemType;
     parNum = pNum;
     this.elemMult = elemMult;
     len = numElem;
 }
Beispiel #8
0
 public NativeArray(NativeType elemType, int numElem, int parNumForLen)
     : base((byte)NativeTypeIx.Array)
 {
     this.elemType = elemType;
     len = (uint)numElem;
     parNum = (uint)parNumForLen;
 }
Beispiel #9
0
 public NativeArray(NativeType elemType, int len)
     : base((byte)NativeTypeIx.Array)
 {
     this.elemType = elemType;
     this.len = (uint)len;
 }
Beispiel #10
0
 /*-------------------- Constructors ---------------------------------*/
 public NativeArray(NativeType elemType)
     : base((byte)NativeTypeIx.Array)
 {
     this.elemType = elemType;
 }