Descriptor for a file referenced in THIS assembly/module (.file)
Inheritance: FileRef
示例#1
0
文件: PERWAPI.cs 项目: nomit007/f4
 internal static void Read(PEReader buff, TableRow[] files)
 {
     for (int i=0; i < files.Length; i++) {
         uint flags = buff.ReadUInt32();
         if (flags == HasMetaData)
             files[i] = new ModuleFile(buff.GetString(),buff.GetBlob());
         else
             files[i] = new ResourceFile(buff.GetString(),buff.GetBlob());
     }
 }
示例#2
0
文件: PERWAPI.cs 项目: nomit007/f4
 internal ModuleFile GetFileDesc(string name)
 {
     if (tables[(int)MDTable.File] == null) return null;
     for (int i=0; i < tables[(int)MDTable.File].Length; i++) {
         FileRef fr = (FileRef)tables[(int)MDTable.File][i];
         if (fr.Name() == name) {
             if (fr is ModuleFile) return (ModuleFile)fr;
             fr = new ModuleFile(fr.Name(),fr.GetHash());
             tables[(int)MDTable.File][i] = fr;
             return (ModuleFile)fr;
         }
     }
     return null;
 }
示例#3
0
文件: PERWAPI.cs 项目: nomit007/f4
 internal ModuleRef(ModuleFile file)
     : base(file.Name())
 {
     modFile = file;
     tabIx = MDTable.ModuleRef;
 }
示例#4
0
文件: PERWAPI.cs 项目: nomit007/f4
 internal override sealed void Resolve(PEReader buff)
 {
     modFile = buff.GetFileDesc(name);
     if (modFile != null)
         modFile.fileModule = this;
 }
示例#5
0
文件: PERWAPI.cs 项目: nomit007/f4
 /*-------------------- Constructors ---------------------------------*/
 internal ModuleRef(string name, bool entryPoint, byte[] hashValue)
     : base(name)
 {
     modFile = new ModuleFile(name,hashValue,entryPoint);
     ismscorlib = name.ToLower() == "mscorlib.dll";
     tabIx = MDTable.ModuleRef;
 }