Beispiel #1
0
        private void LoadData(CLIFile pFile)
        {
            int typeDefIndex = 0;

            if (pFile.TypeDefTable.Length >= 0xFFFF)
            {
                typeDefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                typeDefIndex = pFile.ReadUInt16() - 1;
            }
            if (typeDefIndex >= 0)
            {
                NestedClass = pFile.TypeDefTable[typeDefIndex];
            }
            typeDefIndex = 0;
            if (pFile.TypeDefTable.Length >= 0xFFFF)
            {
                typeDefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                typeDefIndex = pFile.ReadUInt16() - 1;
            }
            if (typeDefIndex >= 0)
            {
                EnclosingClass = pFile.TypeDefTable[typeDefIndex];
            }
        }
Beispiel #2
0
 private void LoadData(CLIFile pFile)
 {
     Number = pFile.ReadUInt16();
     Flags = pFile.ReadUInt16();
     Owner.LoadData(pFile);
     Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
 }
Beispiel #3
0
 private void LoadData(CLIFile pFile)
 {
     Number = pFile.ReadUInt16();
     Flags  = pFile.ReadUInt16();
     Owner.LoadData(pFile);
     Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
 }
Beispiel #4
0
        private void LoadData(CLIFile pFile)
        {
            int typeDefIndex = 0;

            if (pFile.TypeDefTable.Length >= 0xFFFF)
            {
                typeDefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                typeDefIndex = pFile.ReadUInt16() - 1;
            }
            if (typeDefIndex >= 0)
            {
                Parent = pFile.TypeDefTable[typeDefIndex];
            }
            if (pFile.EventTable.Length >= 0xFFFF)
            {
                EventListIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                EventListIndex = pFile.ReadUInt16() - 1;
            }
        }
		private void LoadData(CLIFile pFile)
		{
			Number = pFile.ReadUInt16();
			Flags = (GenericParamAttributes)pFile.ReadUInt16();
			Owner.LoadData(pFile);
			Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
		}
		private void LoadData(CLIFile pFile)
		{
			int typeDefIndex = 0;
			if (pFile.TypeDefTable.Length >= 0xFFFF) typeDefIndex = pFile.ReadInt32() - 1;
			else typeDefIndex = pFile.ReadUInt16() - 1;
			if (typeDefIndex >= 0) Parent = pFile.TypeDefTable[typeDefIndex];
			if (pFile.PropertyTable.Length >= 0xFFFF) PropertyListIndex = pFile.ReadInt32() - 1;
			else PropertyListIndex = pFile.ReadUInt16() - 1;
		}
Beispiel #7
0
 private void LoadData(CLIFile pFile)
 {
     Semantics = pFile.ReadUInt16();
     int methodDefIndex = 0;
     if (pFile.MethodDefTable.Length >= 0xFFFF) methodDefIndex = pFile.ReadInt32() - 1;
     else methodDefIndex = pFile.ReadUInt16() - 1;
     if (methodDefIndex >= 0) Method = pFile.MethodDefTable[methodDefIndex];
     Association.LoadData(pFile);
 }
		private void LoadData(CLIFile pFile)
		{
			PackingSize = pFile.ReadUInt16();
			ClassSize = pFile.ReadUInt32();
			int typeDefIndex = 0;
			if (pFile.TypeDefTable.Length >= 0xFFFF) typeDefIndex = pFile.ReadInt32() - 1;
			else typeDefIndex = pFile.ReadUInt16() - 1;
			if (typeDefIndex >= 0) Parent = pFile.TypeDefTable[typeDefIndex];
		}
Beispiel #9
0
		private void LoadData(CLIFile pFile)
		{
			MappingFlags = (PInvokeAttributes)pFile.ReadUInt16();
			MemberForwarded.LoadData(pFile);
			ImportName = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
			int moduleRefIndex = 0;
			if (pFile.ModuleRefTable.Length >= 0xFFFF) moduleRefIndex = pFile.ReadInt32() - 1;
			else moduleRefIndex = pFile.ReadUInt16() - 1;
			if (moduleRefIndex >= 0) ImportScope = pFile.ModuleRefTable[moduleRefIndex];
		}
