本文整理匯總了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);
}
}
}