Link to home
Start Free TrialLog in
Avatar of kittuG
kittuG

asked on

OPening DLL

I got a DLL lets say ABC.DLL  , If I want to Open that DLL , I mean to view the functions which are present in ABC.DLL .. How can I do that .. is there is any tool for that ???
Avatar of Pacman
Pacman
Flag of Germany image

I think you can do a implib on this dll and generate a mapfile.
If you use Borland C++ then you can use "implib".
Visual C++ doesn't come with such a tool. But there's a shareware version available called "implib32".

note: you only see the names of the functions but not the parameters and the result.

hope this helps you a little bit
Pacman
ASKER CERTIFIED SOLUTION
Avatar of jhance
jhance

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
oh fine. jhance what I wanted to say is that VC doesn't come with implib-tool.
Avatar of kittuG
kittuG

ASKER

I am a VB Programmer, I don't know any thing about VC++ , so it will be useful for me if any one writes the steps to be done in detail..

Thanks
You asked how to get a listing of the exported function in a DLL.  The answer is:

DUMPBIN /EXPORTS ABC.DLL

I don't know if the DUMBIN tool is included with VB or not as I don't have this package.  Of course you asked this question in the "C Programming" area.

There is a LOT more to using a function from a DLL than just knowing the name.  You must know and quantity, order, and type of each argument as well as the type of any returned value.  There are no tools to extract this information as it is NOT stored in the DLL itself.

You must rely on information provided by the creator of the DLL.  If it's a Windows API DLL, you can find the information in the SDK documentation.  If it's a 3rd party DLL, then you need to go back to them for the information.  As a minimum, if you had the C ".h" or header file for the functions, you could construct the VB data needed to make use of the functions.

I'll be so bold as to say that if you DO NOT HAVE either a detailed description of each function in the DLL or the C header file for it, you will not be able to use the DLL from your VB program.



By the way, this is one reason why VB components based on COM or ActiveX are much more popular in the VB scene than raw DLLs.  COM embeds this information in the component itself via the Type Library information.
Avatar of kittuG

ASKER

I got VC++ Installed on my Machine, but I don't know how to Open DLL in VC++
For the 3rd time:

DUMPBIN /EXPORTS ABC.DLL

will give you a list of the exported functions.

If this is not what you are looking for, please define what you mean by "Open DLL".  DLLs are not normally "opened".  If you want to make use of the DLL from your VC++ program, please see the SDK docs for LoadLibrary().