Beispiel #10
0
		private void LoadData(CLIFile pFile)
		{
			int typeDefIndex = 0;
			if (pFile.TypeDefTable.Length >= 0xFFFF) typeDefIndex = pFile.ReadInt32() - 1;
			else typeDefIndex = pFile.ReadUInt16() - 1;
			if (typeDefIndex >= 0) NestedClass = pFile.TypeDefTable[typeDefIndex];
			typeDefIndex = 0;
			if (pFile.TypeDefTable.Length >= 0xFFFF) typeDefIndex = pFile.ReadInt32() - 1;
			else typeDefIndex = pFile.ReadUInt16() - 1;
			if (typeDefIndex >= 0) EnclosingClass = pFile.TypeDefTable[typeDefIndex];
		}
Beispiel #11
0
		private void LoadData(CLIFile pFile)
		{
			Flags = (TypeAttributes)pFile.ReadUInt32();
			TypeName = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
			TypeNamespace = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
			Extends.LoadData(pFile);
			if (pFile.FieldTable.Length >= 0xFFFF) FieldListIndex = pFile.ReadInt32() - 1;
			else FieldListIndex = pFile.ReadUInt16() - 1;
			if (pFile.MethodDefTable.Length >= 0xFFFF) MethodListIndex = pFile.ReadInt32() - 1;
			else MethodListIndex = pFile.ReadUInt16() - 1;
		}
Beispiel #12
0
 private void LoadData(CLIFile pFile)
 {
     HashAlgId = pFile.ReadUInt32();
     MajorVersion = pFile.ReadUInt16();
     MinorVersion = pFile.ReadUInt16();
     BuildNumber = pFile.ReadUInt16();
     RevisionNumber = pFile.ReadUInt16();
     Flags = pFile.ReadUInt32();
     PublicKey = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
     Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     Culture = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
 }
Beispiel #13
0
 private void LoadData(CLIFile pFile)
 {
     MajorVersion     = pFile.ReadUInt16();
     MinorVersion     = pFile.ReadUInt16();
     BuildNumber      = pFile.ReadUInt16();
     RevisionNumber   = pFile.ReadUInt16();
     Flags            = pFile.ReadUInt32();
     PublicKeyOrToken = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
     Name             = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     Culture          = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     HashValue        = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
 }
Beispiel #14
0
        public void LoadData(CLIFile pFile)
        {
            int token = 0;

            if (pFile.FileTable.Length > ImplementationTypeMax16BitRows ||
                pFile.AssemblyRefTable.Length > ImplementationTypeMax16BitRows ||
                pFile.ExportedTypeTable.Length > ImplementationTypeMax16BitRows)
            {
                token = pFile.ReadInt32();
            }
            else
            {
                token = pFile.ReadUInt16();
            }
            Type  = (ImplementationType)(token & ImplementationTypeMask);
            token = (token >> ImplementationTypeBits) - 1;
            if (token >= 0)
            {
                switch (Type)
                {
                case ImplementationType.File: File = pFile.FileTable[token]; break;

                case ImplementationType.AssemblyRef: AssemblyRef = pFile.AssemblyRefTable[token]; break;

                case ImplementationType.ExportedType: ExportedType = pFile.ExportedTypeTable[token]; break;

                default: throw new BadImageFormatException("Implementation Type");
                }
            }
        }
Beispiel #15
0
        private void LoadData(CLIFile pFile)
        {
            RVA = pFile.ReadUInt32();
            ImplFlags = (MethodImplAttributes)pFile.ReadUInt16();
            Flags = (MethodAttributes)pFile.ReadUInt16();
            Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
            Signature = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
            if (pFile.ParamTable.Length >= 0xFFFF) ParamListIndex = pFile.ReadInt32() - 1;
            else ParamListIndex = pFile.ReadUInt16() - 1;

            if (RVA != 0)
            {
                Body = new MethodDefBodyData();
                Body.LoadData(this);
            }
        }
Beispiel #16
0
        public void LoadData(CLIFile pFile)
        {
            int token = 0;

            if (pFile.FieldTable.Length > HasFieldMarshalTypeMax16BitRows ||
                pFile.ParamTable.Length > HasFieldMarshalTypeMax16BitRows)
            {
                token = pFile.ReadInt32();
            }
            else
            {
                token = pFile.ReadUInt16();
            }
            Type  = (HasFieldMarshalType)(token & HasFieldMarshalTypeMask);
            token = (token >> HasFieldMarshalTypeBits) - 1;
            if (token >= 0)
            {
                switch (Type)
                {
                case HasFieldMarshalType.Field: Field = pFile.FieldTable[token]; break;

                case HasFieldMarshalType.Param: Param = pFile.ParamTable[token]; break;

                default: throw new BadImageFormatException("HasFieldMarshal Type");
                }
            }
        }
Beispiel #17
0
        public void LoadData(CLIFile pFile)
        {
            int token = 0;

            if (pFile.TypeDefTable.Length > TypeDefRefOrSpecTypeMax16BitRows ||
                pFile.TypeRefTable.Length > TypeDefRefOrSpecTypeMax16BitRows ||
                pFile.TypeSpecTable.Length > TypeDefRefOrSpecTypeMax16BitRows)
            {
                token = pFile.ReadInt32();
            }
            else
            {
                token = pFile.ReadUInt16();
            }
            Type  = (TypeDefRefOrSpecType)(token & TypeDefRefOrSpecTypeMask);
            token = (token >> TypeDefRefOrSpecTypeBits) - 1;
            if (token >= 0)
            {
                switch (Type)
                {
                case TypeDefRefOrSpecType.TypeDef: TypeDef = pFile.TypeDefTable[token]; break;

                case TypeDefRefOrSpecType.TypeRef: TypeRef = pFile.TypeRefTable[token]; break;

                case TypeDefRefOrSpecType.TypeSpec: TypeSpec = pFile.TypeSpecTable[token]; break;

                default: throw new BadImageFormatException("TypeDefRefOrSpec Type");
                }
            }
        }
Beispiel #18
0
        public void LoadData(CLIFile pFile)
        {
            int token = 0;

            if (pFile.TypeDefTable.Length > HasDeclSecurityTypeMax16BitRows ||
                pFile.MethodDefTable.Length > HasDeclSecurityTypeMax16BitRows ||
                pFile.AssemblyTable.Length > HasDeclSecurityTypeMax16BitRows)
            {
                token = pFile.ReadInt32();
            }
            else
            {
                token = pFile.ReadUInt16();
            }
            Type  = (HasDeclSecurityType)(token & HasDeclSecurityTypeMask);
            token = (token >> HasDeclSecurityTypeBits) - 1;
            if (token >= 0)
            {
                switch (Type)
                {
                case HasDeclSecurityType.TypeDef: TypeDef = pFile.TypeDefTable[token]; break;

                case HasDeclSecurityType.MethodDef: MethodDef = pFile.MethodDefTable[token]; break;

                case HasDeclSecurityType.Assembly: Assembly = pFile.AssemblyTable[token]; break;

                default: throw new BadImageFormatException("HasDeclSecurity Type");
                }
            }
        }
Beispiel #19
0
        public void LoadData(CLIFile pFile)
        {
            int token = 0;

            if (pFile.MethodDefTable.Length > MethodDefOrRefTypeMax16BitRows ||
                pFile.MemberRefTable.Length > MethodDefOrRefTypeMax16BitRows)
            {
                token = pFile.ReadInt32();
            }
            else
            {
                token = pFile.ReadUInt16();
            }
            Type  = (MethodDefOrRefType)(token & MethodDefOrRefTypeMask);
            token = (token >> MethodDefOrRefTypeBits) - 1;
            if (token >= 0)
            {
                switch (Type)
                {
                case MethodDefOrRefType.MethodDef: MethodDef = pFile.MethodDefTable[token]; break;

                case MethodDefOrRefType.MemberRef: MemberRef = pFile.MemberRefTable[token]; break;

                default: throw new BadImageFormatException("MethodDefOrRef Type");
                }
            }
        }
