Monday, August 29, 2011

Listing the exported function names in a C/C++ dll

I found myself working with some low level C/C++ API for some software to hardware interfaces. This can involve quite a bit of work figuring out function names, pointers, addresses and memory handling. Sometimes the function names in the documentation do not correlate with the DLL. To help list the exported functions in the DLL, I found the dumpbin utility from the Microsoft Visual Studio IDE to be quite useful in helping me to write C# wrappers for the C/C++ dynamic link libraries.

An example usage is shown below.

  1. Simply open up the Microsoft Visual Studio Command Prompt Window.
  2. Then type the following in the Command Window, where shapelib.dll should be replaced with the name of your DLL you want to read:

    C:\> dumpbin /exports shapelib.dll


No comments: