I have a DLL and I would like to use some of its functions.
#include
using namespace std;
extern \"C\" __declspec(dllimport) int Initializ
A good way would be to reconstruct some header that would declare the functions you want to call. For doing this, you must know/discover their exact signatures.
If you have access to the strings
command (available in cygwin), you might run it against the DLL. It will list the sequences of more than 4 consecutive printable characters terminated by a 0 (observe that it is really easy to implement, in the case where you do not want to install cygwin). Among these "strings", you will have garbage and the function signatures, mangled by the C++ compiler (see: http://en.wikipedia.org/wiki/Name_mangling). You will then have to unmangle the ones you are interested in, using undname.exe
(assuming the DLL was built by Microsoft Visual; see: http://msdn.microsoft.com/en-us/library/5x49w699.aspx)
... You might also want to consider DependencyWalker.