Beispiel #20
0
        public void LoadData(CLIFile pFile)
        {
            int token = 0;

            if (pFile.EventTable.Length > HasSemanticsTypeMax16BitRows ||
                pFile.PropertyTable.Length > HasSemanticsTypeMax16BitRows)
            {
                token = pFile.ReadInt32();
            }
            else
            {
                token = pFile.ReadUInt16();
            }
            Type  = (HasSemanticsType)(token & HasSemanticsTypeMask);
            token = (token >> HasSemanticsTypeBits) - 1;
            if (token >= 0)
            {
                switch (Type)
                {
                case HasSemanticsType.Event: Event = pFile.EventTable[token]; break;

                case HasSemanticsType.Property: Property = pFile.PropertyTable[token]; break;

                default: throw new BadImageFormatException("HasSemantics Type");
                }
            }
        }
Beispiel #21
0
        public void LoadData(CLIFile pFile)
        {
            int token = 0;

            if (pFile.ModuleTable.Length > ResolutionScopeTypeMax16BitRows ||
                pFile.ModuleRefTable.Length > ResolutionScopeTypeMax16BitRows ||
                pFile.AssemblyRefTable.Length > ResolutionScopeTypeMax16BitRows ||
                pFile.TypeRefTable.Length > ResolutionScopeTypeMax16BitRows)
            {
                token = pFile.ReadInt32();
            }
            else
            {
                token = pFile.ReadUInt16();
            }
            Type  = (ResolutionScopeType)(token & ResolutionScopeTypeMask);
            token = (token >> ResolutionScopeTypeBits) - 1;
            if (token >= 0)
            {
                switch (Type)
                {
                case ResolutionScopeType.Module: Module = pFile.ModuleTable[token]; break;

                case ResolutionScopeType.ModuleRef: ModuleRef = pFile.ModuleRefTable[token]; break;

                case ResolutionScopeType.AssemblyRef: AssemblyRef = pFile.AssemblyRefTable[token]; break;

                case ResolutionScopeType.TypeRef: TypeRef = pFile.TypeRefTable[token]; break;

                default: throw new BadImageFormatException("ResolutionScope Type");
                }
            }
        }
 private void LoadData(CLIFile pFile)
 {
     int genericParamIndex = 0;
     if (pFile.GenericParamTable.Length >= 0xFFFF) genericParamIndex = pFile.ReadInt32() - 1;
     else genericParamIndex = pFile.ReadUInt16() - 1;
     if (genericParamIndex >= 0) Owner = pFile.GenericParamTable[genericParamIndex];
     Constraint.LoadData(pFile);
 }
Beispiel #23
0
 private void LoadData(CLIFile pFile)
 {
     Generation = pFile.ReadUInt16();
     Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     Mvid = pFile.ReadGUIDHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.GUID32Bit));
     EncId = pFile.ReadGUIDHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.GUID32Bit));
     EncBaseId = pFile.ReadGUIDHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.GUID32Bit));
 }
Beispiel #24
0
		private void LoadData(CLIFile pFile)
		{
			Offset = pFile.ReadUInt32();
			int fieldIndex = 0;
			if (pFile.FieldTable.Length >= 0xFFFF) fieldIndex = pFile.ReadInt32() - 1;
			else fieldIndex = pFile.ReadUInt16() - 1;
			if (fieldIndex >= 0) Field = pFile.FieldTable[fieldIndex];
		}
		private void LoadData(CLIFile pFile)
		{
			int typeDefIndex = 0;
			if (pFile.TypeDefTable.Length >= 0xFFFF) typeDefIndex = pFile.ReadInt32() - 1;
			else typeDefIndex = pFile.ReadUInt16() - 1;
			if (typeDefIndex >= 0) Class = pFile.TypeDefTable[typeDefIndex];
			Interface.LoadData(pFile);
		}
