https://github.com/nathan-osman/win32pe
C++ library for working with Win32 PE files
https://github.com/nathan-osman/win32pe
cpp pe-file win32
Last synced: 4 months ago
JSON representation
C++ library for working with Win32 PE files
- Host: GitHub
- URL: https://github.com/nathan-osman/win32pe
- Owner: nathan-osman
- License: mit
- Created: 2017-11-25T22:16:49.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2019-07-18T05:59:14.000Z (almost 7 years ago)
- Last Synced: 2024-12-31T19:16:15.940Z (over 1 year ago)
- Topics: cpp, pe-file, win32
- Language: C++
- Size: 76.2 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## win32pe
[](https://travis-ci.org/nathan-osman/win32pe)
[](http://opensource.org/licenses/MIT)
This library simplifies the task of working with PE files.
### Example
This snippet demonstrates how to retrieve the machine type of an executable on disk.
#include
#include
win32pe::File file;
if (!file.load("test.exe")) {
// error handling
}
switch (file.fileHeader().machine()) {
case win32pe::FileHeader::arch_i386:
std::cout << "i386 file\n";
break;
case win32pe::FileHeader::arch_amd64:
std::cout << "amd64 file\n";
break;
default:
std::cout << "unknown file\n";
break;
}