当前位置: 首页>>代码示例>>C#>>正文


C# IPEImage.CreateFullStream方法代码示例

本文整理汇总了C#中IPEImage.CreateFullStream方法的典型用法代码示例。如果您正苦于以下问题:C# IPEImage.CreateFullStream方法的具体用法?C# IPEImage.CreateFullStream怎么用?C# IPEImage.CreateFullStream使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在IPEImage的用法示例。


在下文中一共展示了IPEImage.CreateFullStream方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Win32ResourcesPE

		/// <summary>
		/// Constructor
		/// </summary>
		/// <param name="peImage">The PE image</param>
		/// <param name="rsrcReader">Reader for the whole Win32 resources section (usually
		/// the .rsrc section) or <c>null</c> if we should create one from the resource data
		/// directory in the optional header. This instance owns the reader.</param>
		public Win32ResourcesPE(IPEImage peImage, IBinaryReader rsrcReader) {
			this.rvaConverter = peImage;
			this.dataReader = peImage.CreateFullStream();
			if (rsrcReader != null)
				this.rsrcReader = rsrcReader;
			else {
				var dataDir = peImage.ImageNTHeaders.OptionalHeader.DataDirectories[2];
				if (dataDir.VirtualAddress != 0 && dataDir.Size != 0)
					this.rsrcReader = peImage.CreateStream(dataDir.VirtualAddress, dataDir.Size);
				else
					this.rsrcReader = MemoryImageStream.CreateEmpty();
			}
			Initialize();
		}
开发者ID:SAD1992,项目名称:justdecompile-plugins,代码行数:21,代码来源:Win32Resources.cs

示例2: Initialize

		void Initialize(IPEImage peImage) {
			this.peImage = peImage;
			this.peStream = peImage.CreateFullStream();
		}
开发者ID:GreenDamTan,项目名称:de4dot,代码行数:4,代码来源:MyPEImage.cs

示例3: GetOrCreate

        public AsmEdHexDocument GetOrCreate(IPEImage peImage)
        {
            var filename = GetFullPath(peImage.FileName);

            lock (lockObj) {
                AsmEdHexDocument doc;
                if (filenameToDoc.TryGetValue(filename, out doc))
                    return doc;

                using (var stream = peImage.CreateFullStream()) {
                    var data = stream.ReadAllBytes();
                    doc = new AsmEdHexDocument(data, filename);
                    filenameToDoc.Add(filename, doc);
                    return doc;
                }
            }
        }
开发者ID:rhowlerose,项目名称:dnSpy,代码行数:17,代码来源:HexDocumentManager.cs

示例4: GetOrCreate

		public AsmEdHexDocument GetOrCreate(IPEImage peImage) {
			var filename = GetFullPath(peImage.FileName);

			lock (lockObj) {
				var doc = TryGet_NoLock(filename);
				if (doc != null)
					return doc;

				using (var stream = peImage.CreateFullStream()) {
					var data = stream.ReadAllBytes();
					doc = new AsmEdHexDocument(data, filename);
					filenameToDoc[filename] = new WeakReference(doc);
					return doc;
				}
			}
		}
开发者ID:arkanoid1,项目名称:dnSpy,代码行数:16,代码来源:HexDocumentManager.cs

示例5: GetOrCreate

		HexBuffer GetOrCreate(IPEImage peImage) {
			var filename = GetFullPath(peImage.FileName);

			HexBuffer buffer;
			lock (lockObj) {
				buffer = TryGet_NoLock(filename);
				if (buffer != null)
					return buffer;

				using (var stream = peImage.CreateFullStream()) {
					var data = stream.ReadAllBytes();
					buffer = hexBufferFactoryService.Create(data, filename, hexBufferFactoryService.DefaultFileTags);
					filenameToBuffer[filename] = new WeakReference(buffer);
				}
			}
			return NotifyBufferCreated(buffer);
		}
开发者ID:manojdjoshi,项目名称:dnSpy,代码行数:17,代码来源:HexBufferService.cs


注:本文中的IPEImage.CreateFullStream方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。