Listing functions of an unmanaged DLL at runtime in c#

泄露秘密 提交于 2019-12-11 04:11:58

问题


Is it possible to obtain a list of functions declared in an unmanaged DLL? I want to create this list in a c# program.

Using dumpbin or System.Reflection.Assembly is not possible.

Thanks


回答1:


As far as I know, the only way you can do this either:

  • Use a utility (such as dumpbin) and analyse its output from your C# code.
  • Open the target DLL file and manually work out where the export section of the file is located and read that.

You might need the help of too like PE Explorer or similar to help you get up and running by showing you location of the exports in a file.

If you want to do it without a utility, then you will need to understand the PE file format for a Windows DLL file and read the exports section.

Check out this link.



来源:https://stackoverflow.com/questions/2470918/listing-functions-of-an-unmanaged-dll-at-runtime-in-c-sharp

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!