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; }
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]); } }
public DataDirectoryModel(OptionalHeader optionalHeader, DataDirectoryKind dataDirectoryKind) { this.optionalHeader = optionalHeader; this.m_Kind = dataDirectoryKind; }