Link to home
Start Free TrialLog in
Avatar of bringmetoyourworld
bringmetoyourworld

asked on

How can I know what is inside DLL and how to make use that function.

There are many function in DLL library.I explore it by using Quick View ,there are many function name inside but no detail about input parameter ,nothing.
Can anybody explain to me in detail how to make use.
Avatar of alexo
alexo
Flag of Antarctica image

This information is usually not stored in the DLL.

If the DLL exports C++ style functions, you may be able to deduce the arguments from the name mangling.  The mangled names will look really weird (e.g.: ?Func@@YAHN@Z) and the name mangling scheme is different for each compiler.It is not well documented but you can find some info here: http://www.kegel.com/mangle.html

Otherwise, if the functions use the __stdcall Windows calling convention, they will only expose the number of bytes that the arguments need.  That does not give you much as func@8 could be either of:
    void func(double)
    int* func(float, unsigned long)
    etc...

Otherwice, the standard C calling convention does not save any information about the arguments.

On top of that, the functions in the DLL may have been renamed by a .DEF file.

To summarize: you're out of luck
Avatar of drnick
drnick

in a dll there's no information stored about the parameters a function uses. however, some dlls written in c++ follow a naming convention which adds a '@' to the functions name followed by the parameter size in hex.
of course, this does not help you.
when you want to use a dll in vc++ 6, you need the .lib assigned to the dll. add it's name ander project settings, link. most of the windows dll's libs are shiped with vc++.
Avatar of bringmetoyourworld

ASKER

Hi alexo
Can I have "some" good example for DLL usage code,it may much help me to make understand.
Waiting for you alexo.
Thnaks in advance
bringmetoyourwolrd
Sorry bringmetoyourworld, I'm not sure I understand what you want.  Could you elaborate?
Hi alexo
I have recieved a DLL from internet and I want to make use it,and I am a beginner .I want to know what is inside that DLL and how to use that function .Do you have the example code for using DLL.
A lot of thanks.
ASKER CERTIFIED SOLUTION
Avatar of alexo
alexo
Flag of Antarctica image

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
Hi alexo
I found some information about that DLL .You are right,
Thank you.