What is in a DLL

Windows specific questions.
Theunis Jansen
Posts: 248
Joined: Jul 01, 2010 9:35

What is in a DLL

Postby Theunis Jansen » Jun 13, 2013 7:37

in QB4.5 you have a facility to show the contents of a QLB.

Is there perhaps a way to see what routines are in a Windows DLL ?
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Re: What is in a DLL

Postby MichaelW » Jun 13, 2013 9:00

You can get a list of the DLL “exports”, which generally means the callable procedures that it contains, in the form of a module definition file, with the pexports or gendef utilities.
Theunis Jansen
Posts: 248
Joined: Jul 01, 2010 9:35

Re: What is in a DLL

Postby Theunis Jansen » Jun 13, 2013 9:20

@MichaelW

Hi, thanks and woosh what you said is to high so I can't come by. I am an old QB4.5 man (yes literally old) and not so hot with the inner workings of Windows.

Is there perhaps a specific file or program that I can use to get the info.
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Re: What is in a DLL

Postby MichaelW » Jun 13, 2013 16:49

I can’t find any good place to get pexports or gendef ATM; perhaps someone else can provide a link. Because I have a MinGW installation on my system, I can easily get pexports or gendef using mingw-get.exe and these command lines:

mingw-get install pexports
mingw-get install gendef
dodicat
Posts: 6727
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: What is in a DLL

Postby dodicat » Jun 13, 2013 16:55

If you download Tcc (Tiny C), get the win .zip file.
http://download.savannah.gnu.org/releases/tinycc/
Just extract it into some empty folder.
It's completely unobstrusive to windows, no installer or anything, just the compiler .exe's.
In there you'll find tiny_impdef.exe.
The command is tiny_impdef somefile.dll where somefile.dll you will have copied into the folder.

I suggest you stick FreeBasic's start_shell into the folder and start from there.
You will get somefile.def produced.
You will see the functions of the dll.

If you don't have start_shell from fb then compile this, It'll do:

Code: Select all

 
'STARTShell
shell "cmd"
sleep
dkl
Site Admin
Posts: 3212
Joined: Jul 28, 2005 14:45
Location: Germany

Re: What is in a DLL

Postby dkl » Jun 13, 2013 17:25

pexports: https://sourceforge.net/projects/mingw/files/MinGW/Extension/pexports/
gendef: https://sourceforge.net/projects/mingw/files/MinGW/Extension/gendef/

If you want to see technical details, code/data sections, disassemblies, etc. I'd use the objdump program from binutils for that.
binutils: https://sourceforge.net/projects/mingw/files/MinGW/Base/binutils/
Theunis Jansen
Posts: 248
Joined: Jul 01, 2010 9:35

Re: What is in a DLL

Postby Theunis Jansen » Jun 13, 2013 18:22

Thank you for the replies.

I will give them all a try.
srvaldez
Posts: 2550
Joined: Sep 25, 2005 21:54

Re: What is in a DLL

Postby srvaldez » Jun 13, 2013 23:43

hello Theunis Jansen
you can also get "Dependency Walker" it's a free program that will show the dependencies of a program or dll, in the case of a dll
it will also show all the exported functions and more, you can download it from http://www.dependencywalker.com/
MichaelW
Posts: 3500
Joined: May 16, 2006 22:34
Location: USA

Re: What is in a DLL

Postby MichaelW » Jun 14, 2013 1:34

Or if you have a Microsoft PSDK installed, there should be a dependency walker (depends.exe) in the bin directory.

Return to “Windows”

Who is online

Users browsing this forum: No registered users and 3 guests