Link to home
Start Free TrialLog in
Avatar of ianwhite
ianwhite

asked on

Getting Parameters to DLL functions

If I have a dll, with exported functions, but no .lib or .h file. Is it possible to work out what parameters thoses functions take, and therefore do a GetProcAddress.. and call them ?

any clues anyone ?


Thanks

Ian
Avatar of alexo
alexo
Flag of Antarctica image

The general answer is no.
If the DLL functions use the __stdcall convention, you can see how many BYTES the function expects to be pushed on the stack from it's name (the format is funcname@num).  Most arguments will be 32bit integers or pointers so you can guess the number of arguments as num/4.
Also, Borland C++ comes with an IMPLIB program that is supposed to generate import libraries from DLL files.

A brief search showed that it is downloadable from:
    ftp.cs.uregina.ca/pub/class/250/class/MASM Disks
(As part of the MASM package).
Avatar of ianwhite
ianwhite

ASKER

Thanks Alexo, thats what I thought!
>> Thanks Alexo, thats what I thought!
If my suggestion was helpful, tell me and I'll submit an answer.  If I didn't tell you anything you didn't already know, you can still delete the question and get your points back.
Yep, go on , its good to see people responding, please submit an answer!

ta
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
Letting an answer autograde after you suggested I submit an answer is an indication of extremely poor manners.
Heh, I'm sorry, I guess I didnt click the right button, or maybe I missed your last email. I certainly didnt go out of my way to offend.

Thanks for your answer, hope I havent put you off answering in future.

ta,

Ian