コード例 #1
0
 /// <summary>Get directory from optional header</summary>
 /// <param name="entry">Directory entry type</param>
 /// <returns>Directory</returns>
 public WinNT.IMAGE_DATA_DIRECTORY this[WinNT.IMAGE_DIRECTORY_ENTRY entry]
 {
     get
     {
         return(this.Header.Is64Bit
                                 ? this.Header.HeaderNT64.OptionalHeader[entry]
                                 : this.Header.HeaderNT32.OptionalHeader[entry]);
     }
 }
コード例 #2
0
ファイル: PEDirectoryBase.cs プロジェクト: linhdh/PEReader
        /// <summary>Create instance</summary>
        /// <param name="parent">Parent PE directory</param>
        /// <param name="directory">Directory type</param>
        /// <exception cref="T:ArgumentNullException">parent directory is null</exception>
        public PEDirectoryBase(PEFile parent, WinNT.IMAGE_DIRECTORY_ENTRY directory)
        {
            if (parent == null)
            {
                throw new ArgumentNullException("parent");
            }

            this._parent    = parent;
            this._directory = directory;
        }