What is in a DLL

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

What is in a DLL

Post by Theunis Jansen »

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

Post by MichaelW »

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

Post by Theunis Jansen »

@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

Post by MichaelW »

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: 7976
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: What is in a DLL

Post by dodicat »

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: 3235
Joined: Jul 28, 2005 14:45
Location: Germany

Re: What is in a DLL

Post by dkl »

pexports: https://sourceforge.net/projects/mingw/ ... /pexports/
gendef: https://sourceforge.net/projects/mingw/ ... on/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/ ... /binutils/
Theunis Jansen
Posts: 248
Joined: Jul 01, 2010 9:35

Re: What is in a DLL

Post by Theunis Jansen »

Thank you for the replies.

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

Re: What is in a DLL

Post by srvaldez »

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

Post by MichaelW »

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