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

bringmetoyourworld
bringmetoyourworld used Ask the Experts™
on
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.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Commented:
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

Commented:
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++.

Author

Commented:
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
Become a CompTIA Certified Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

Commented:
Sorry bringmetoyourworld, I'm not sure I understand what you want.  Could you elaborate?

Author

Commented:
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.
Commented:
You need *at least* the documentation of the functions, so you'll know what arguments to pass.  If you have the .H or .LIB files, you can extract the info from them, otherwise.

What is this DLL and what is it supposed to do?

Author

Commented:
Hi alexo
I found some information about that DLL .You are right,
Thank you.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial