URL: https://www.github.com/ethanmoffat/PELoaderLib
Background
While developing EndlessClient, there was a desire to support cross-platform execution on both Windows and Linux. However, the graphics loading relied on Win32 API calls LoadLibrary
and LoadImage
which were not available on Linux. There also did not exist a good library for loading PE resources from binary files in C# that worked cross-platform.
Project Goals
PELoaderLib was developed as a library to enable EndlessClient to load PE resources in a platform-agnostic way. To do this, the PE files are read as a raw stream of bytes and parsed according to the PE file format. Documentation describing the layout of a PE file was relied on heavily to accomplish this. The link for this documentation is no longer live; the information describing the format is captured elsewhere in MSDN documentation.
This library is packaged and distributed via nuget.org. It is supported on Windows, Linux, and macOS operating systems.
Limitations
As it was developed specifially for resource loading, most of the data in a PE file is unavailable using PELoaderLib. The only functionality is the ability to load embedded resources by ID and culture code.