示例#1
0
 internal DataDirectory(DataDirectoryKind kind, IntPtr at, ref int offset)
 {
     // Forget Marshal.PtrToStructure. This won't work due to the Kind property.
     RelativeVirtualAddress = ImageHelpers.ReadUint32(at, ref offset);
     Size = ImageHelpers.ReadUint32(at, ref offset);
     Kind = kind;
     return;
 }
示例#2
0
 public IDataDirectory this[DataDirectoryKind kind]
 {
     get
     {
         int index = (int)kind;
         if (0 > index)
         {
             throw new ArgumentOutOfRangeException();
         }
         if (this.NumberOfRvaAndSize <= index)
         {
             return(null);
         }
         return(_dataDirectories[index]);
     }
 }
示例#3
0
 public DataDirectoryModel(OptionalHeader optionalHeader, DataDirectoryKind dataDirectoryKind)
 {
     this.optionalHeader = optionalHeader;
     this.m_Kind = dataDirectoryKind;
 }
示例#4
0
 public DataDirectoryModel(OptionalHeader optionalHeader, DataDirectoryKind dataDirectoryKind)
 {
     this.optionalHeader = optionalHeader;
     this.m_Kind         = dataDirectoryKind;
 }