Open Dewera opened 4 years ago
Sure, contributions are always welcome. Did you check if the methods in ExtensionsMethods.cs are already what you need? If not, feel free to create a PR!
I actually didn't realise these existed - They're exactly what I was describing!
Sorry for posting on this old issue I was also looking for exactly that, I think it would be a lot better if the extension methods were moved into PeFile so its PeFile.VaToOffset rather than ulong.VaToOffset, its just a lot easier to discover as having ulong.VaToOffset seems very unusual to me. I wouldn't mind doing the PR for it.
Hi! A PR is welcome :)
I think most people working with this library are likely to need to convert between file offsets, relative virtual address and virtual addresses. Whilst these can be computed manually using the information present in the headers, due to how often these conversions are needed I think it would a good idea to expose methods to do this for consumers of the library.
Proposed methods
Would be happy to do this as a pull request should you agree.