Read and respond to this message at:
I have this closed third-party dll and no C nor C++ header file; is there
a way to automatically create the header file with the proper prototypes basing
on the .dll itself, just as I can create a .def using pexports?
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit:
From: Michael Gerdau <mgd@te...> - 2004-09-09 13:57:10
> I have this closed third-party dll and no C nor C++ header file; is there
> a way to automatically create the header file with the proper prototypes basing
> on the .dll itself, just as I can create a .def using pexports?
No, not really.
The problem is this:
a) your DLL exports some kind of C-API (stdcall, cdecl or so).
Here the most you know is the total size of the parameters
passed to the functions (if at all; depending on the calling
convention). The type of the parameters is not part of the
b) your DLL exports a C++-API.
The positive part of this is that you have indeed the complete
functions signature which includes parameter types etc.
The downside is that you probably would have to know which
C++-compiler did generate the DLL in the first place and (and
this is the really annoying part) you'd have to use that very
same C++-compiler to interface that DLL (due to incompatibilities
of the C++-ABI among compilers; search the web for C++-ABI to
learn more on this).
Therefor the answer is:
No because it can't be done.
Vote against SPAM - see http://www.politik-digital.de/spam/
Michael Gerdau email: mgd@...
GPG-keys available on request or at public keyserver