Solved

Getting Parameters to DLL functions

Posted on 1999-01-20
8
198 Views
Last Modified: 2010-04-15
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
0
Comment
Question by:ianwhite
  • 5
  • 3
8 Comments
 
LVL 11

Expert Comment

by:alexo
Comment Utility
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.
0
 
LVL 11

Expert Comment

by:alexo
Comment Utility
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).
0
 

Author Comment

by:ianwhite
Comment Utility
Thanks Alexo, thats what I thought!
0
 
LVL 11

Expert Comment

by:alexo
Comment Utility
>> 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.
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:ianwhite
Comment Utility
Yep, go on , its good to see people responding, please submit an answer!

ta
0
 
LVL 11

Accepted Solution

by:
alexo earned 100 total points
Comment Utility
>> please submit an answer!
Have fun!
0
 
LVL 11

Expert Comment

by:alexo
Comment Utility
Letting an answer autograde after you suggested I submit an answer is an indication of extremely poor manners.
0
 

Author Comment

by:ianwhite
Comment Utility
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
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Have you thought about creating an iPhone application (app), but didn't even know where to get started? Here's how: ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ Important pre-programming comments: I’ve never tri…
This tutorial is posted by Aaron Wojnowski, administrator at SDKExpert.net.  To view more iPhone tutorials, visit www.sdkexpert.net. This is a very simple tutorial on finding the user's current location easily. In this tutorial, you will learn ho…
The goal of this video is to provide viewers with basic examples to understand and use structures in the C programming language.
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now