문제

C/C++ has the set of predefined structures and constants corresponding to an exe-header and so on. Do exist some analogical standard namespaces, classes in C# special for analyzing of portable executable files? Or is it only a prerogative of unmanaged unsafe more native languages?

도움이 되었습니까?

해결책

There exists an managed library called PeNet which is available as open source and as a NuGet package, too. You can access and change nearly all structures in the PE header with this library. PeNet GitHub

Disclaimer: I'm the main author of the library

다른 팁

An interesting library which is published for a number of languages including c#:

https://formats.kaitai.io/microsoft_pe/csharp.html

It uses another Kaitai's class named "Kaitai Struct", which is another interesting and more general class for reading binary files.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top