Beispiel #26
0
 private void LoadData(CLIFile pFile)
 {
     Generation = pFile.ReadUInt16();
     Name       = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     Mvid       = pFile.ReadGUIDHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.GUID32Bit));
     EncId      = pFile.ReadGUIDHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.GUID32Bit));
     EncBaseId  = pFile.ReadGUIDHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.GUID32Bit));
 }
 private void LoadData(CLIFile pFile)
 {
     Processor = pFile.ReadUInt32();
     int assemblyRefIndex = 0;
     if (pFile.AssemblyRefTable.Length >= 0xFFFF) assemblyRefIndex = pFile.ReadInt32() - 1;
     else assemblyRefIndex = pFile.ReadUInt16() - 1;
     if (assemblyRefIndex >= 0) AssemblyRef = pFile.AssemblyRefTable[assemblyRefIndex];
 }
Beispiel #28
0
 private void LoadData(CLIFile pFile)
 {
     int typeDefIndex = 0;
     if (pFile.TypeDefTable.Length >= 0xFFFF) typeDefIndex = pFile.ReadInt32() - 1;
     else typeDefIndex = pFile.ReadUInt16() - 1;
     if (typeDefIndex >= 0) Class = pFile.TypeDefTable[typeDefIndex];
     MethodBody.LoadData(pFile);
     MethodDeclaration.LoadData(pFile);
 }
Beispiel #29
0
        private void LoadData(CLIFile pFile)
        {
            Semantics = pFile.ReadUInt16();
            int methodDefIndex = 0;

            if (pFile.MethodDefTable.Length >= 0xFFFF)
            {
                methodDefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                methodDefIndex = pFile.ReadUInt16() - 1;
            }
            if (methodDefIndex >= 0)
            {
                Method = pFile.MethodDefTable[methodDefIndex];
            }
            Association.LoadData(pFile);
        }
Beispiel #30
0
		private void LoadData(CLIFile pFile)
		{
			InitialValueOffset = pFile.ReadUInt32();
			CLIFile.SectionHeader sectionHeader = pFile.GetSection(InitialValueOffset);
			InitialValueOffset = sectionHeader.PointerToRawData + (InitialValueOffset - sectionHeader.VirtualAddress);
			int fieldIndex = 0;
			if (pFile.FieldTable.Length >= 0xFFFF) fieldIndex = pFile.ReadInt32() - 1;
			else fieldIndex = pFile.ReadUInt16() - 1;
			if (fieldIndex >= 0) Field = pFile.FieldTable[fieldIndex];
		}
Beispiel #31
0
 private void LoadData(CLIFile pFile)
 {
     OSPlatformId = pFile.ReadUInt32();
     OSMajorVersion = pFile.ReadUInt32();
     OSMinorVersion = pFile.ReadUInt32();
     int assemblyRefIndex = 0;
     if (pFile.AssemblyRefTable.Length >= 0xFFFF) assemblyRefIndex = pFile.ReadInt32() - 1;
     else assemblyRefIndex = pFile.ReadUInt16() - 1;
     if (assemblyRefIndex >= 0) AssemblyRef = pFile.AssemblyRefTable[assemblyRefIndex];
 }
Beispiel #32
0
        private void LoadData(CLIFile pFile)
        {
            PackingSize = pFile.ReadUInt16();
            ClassSize   = pFile.ReadUInt32();
            int typeDefIndex = 0;

            if (pFile.TypeDefTable.Length >= 0xFFFF)
            {
                typeDefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                typeDefIndex = pFile.ReadUInt16() - 1;
            }
            if (typeDefIndex >= 0)
            {
                Parent = pFile.TypeDefTable[typeDefIndex];
            }
        }
Beispiel #33
0
        private void LoadData(CLIFile pFile)
        {
            MappingFlags = pFile.ReadUInt16();
            MemberForwarded.LoadData(pFile);
            ImportName = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
            int moduleRefIndex = 0;

            if (pFile.ModuleRefTable.Length >= 0xFFFF)
            {
                moduleRefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                moduleRefIndex = pFile.ReadUInt16() - 1;
            }
            if (moduleRefIndex >= 0)
            {
                ImportScope = pFile.ModuleRefTable[moduleRefIndex];
            }
        }
