本文整理汇总了C#中ImageMap.IsExecutableAddress方法的典型用法代码示例。如果您正苦于以下问题:C# ImageMap.IsExecutableAddress方法的具体用法?C# ImageMap.IsExecutableAddress怎么用?C# ImageMap.IsExecutableAddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ImageMap
的用法示例。
在下文中一共展示了ImageMap.IsExecutableAddress方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddExportedEntryPoints
private void AddExportedEntryPoints(Address addrLoad, ImageMap imageMap, List<EntryPoint> entryPoints)
{
ImageReader rdr = imgLoaded.CreateLeReader(rvaExportTable);
rdr.ReadLeUInt32(); // Characteristics
rdr.ReadLeUInt32(); // timestamp
rdr.ReadLeUInt32(); // version.
rdr.ReadLeUInt32(); // binary name.
rdr.ReadLeUInt32(); // base ordinal
int nExports = rdr.ReadLeInt32();
int nNames = rdr.ReadLeInt32();
if (nExports != nNames)
throw new BadImageFormatException("Unexpected discrepancy in PE image.");
uint rvaApfn = rdr.ReadLeUInt32();
uint rvaNames = rdr.ReadLeUInt32();
ImageReader rdrAddrs = imgLoaded.CreateLeReader(rvaApfn);
ImageReader rdrNames = imgLoaded.CreateLeReader(rvaNames);
for (int i = 0; i < nNames; ++i)
{
EntryPoint ep = LoadEntryPoint(addrLoad, rdrAddrs, rdrNames);
if (imageMap.IsExecutableAddress(ep.Address))
{
entryPoints.Add(ep);
}
}
}