Пример #1
0
        public DelayImportTable Clone()
        {
            var copy = new DelayImportTable();

            CopyTo(copy);

            return(copy);
        }
Пример #2
0
 protected void CopyTo(DelayImportTable copy)
 {
     foreach (var childNode in _list)
     {
         var copyChildNode = childNode.Clone();
         copy._list.Add(copyChildNode);
         copyChildNode._parent = this;
     }
 }
Пример #3
0
        private static void Load(IBinaryAccessor accessor, PEImage image, DelayImportTable table)
        {
            while (true)
            {
                var module = DelayImportModuleTable.Load(accessor, image);
                if (module == null)
                {
                    break;
                }

                module._parent = table;
                table._list.Add(module);
            }
        }
Пример #4
0
        public static DelayImportTable Load(PEImage image)
        {
            if (image == null)
            {
                return(null);
            }

            var dd = image.Directories[DataDirectories.DelayImportDescriptor];

            if (dd.IsNull)
            {
                return(null);
            }

            var table = new DelayImportTable();

            using (var accessor = image.OpenImageToSectionData(dd.RVA))
            {
                Load(accessor, image, table);
            }

            return(table);
        }