Beispiel #34
0
 private void LoadData(CLIFile pFile)
 {
     Flags = pFile.ReadUInt32();
     int typeDefIndex = 0;
     if (pFile.TypeDefTable.Length >= 0xFFFF) typeDefIndex = pFile.ReadInt32() - 1;
     else typeDefIndex = pFile.ReadUInt16() - 1;
     if (typeDefIndex >= 0) TypeDef = pFile.TypeDefTable[typeDefIndex];
     TypeName = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     TypeNamespace = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     Implementation.LoadData(pFile);
 }
Beispiel #35
0
        private void LoadData(CLIFile pFile)
        {
            RVA       = pFile.ReadUInt32();
            ImplFlags = (MethodImplAttributes)pFile.ReadUInt16();
            Flags     = (MethodAttributes)pFile.ReadUInt16();
            Name      = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
            Signature = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
            if (pFile.ParamTable.Length >= 0xFFFF)
            {
                ParamListIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                ParamListIndex = pFile.ReadUInt16() - 1;
            }

            if (RVA != 0)
            {
                Body = new MethodDefBodyData();
                Body.LoadData(this);
            }
        }
Beispiel #36
0
 private void LoadData(CLIFile pFile)
 {
     Flags         = (TypeAttributes)pFile.ReadUInt32();
     TypeName      = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     TypeNamespace = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     Extends.LoadData(pFile);
     if (pFile.FieldTable.Length >= 0xFFFF)
     {
         FieldListIndex = pFile.ReadInt32() - 1;
     }
     else
     {
         FieldListIndex = pFile.ReadUInt16() - 1;
     }
     if (pFile.MethodDefTable.Length >= 0xFFFF)
     {
         MethodListIndex = pFile.ReadInt32() - 1;
     }
     else
     {
         MethodListIndex = pFile.ReadUInt16() - 1;
     }
 }
Beispiel #37
0
        private void LoadData(CLIFile pFile)
        {
            Offset = pFile.ReadUInt32();
            int fieldIndex = 0;

            if (pFile.FieldTable.Length >= 0xFFFF)
            {
                fieldIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                fieldIndex = pFile.ReadUInt16() - 1;
            }
            if (fieldIndex >= 0)
            {
                Field = pFile.FieldTable[fieldIndex];
            }
        }
Beispiel #38
0
        private void LoadData(CLIFile pFile)
        {
            int genericParamIndex = 0;

            if (pFile.GenericParamTable.Length >= 0xFFFF)
            {
                genericParamIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                genericParamIndex = pFile.ReadUInt16() - 1;
            }
            if (genericParamIndex >= 0)
            {
                Owner = pFile.GenericParamTable[genericParamIndex];
            }
            Constraint.LoadData(pFile);
        }
        private void LoadData(CLIFile pFile)
        {
            Processor = pFile.ReadUInt32();
            int assemblyRefIndex = 0;

            if (pFile.AssemblyRefTable.Length >= 0xFFFF)
            {
                assemblyRefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                assemblyRefIndex = pFile.ReadUInt16() - 1;
            }
            if (assemblyRefIndex >= 0)
            {
                AssemblyRef = pFile.AssemblyRefTable[assemblyRefIndex];
            }
        }
Beispiel #40
0
        private void LoadData(CLIFile pFile)
        {
            int typeDefIndex = 0;

            if (pFile.TypeDefTable.Length >= 0xFFFF)
            {
                typeDefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                typeDefIndex = pFile.ReadUInt16() - 1;
            }
            if (typeDefIndex >= 0)
            {
                Class = pFile.TypeDefTable[typeDefIndex];
            }
            Interface.LoadData(pFile);
        }
Beispiel #41
0
        private void LoadData(CLIFile pFile)
        {
            int typeDefIndex = 0;

            if (pFile.TypeDefTable.Length >= 0xFFFF)
            {
                typeDefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                typeDefIndex = pFile.ReadUInt16() - 1;
            }
            if (typeDefIndex >= 0)
            {
                Class = pFile.TypeDefTable[typeDefIndex];
            }
            MethodBody.LoadData(pFile);
            MethodDeclaration.LoadData(pFile);
        }
