PeLib is an open source C++ library with the purpose to ease the access and modification of PE (Portable executable) files. This is done through a multitude of classes which represent all important PE header and directory structures and which provide the necessary functions to read, modify and write these structures.
As this library is fully ANSI/ISO C++ compliant it should compile with all popular compilers for the Windows platform. For people who don't use C++ in their projects a dynamic link library is provided which encapsulates all of PeLib's functionality so that projects using programming languages as diverse as Win32 assembler, C# or Delphi can still benefit from PeLib's power.
PeLib helps you to work with Portable Executable files. It's not only possible to read and modify simple data structures like the MZ or PE header, it's even possible to modifiy the more complicated image directories. If you've always searched for an easy way to add functions to a file's import table, to modify it's resource section or just to browse through the exports or relocations tables PeLib is for you. It's even possible to create a valid PE file completely from the scratch if you should ever feel like it.
PeLib is not a simple file patcher. In fact it's not even possible to patch random bytes in files with PeLib's standard functionality. PeLib only knows the complex datastructures which are found in the header of PE files. You can only modify files through these structures.
PeLib is made only for Windows on the x86 platform and only for PE files. There will never be any support for deprecated file formats like NE or file formats which are not native to the Windows platform (ELF, ...). And although PeLib should compile on other platforms due to it's strict adherence to the ANSI/ISO C++ standard, you're on your own there.
PeLib is fully licensed under the highly permissive and business-friendly zlib/libpng License. This means you are completely free to use, modify, and distribute the library in both open-source and commercial products without paying royalties or licensing fees.
The only conditions are that the origin of the software must not be misrepresented, altered source versions must be plainly marked as such, and this license notice must not be removed or altered from any source distribution.