Saturday, 28 September 2013

(Dependency Walker) missing explicit type on function

(Dependency Walker) missing explicit type on function

Apologies in advance for noob mistakes. This is my first question here.
First, some background:
I am trying to create a module for a program using dependency walker to
find C++ functions in a .dll that I don't have the lib or any source code
for. You can also assume that I can't get support from the original
developer. Basically, I checked another file that accesses it to see what
the minimum functions were to get it working. Here is an example of the
undecorated names that are output:
void foo::bar::baz(float)
float foo::bar::qux(void)
foo::bar::bar(void)
class foo::bar & foo::bar::operator=(class foo::bar const &)
The top two functions obviously take float or void and return float or
void. I got a similar function working using something like:
HINSTANCE THEDLL = LoadLibrary("C:\\dllFolder\\theDll.dll");
typedef float (*quxType)(void);
quxType qux = (quxType)GetProcAddress(THEDLL, "quxMangledName");
So those are not a problem.
Now, the third on the list looks like another function that takes void,
but it doesn't have an explicit return type. Does this mean I should just
use an implicit type for it, is it void, or is it not really a function?
If not, what is it?
I have no idea what to do with the fourth one. Is it even possible to
handle without the associated .h file?
I looked around, but I couldn't find any information on what to do when
the function doesn't look like a normal function with an explicit return
type. Despite using basically the same code that I used to get a function
working in a similar .dll, I keep getting an access violation crash when I
try to use function #2 here (I really just need function #2). So I am
guessing that the .dll needs more information or needs something
initialized first, which is why I am interested in the others on the list.
I realize this is a complicated problem, so there probably won't be a
"Right answer" solution to get it working, but if I am making any obvious
mistakes, or if there are any general suggestions for how to attack the
problem (even alternatives to dependency walker), let me know.

No comments:

Post a Comment