Beispiel #42
0
        private void LoadData(CLIFile pFile)
        {
            OSPlatformId   = pFile.ReadUInt32();
            OSMajorVersion = pFile.ReadUInt32();
            OSMinorVersion = pFile.ReadUInt32();
            int assemblyRefIndex = 0;

            if (pFile.AssemblyRefTable.Length >= 0xFFFF)
            {
                assemblyRefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                assemblyRefIndex = pFile.ReadUInt16() - 1;
            }
            if (assemblyRefIndex >= 0)
            {
                AssemblyRef = pFile.AssemblyRefTable[assemblyRefIndex];
            }
        }
Beispiel #43
0
        private void LoadData(CLIFile pFile)
        {
            InitialValueOffset = pFile.ReadUInt32();
            SectionHeader sectionHeader = pFile.GetSection(InitialValueOffset);

            InitialValueOffset = sectionHeader.PointerToRawData + (InitialValueOffset - sectionHeader.VirtualAddress);
            int fieldIndex = 0;

            if (pFile.FieldTable.Length >= 0xFFFF)
            {
                fieldIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                fieldIndex = pFile.ReadUInt16() - 1;
            }
            if (fieldIndex >= 0)
            {
                Field = pFile.FieldTable[fieldIndex];
            }
        }
Beispiel #44
0
        private void LoadData(CLIFile pFile)
        {
            Flags = pFile.ReadUInt32();
            int typeDefIndex = 0;

            if (pFile.TypeDefTable.Length >= 0xFFFF)
            {
                typeDefIndex = pFile.ReadInt32() - 1;
            }
            else
            {
                typeDefIndex = pFile.ReadUInt16() - 1;
            }
            if (typeDefIndex >= 0)
            {
                TypeDef = pFile.TypeDefTable[typeDefIndex];
            }
            TypeName      = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
            TypeNamespace = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
            Implementation.LoadData(pFile);
        }
Beispiel #45
0
		private void LoadData(CLIFile pFile)
		{
			Flags = (FieldAttributes)pFile.ReadUInt16();
			Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
			Signature = pFile.ReadBlobHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Blob32Bit));
		}
Beispiel #46
0
        public void LoadData(CLIFile pFile)
        {
            int token = 0;

            if (pFile.MethodDefTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.FieldTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.TypeRefTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.TypeDefTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.ParamTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.InterfaceImplTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.MemberRefTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.ModuleTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.DeclSecurityTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.PropertyTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.EventTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.StandAloneSigTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.ModuleRefTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.TypeSpecTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.AssemblyTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.AssemblyRefTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.FileTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.ExportedTypeTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.ManifestResourceTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.GenericParamTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.GenericParamConstraintTable.Length > HasCustomAttributeTypeMax16BitRows ||
                pFile.MethodSpecTable.Length > HasCustomAttributeTypeMax16BitRows)
            {
                token = pFile.ReadInt32();
            }
            else
            {
                token = pFile.ReadUInt16();
            }
            Type  = (HasCustomAttributeType)(token & HasCustomAttributeTypeMask);
            token = (token >> HasCustomAttributeTypeBits) - 1;
            if (token >= 0)
            {
                switch (Type)
                {
                case HasCustomAttributeType.MethodDef: MethodDef = pFile.MethodDefTable[token]; break;

                case HasCustomAttributeType.Field: Field = pFile.FieldTable[token]; break;

                case HasCustomAttributeType.TypeRef: TypeRef = pFile.TypeRefTable[token]; break;

                case HasCustomAttributeType.TypeDef: TypeDef = pFile.TypeDefTable[token]; break;

                case HasCustomAttributeType.Param: Param = pFile.ParamTable[token]; break;

                case HasCustomAttributeType.InterfaceImpl: InterfaceImpl = pFile.InterfaceImplTable[token]; break;

                case HasCustomAttributeType.MemberRef: MemberRef = pFile.MemberRefTable[token]; break;

                case HasCustomAttributeType.Module: Module = pFile.ModuleTable[token]; break;

                case HasCustomAttributeType.DeclSecurity: DeclSecurity = pFile.DeclSecurityTable[token]; break;

                case HasCustomAttributeType.Property: Property = pFile.PropertyTable[token]; break;

                case HasCustomAttributeType.Event: Event = pFile.EventTable[token]; break;

                case HasCustomAttributeType.StandAloneSig: StandAloneSig = pFile.StandAloneSigTable[token]; break;

                case HasCustomAttributeType.ModuleRef: ModuleRef = pFile.ModuleRefTable[token]; break;

                case HasCustomAttributeType.TypeSpec: TypeSpec = pFile.TypeSpecTable[token]; break;

                case HasCustomAttributeType.Assembly: Assembly = pFile.AssemblyTable[token]; break;

                case HasCustomAttributeType.AssemblyRef: AssemblyRef = pFile.AssemblyRefTable[token]; break;

                case HasCustomAttributeType.File: File = pFile.FileTable[token]; break;

                case HasCustomAttributeType.ExportedType: ExportedType = pFile.ExportedTypeTable[token]; break;

                case HasCustomAttributeType.ManifestResource: ManifestResource = pFile.ManifestResourceTable[token]; break;

                case HasCustomAttributeType.GenericParam: GenericParam = pFile.GenericParamTable[token]; break;

                case HasCustomAttributeType.GenericParamConstraint: GenericParamConstraint = pFile.GenericParamConstraintTable[token]; break;

                case HasCustomAttributeType.MethodSpec: MethodSpec = pFile.MethodSpecTable[token]; break;

                default: throw new BadImageFormatException("HasCustomAttribute Type");
                }
            }
        }
Beispiel #47
0
		private void LoadData(CLIFile pFile)
		{
			Flags = (PropertyAttributes)pFile.ReadUInt16();
			Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
			Type = pFile.ReadBlobHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Blob32Bit));
		}
Beispiel #48
0
 private void LoadData(CLIFile pFile)
 {
     Flags     = (FieldAttributes)pFile.ReadUInt16();
     Name      = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     Signature = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
 }
Beispiel #49
0
		private void LoadData(CLIFile pFile)
		{
			Flags = (EventAttributes)pFile.ReadUInt16();
			Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
			EventType.LoadData(pFile);
		}
Beispiel #50
0
 private void LoadData(CLIFile pFile)
 {
     Type = (byte)pFile.ReadUInt16();
     Parent.LoadData(pFile);
     Value = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
 }
Beispiel #51
0
 private void LoadData(CLIFile pFile)
 {
     Flags = pFile.ReadUInt16();
     Name  = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     Type  = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
 }
Beispiel #52
0
 private void LoadData(CLIFile pFile)
 {
     Flags = pFile.ReadUInt16();
     Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Strings32Bit));
     Type = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
 }
Beispiel #53
0
 private void LoadData(CLIFile pFile)
 {
     Type = (byte)pFile.ReadUInt16();
     Parent.LoadData(pFile);
     Value = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
 }
Beispiel #54
0
		private void LoadData(CLIFile pFile)
		{
			Flags = (ParamAttributes)pFile.ReadUInt16();
			Sequence = pFile.ReadUInt16();
			Name = pFile.ReadStringHeap(pFile.ReadHeapIndex(HeapOffsetSizes.Strings32Bit));
		}
Beispiel #55
0
 private void LoadData(CLIFile pFile)
 {
     Action = (byte)pFile.ReadUInt16();
     Parent.LoadData(pFile);
     PermissionSet = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
 }
Beispiel #56
0
 private void LoadData(CLIFile pFile)
 {
     Action = (byte)pFile.ReadUInt16();
     Parent.LoadData(pFile);
     PermissionSet = pFile.ReadBlobHeap(pFile.ReadHeapIndex(CLIHeapOffsetSize.Blob32Bit));
 }