本文整理汇总了C#中PEAPI.FileImage.Write3Bytes方法的典型用法代码示例。如果您正苦于以下问题:C# FileImage.Write3Bytes方法的具体用法?C# FileImage.Write3Bytes怎么用?C# FileImage.Write3Bytes使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PEAPI.FileImage
的用法示例。
在下文中一共展示了FileImage.Write3Bytes方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Write
internal void Write(FileImage output)
{
// Console.WriteLine("Writing header flags = " + Hex.Short(headerFlags));
if (tinyFormat) {
// Console.WriteLine("Writing tiny code");
output.Write((byte)headerFlags);
} else {
// Console.WriteLine("Writing fat code");
output.Write(headerFlags);
output.Write((ushort)maxStack);
output.Write(offset);
output.Write(localSigIx);
}
// Console.WriteLine(Hex.Int(tide) + " CIL instructions");
// Console.WriteLine("starting instructions at " + output.Seek(0,SeekOrigin.Current));
for (int i=0; i < tide; i++) {
buffer[i].Write(output);
}
// Console.WriteLine("ending instructions at " + output.Seek(0,SeekOrigin.Current));
for (int i=0; i < paddingNeeded; i++) { output.Write((byte)0); }
if (exceptions != null) {
// Console.WriteLine("Writing exceptions");
// Console.WriteLine("header = " + Hex.Short(exceptHeader) + " exceptSize = " + Hex.Int(exceptSize));
output.Write(exceptHeader);
output.Write3Bytes((uint)exceptSize);
for (int i=0; i < exceptions.Count; i++) {
TryBlock tryBlock = (TryBlock)exceptions[i];
tryBlock.Write(output,fatExceptionFormat);
}
}
}