forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Finding APIs in a DLL

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jul 26, 2003 7:26 pm    Post subject: Finding APIs in a DLL Reply with quote

How can I find the callable APIs in a DLL? I heard that there used to be
a function in Windows that did this but now it's not in XP. Sad

My problem is that I want to find the functions in a DLL that's not
documented so that I can call them.

Thanks for any help in advance! Very Happy

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Sat Jul 26, 2003 7:42 pm    Post subject: Reply with quote

Back to top
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sat Jul 26, 2003 7:51 pm    Post subject: Reply with quote

Hmm, thanks bbelcher Very Happy , but I need a tool that will give me more information.

Does anyone else know of any such tool?

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 746
Location: The Netherlands

PostPosted: Sat Jul 26, 2003 11:28 pm    Post subject: Reply with quote

Personally I don't think there's any way to extract more from the DLL file related to
a function than its name and address. Only if disassembling the file, I think it may
be possible to decipher information related to the expected parameters and return
values, but that would probably be very hard and possibly forbidden.

I still do find the PEBROWSE tool very valuable though and will add it to the Resources
section.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Sun Jul 27, 2003 2:52 am    Post subject: Reply with quote

Tommy is correct. I don't think this is possible either. The only way to really do that is to disassemble the DLL. I have searched for a way to get the parameters from a DLL for the past 5 years and I have yet to find one. If someone comes up with a way to do this please tell me short of disassembling the DLL. I don't want to disassemble a DLL because that is against the license agreement from most DLL's. So for now you will have to contact the author of the DLL to get the parameters.
_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
CodeScript
Moderator Team


Joined: 08 Jun 2003
Posts: 1060
Location: India

PostPosted: Sun Jul 27, 2003 3:13 am    Post subject: Reply with quote

If you want just the dll functions which are exported you can use dependency walker which comes with visual studio - if U have access to one(my friend has it).
But getting parameters is almost impossible unless the author of the dll says expressly that you can decomplile it - never happens - in that case he gives away the source. If U have the header file(e.g. .h file in C++) you can see the functions and parameters directly.

But if the functon is simple you can sometimes guess what it may take - Even a beginner like me has beeen sucessful sometimes(twice) especially if U have another dll which is atleat a little similar to it.
This may help in your guessing.If U have something like:
FnDll@10. The 10 is the total size in bytes of all the arguments.

(I heard there are utilites which give you the number of parameters which the dll needs(not the exact parameters) - dont know more about it.)

But as far as API's are concerned U can have lots of documentations available e.g. APIViewer 2003 gives you the latest ones which are not present in the W32HLP file.

Regards

_________________
Regards
- CodeScript
Arrow Give your application a professional look with the VDSGUI Extension
Back to top
View user's profile Send private message Visit poster's website
bbelcher
Contributor
Contributor


Joined: 30 Jul 2002
Posts: 172

PostPosted: Sun Jul 27, 2003 12:44 pm    Post subject: Reply with quote

dependency walker is also availible in the nt resource kit.
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Thu Jul 31, 2003 3:32 pm    Post subject: Reply with quote

I presume you have the Windows API help file?
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Jul 31, 2003 8:29 pm    Post subject: Reply with quote

Yup I've got that. But there's DLLs that aren't documented in the Win32
API help file, and I don't know which functions they contain.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Fri Aug 01, 2003 8:39 am    Post subject: Reply with quote

FreezingFire, you might do a search on Google like "dllname.dll+api". That way I found some APIs for winsock (which I can't get to work), which I couldn't find at the MSDN library...
_________________
[ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial!
Back to top
View user's profile Send private message
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Fri Aug 01, 2003 9:13 am    Post subject: Reply with quote

You might be better off using wininet, which I think one of the API examples that comes with VDS 5 uses that. I can't remember where I got the documentation about that (certainly used Google). But most DLLs, if they aren't publicly documented, you can't be sure they will be on a user's machine and you probably won't be entitled to distribute them with your application.
_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group