Retrieving DLL Information

I have been given a dll that contains a set of complicated procedures and functions that I require.

Unfortunatly I do not have to code or details of the procedures and functions ! ;-(

Is there any way I can extract both the exported procedure names and the variables needed to be passed to them?

Thanks in advance

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi Stuart,

you can export procedure/function names but not the parameter list.

Ciao, Mike
StuartB_99Author Commented:
Cheers Mike,
So if the DLL Contains a procedure called PrintThis; and the procedure looks like

Procedure PrintThis(PrintText : String;
                    X,Y       : Integer;
                    Colour    : TColor);

Is there no way I can find out that I need to pass a string, 2 X ints and a tcolor?

If not how can I find out what functions ect are exported ie.) how can I find out that there is a proc called printThis within the DLL and can I get a list of all the exported procedures within the Dll?

Sorry to be a neucense but I realy dont fancy re-writing the Dll ;-)

Well, with a lot of knowledge and a fair amount of luck and inspiration you might be able to get also the parameter list. E.g. if you know the stack depth clear after return of the proc or some internal variables etc.

Generally speaking, you only can get the procedure names. Depending on the needs you have there are several options:

- use QuickView (right click on the DLL file in Explorer to get a list of the names)
- for more and persistent information use TDump.exe from Delphi (option: dump exports)
- if you need the info in your program then you need to enumerate the export table of the DLL (that's what the mentioned programs do too), but this will become a bit messy

Tell what you need.

Ciao, Mike
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

StuartB_99Author Commented:
Exports from Utils.dll
  7 exported name(s), 7 export addresse(s).  Ordinal base is 1.
  Sorted by Name:
    RVA      Ord. Hint Name
    -------- ---- ---- ----
    00092A34    7 0000 Display
    00092DD4    3 0001 GetItemCost
    00092C48    4 0002 GetPOR
    00092F14    2 0003 GetRSP
    000930A4    1 0004 RunNewOrderWizard
    00092B90    5 0005 ShowAboutBox
    00092AE4    6 0006 ShowSplashScreen

I retrieved this from TDump which is definatly the first part of what I need. The big problem I have is when I now call these procedures in my app

Function GetPOR; external 'Utils.Dll';

This is great, but I know for a fact that I need to pass the function some parameters? but I dont know what they are. This is the info that I would pay vast amounts of money for as there are about 4 Dlls that I need but dont want and havent got the time to re-write?

Please tell me you know exactly how to help me???????? ;-)

Sorry Stu,

but even for one million dollar, you cannot read the parameter lists from a DLL. They aren't stored there!

You can only load the DLL and call the function in question. Step at assembler level to see how the function works with the stack (as that's the place where the parameter are passed on).

Ciao, Mike

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
StuartB_99Author Commented:
Oh well Mike,
Thanks for all your help you were the only one offering so heres some hard earned points for you ;-).

Ill try and step through it but I dont think Im expierienced enough to succeed but we can try ;-(..

Cheers mate

Stuart ;-)

PS: It was £2Million on the table ;-)
:-))) good luck and thank you for the A grading

Ciao, Mike
StuartB_99Author Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.