PERWAPI.PEReader.GetBlobConst C# (CSharp) Method

GetBlobConst() private method

private GetBlobConst ( int constType ) : Constant
constType int
return Constant
        internal Constant GetBlobConst(int constType)
        {
            uint ix;
            if (md.largeBlob) ix = ReadUInt32();
            else ix = ReadUInt16();
            blob.GoToIndex(ix);
            uint blobSize = blob.ReadCompressedNum();
            if (constType == (int)ElementType.String)
                return new StringConst(blob.ReadBytes((int)blobSize));
            return ReadConst(constType,blob);
        }

Usage Example

Ejemplo n.º 1
0
 internal ConstantElem(PEReader buff)
 {
     byte constType = buff.ReadByte();
     byte pad = buff.ReadByte();
     parentIx = buff.GetCodedIndex(CIx.HasConstant);
     //valIx = buff.GetBlobIx();
     cValue = buff.GetBlobConst(constType);
     sortTable = true;
     tabIx = MDTable.Constant;
 }