0

Is there any way to get a list of the exported functions from a x86 DLL in C#? I know of Mono.Cecil that can decompile .NET DLLs to provide a list of the types/members, but searches come up blank when I search for x86 DLLs.

I'm looking at building a "DLL explorer" tool that lists the exported functions, enabling me to get a quick peek into DLLs and see the functionality.

Similar:

Community
  • 1
  • 1
Robin Rodricks
  • 110,798
  • 141
  • 398
  • 607

2 Answers2

2

You could try converting https://stackoverflow.com/a/4354755/613130 . It is written in C++ and uses some Windows API, but it should be possible to rewrite it in C#.

Or you can catch the output of dumpbin /exports YourDll.dll

Mmmmh... I've taken a look, and the ImageHlp methods are probably a little C#-unfriendly... and they aren't Unicode compatible. :-(

Here https://stackoverflow.com/a/1128453/613130 there is another method, that seems to be a little simpler.

Community
  • 1
  • 1
xanatos
  • 109,618
  • 12
  • 197
  • 280
-1

I would recommend having a look ILspy, this works on reflection to examine an assembly.

http://ilspy.net/

if you are using Visual Studio you can install this through the extension managager...Tools/Extension Manager/ search for ILspy

As this is C# not C++ unlike dependency walker this will not just show you the interface but the entire code base.

More generally here is an example of how reflection works: https://msdn.microsoft.com/en-us/library/system.reflection.assembly(v=vs.110).aspx

screig
  • 607
  • 1
  • 6
  • 19