本文整理汇总了C#中RVA.AlignUp方法的典型用法代码示例。如果您正苦于以下问题:C# RVA.AlignUp方法的具体用法?C# RVA.AlignUp怎么用?C# RVA.AlignUp使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RVA
的用法示例。
在下文中一共展示了RVA.AlignUp方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetOffset
/// <inheritdoc/>
public void SetOffset(FileOffset offset, RVA rva) {
this.offset = offset;
this.rva = rva;
padding = rva.AlignUp(4) - rva + 2;
length = padding + 6;
}
示例2: SetOffset
/// <inheritdoc/>
public void SetOffset(FileOffset offset, RVA rva) {
this.offset = offset;
this.rva = rva;
length = 0x28;
importLookupTableRVA = rva + length;
length += 8;
stringsPadding = (int)(rva.AlignUp(STRINGS_ALIGNMENT) - rva);
length += (uint)stringsPadding;
corXxxMainRVA = rva + length;
length += 0xE;
mscoreeDllRVA = rva + length;
length += 0xC;
length++;
}
示例3: CalculateRvasAndFileOffsets
/// <summary>
/// Calculates <see cref="RVA"/> and <see cref="FileOffset"/> of all <see cref="IChunk"/>s
/// </summary>
/// <param name="chunks">All chunks</param>
/// <param name="offset">Starting file offset</param>
/// <param name="rva">Starting RVA</param>
/// <param name="fileAlignment">File alignment</param>
/// <param name="sectionAlignment">Section alignment</param>
protected void CalculateRvasAndFileOffsets(List<IChunk> chunks, FileOffset offset, RVA rva, uint fileAlignment, uint sectionAlignment) {
foreach (var chunk in chunks) {
chunk.SetOffset(offset, rva);
offset += chunk.GetFileLength();
rva += chunk.GetVirtualSize();
offset = offset.AlignUp(fileAlignment);
rva = rva.AlignUp(sectionAlignment);
}
}
示例4: Align
static void Align(ref FileOffset offset, ref RVA rva) {
offset = offset.AlignUp(HH_ALIGNMENT);
rva = rva.AlignUp(HH_ALIGNMENT);
}