DLL EntryPoints

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Another question:

I'm sitting with a dll/ocx that I wish to use in my application. The thing
is, the manual or help/information of any kind about it, is missing!.

Is there a tool I can run against the dll/ocx that will list for me all the
exposed methods/properties?

Anybody?
Thanks
Tazz
 
If this is COM based, you could add a reference to this library and .NET
will create a wrapper for you.
If this is a regular DLL you'll have to declare the functions manually...

Have you tried to search for some documentation on the net ?
 
That's the thing, I you had a regular dll, but received no documentation for
it, how would you go about finding out the names of those darn entry points ?

I'm restricted to certain (and I have to specifiy them) work related-only
websites (bunch of mumbo jumbo!), so no search engines allowed for me
unfortunately. I will have to try at home sometime, but will keep on snooping
in MSDN in the meantime.

Hhmmn, ah well....thanks anyway Patrice

Chou
Tazz
 
That's the thing, I you had a regular dll, but received no documentation for
it, how would you go about finding out the names of those darn entry points ?

By running Dumpbin.exe /exports or Depends.exe or similar tool. But just the
names isn't enough, you need the function signatures.

Have you considered contacting the DLL vendor and request some new
documentation?

so no search engines allowed for me unfortunately.

Jeez, if I were you I'd look for a new job.


Mattias
 
Patrice, I will give it a shot, but like a told Mattias, all that remains now
is to go the long route and phone around etc. to try and get hold of the
vendor.

Thanks again for all your help.
Happy coding!

Chou
Tazz
 
Tazz said:
I'm sitting with a dll/ocx that I wish to use in my application. The
thing is, the manual or help/information of any kind about it, is
missing!.

Is there a tool I can run against the dll/ocx that will list for me
all the exposed methods/properties?

If it exports C functions then you can use dumpbin /exports (this is
just a shim for the C++ link.exe tool, so you can use that as well).
This will give you the *name* or ordinal of the exported function.
Finding out the return value and parameters is more difficult. For that
you ideally need a header file (bit if you had that you would not have
to use dumpbin). If the function names are mangled (or decorated as
Microsoft calls it) you can decode the 'decoration' to get a list of
parameter types and return value. Microsoft provides a tool to do this
(I cannot remember its name) and there are instructions on the web
somewhere (again, I cannopt remember where, but a Google should get you
there). If the names are not mangled then you only recourse is to run an
application that uses it under a debugger and do an analysis of the
stack frame. That is not a simple thing to do.

Richard
 
Back
Top