Closed jesterret closed 3 years ago
I'm opposed to adding niche features like suggested in 2 and 3 to avoid bloating the library with things that should really be done in personal copies/forks. The goal of this project is really just to be an emulation of the Windows loader (there's a few more things I need to port over from my private code to finish it off) which users can then adapt to their own personal needs based on what they are using it for.
Regarding the first suggestion, I'm not entirely sure what value this would add. If you really did need mapped image size, it can be derived from the headers prior to mapping using the following
using var peReader = new PEReader(imageBytes.ToArray().ToImmutableArray());
var imageSize = peReader.PEHeaders.PEHeader!.SizeOfImage;
Honestly, first one, it's mostly convenience. I know I can read it from headers, it's basically doing the same thing twice, since it's read internally anyway. As for the rest, if that's the direction You intend the library to go, that's fair. I'll go with Your suggestion then probably.
Hi, I would like to suggest some small, some big changes that might be useful:
Thanks for making this library, hope You'll consider some of those :)