Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Getting Parameters to DLL functions

Posted on 1999-01-20
8
220 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
ID: 1258201
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
ID: 1258202
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
ID: 1258203
Thanks Alexo, thats what I thought!
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 11

Expert Comment

by:alexo
ID: 1258204
>> 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
 

Author Comment

by:ianwhite
ID: 1258205
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
ID: 1258206
>> please submit an answer!
Have fun!
0
 
LVL 11

Expert Comment

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

Author Comment

by:ianwhite
ID: 1258208
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

ScreenConnect 6.0 Free Trial

Discover new time-saving features in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI, app configurations and chat acknowledgement to improve customer engagement!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
An Outlet in Cocoa is a persistent reference to a GUI control; it connects a property (a variable) to a control.  For example, it is common to create an Outlet for the text field GUI control and change the text that appears in this field via that Ou…
The goal of this video is to provide viewers with basic examples to understand how to use strings and some functions related to them in the C programming language.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.

790 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