A Windows XP help forum. PCbanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » PCbanter forum » Microsoft Windows 7 » Windows 7 Forum
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

finding dynamic libraries used by an .exe file ?



 
 
Thread Tools Rate Thread Display Modes
  #1  
Old September 4th 16, 01:29 AM posted to alt.windows7.general
bilsch01
external usenet poster
 
Posts: 8
Default finding dynamic libraries used by an .exe file ?

In Ubuntu they have a command line command that will list all the
dynamic libraries (shared objects) that an executable file was linked
with.
The command line is: ldd 'filename'.
Is there something similar I can use for a Windows .exe file? This is a
32-bit C program created using MinGW.

TIA Bill S.
Ads
  #2  
Old September 4th 16, 02:01 AM posted to alt.windows7.general
B00ze
external usenet poster
 
Posts: 472
Default finding dynamic libraries used by an .exe file ?

On 2016-09-03 20:29, bilsch01 wrote:

In Ubuntu they have a command line command that will list all the
dynamic libraries (shared objects) that an executable file was linked with.
The command line is: ldd 'filename'.
Is there something similar I can use for a Windows .exe file? This is a
32-bit C program created using MinGW.


Dependency Walker, it comes in the Windows SDK IIRC, but it has its own
website too:
http://www.dependencywalker.com/

Regards,

--
! _\|/_ Sylvain /
! (o o) Memberavid-Suzuki-Fdn/EFF/Red+Cross/SPCA/Planetary-Society
oO-( )-Oo We secretly replaced the dilithium w/ Folgers crystals.

  #3  
Old September 4th 16, 04:08 AM posted to alt.windows7.general
Mayayana
external usenet poster
 
Posts: 6,438
Default finding dynamic libraries used by an .exe file ?


"bilsch01" wrote

| Is there something similar I can use for a Windows .exe file?

Dependency Walker is very interesting. It lists DLLs
and the functions useed from each one, in a clear
listing. It also lists all exports. So if an EXE uses, say,
user32.dll, DW can show which functions the EXE calls,
while in another section it will list all export functions
of user32.dll. But it won't necessarily see all DLLs used.

Another program is Process Explorer.

https://technet.microsoft.com/en-us/...sexplorer.aspx

It can list the DLLs currently loaded by
the process as it's running.

One can even list imports/exports using
VBScript, by parsing the PE file header
directly. See he

http://www.jsware.net/jsware/scrfiles.php5#peops

Those scripts do something like what Dependency
Walker does and generate a text file report.

But none of those methods is entirely complete.
In many cases, imported library functions are listed
in the Import Table of the PE file header, but an EXE
can also simply contain code to load a DLL and then
call its functions, without any of that being documented
in the Import Table. Many PE files don't even have an
Import Table. It's not required.

Probably the loaded file list in Process Explorer
will be the most complete.


 




Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off






All times are GMT +1. The time now is 05:24 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 PCbanter.
The comments are property of their posters.