Interface IOffsetConverter
- Namespace
- AsmResolver
- Assembly
- AsmResolver.dll
Provides members for converting virtual addresses to file offsets and vice versa.
public interface IOffsetConverter
Methods
FileOffsetToRva(ulong)
Converts a file offset to the virtual address when it is loaded into memory.
uint FileOffsetToRva(ulong fileOffset)
Parameters
fileOffset
ulongThe file offset to convert.
Returns
- uint
The virtual address, relative to the image base.
Exceptions
- ArgumentOutOfRangeException
Occurs when the file offset falls outside of the range of the convertible file offsets.
RvaToFileOffset(uint)
Converts a virtual address to the physical file offset.
ulong RvaToFileOffset(uint rva)
Parameters
rva
uintThe virtual address, relative to the image base, to convert.
Returns
- ulong
The file offset.
Exceptions
- ArgumentOutOfRangeException
Occurs when the virtual address falls outside of the range of the convertible addresses.