Search code examples
.netdllmanagedspecificationsportable-executable

Reading Managed PE DLLs


I want my application, written in ocaml, to read a managed DLL and retrieve the class definitions contained therein. Where can I find the public documentation / example code on how to do it?

[edit: Since I'm writing this application in ocaml, I'm looking for actual file format definitions, since I can't use the .NET's own assembly inspection functions]

Thank you!


Solution

  • Okay, I've found some relevant pieces of information about reading a PE file and the CLI metadata. Specifically, this article http://wyday.com/blog/2010/how-to-detect-net-assemblies-x86-x64-anycpu/ has an example source code in C# and links to the PE/COFF specification, and to the CLI Metadata specification . It seems they will be enough to get started.

    I will still leave this question open, though, if someone would like to share more specific information / example source code. Thanks again for everyone that answered!