List all exported symbol names using JNA

◇◆丶佛笑我妖孽 提交于 2019-12-11 01:06:23

问题


How can you list all available function names in a given dll using JNA?


回答1:


JNA lets you invoke those functions at runtime. To see what is available, use a tool appropriate for the job. On windows, you have "dumpbin /exports". On linux, you have objdump. On MacOSX you have otool.

If you want to dynamically look up function names in a DLL from a running Java program using JNA, then you'd need to duplicate at least some of the functionality of those programs to parse the object file looking for exported symbols. If you're only interested in windows, then this question provides a relatively concise parsing of the DLL data.



来源:https://stackoverflow.com/questions/11421102/list-all-exported-symbol-names-using-jna

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